Messaging: Bump sdk (>=33, <=34)
* Since we already compile with sdk "current", this is just the next logical step * We skip 35 for now since edge-to-edge stuff can be done later * It also gives AS the possibility to recognize necessary steps * WRITE_SMS permission removed in API 23 Change-Id: Ia567fa9e42772f0b6d6e6fdc0d21b5635ff9dcc5
This commit is contained in:
+4
-3
@@ -19,13 +19,12 @@
|
|||||||
package="com.android.messaging"
|
package="com.android.messaging"
|
||||||
android:installLocation="internalOnly">
|
android:installLocation="internalOnly">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29" />
|
<uses-sdk android:minSdkVersion="33" android:targetSdkVersion="34" />
|
||||||
|
|
||||||
<!-- Application holds CPU wakelock while working in background -->
|
<!-- Application holds CPU wakelock while working in background -->
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<!-- Application needs SMS/MMS permissions -->
|
<!-- Application needs SMS/MMS permissions -->
|
||||||
<uses-permission android:name="android.permission.READ_SMS"/>
|
<uses-permission android:name="android.permission.READ_SMS"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_SMS"/>
|
|
||||||
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
|
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
|
||||||
<uses-permission android:name="android.permission.RECEIVE_MMS"/>
|
<uses-permission android:name="android.permission.RECEIVE_MMS"/>
|
||||||
<uses-permission android:name="android.permission.SEND_SMS"/>
|
<uses-permission android:name="android.permission.SEND_SMS"/>
|
||||||
@@ -56,6 +55,7 @@
|
|||||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
||||||
<uses-feature android:name="android.hardware.microphone" android:required="false" />
|
<uses-feature android:name="android.hardware.microphone" android:required="false" />
|
||||||
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
|
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
|
||||||
|
<uses-feature android:name="android.hardware.telephony" android:required="false" />
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<intent>
|
<intent>
|
||||||
@@ -195,7 +195,8 @@
|
|||||||
android:theme="@style/BugleTheme.SettingsActivity"
|
android:theme="@style/BugleTheme.SettingsActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
android:screenOrientation="user"
|
android:screenOrientation="user"
|
||||||
android:parentActivityName="com.android.messaging.ui.appsettings.SettingsActivity">
|
android:parentActivityName="com.android.messaging.ui.appsettings.SettingsActivity"
|
||||||
|
android:exported="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -165,7 +166,8 @@ public class ActionServiceImpl extends JobIntentService {
|
|||||||
final long delayMs) {
|
final long delayMs) {
|
||||||
final Context context = Factory.get().getApplicationContext();
|
final Context context = Factory.get().getApplicationContext();
|
||||||
final PendingIntent pendingIntent = PendingIntent.getBroadcast(
|
final PendingIntent pendingIntent = PendingIntent.getBroadcast(
|
||||||
context, requestCode, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|
context, requestCode, intent,
|
||||||
|
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
|
||||||
final AlarmManager mgr =
|
final AlarmManager mgr =
|
||||||
(AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
(AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||||
@@ -201,7 +203,7 @@ public class ActionServiceImpl extends JobIntentService {
|
|||||||
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
|
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
|
||||||
}
|
}
|
||||||
return PendingIntent.getBroadcast(context, requestCode, intent,
|
return PendingIntent.getBroadcast(context, requestCode, intent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -163,7 +164,7 @@ public class MmsSender {
|
|||||||
context,
|
context,
|
||||||
0 /*request code*/,
|
0 /*request code*/,
|
||||||
sentIntent,
|
sentIntent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
|
||||||
// Send the message
|
// Send the message
|
||||||
MmsManager.sendMultimediaMessage(subId, context, contentUri, locationUrl,
|
MmsManager.sendMultimediaMessage(subId, context, contentUri, locationUrl,
|
||||||
@@ -262,7 +263,7 @@ public class MmsSender {
|
|||||||
context,
|
context,
|
||||||
0 /*request code*/,
|
0 /*request code*/,
|
||||||
downloadedIntent,
|
downloadedIntent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
|
||||||
MmsManager.downloadMultimediaMessage(subId, context, contentLocation, contentUri,
|
MmsManager.downloadMultimediaMessage(subId, context, contentLocation, contentUri,
|
||||||
downloadedPendingIntent);
|
downloadedPendingIntent);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -267,7 +268,7 @@ public class SmsSender {
|
|||||||
partId,
|
partId,
|
||||||
getSendStatusIntent(context, SendStatusReceiver.MESSAGE_DELIVERED_ACTION,
|
getSendStatusIntent(context, SendStatusReceiver.MESSAGE_DELIVERED_ACTION,
|
||||||
messageUri, partId, subId),
|
messageUri, partId, subId),
|
||||||
0/*flag*/));
|
PendingIntent.FLAG_IMMUTABLE));
|
||||||
} else {
|
} else {
|
||||||
deliveryIntents.add(null);
|
deliveryIntents.add(null);
|
||||||
}
|
}
|
||||||
@@ -276,7 +277,7 @@ public class SmsSender {
|
|||||||
partId,
|
partId,
|
||||||
getSendStatusIntent(context, SendStatusReceiver.MESSAGE_SENT_ACTION,
|
getSendStatusIntent(context, SendStatusReceiver.MESSAGE_SENT_ACTION,
|
||||||
messageUri, partId, subId),
|
messageUri, partId, subId),
|
||||||
0/*flag*/));
|
PendingIntent.FLAG_IMMUTABLE));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (MmsConfig.get(subId).getSendMultipartSmsAsSeparateMessages()) {
|
if (MmsConfig.get(subId).getSendMultipartSmsAsSeparateMessages()) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -428,7 +429,7 @@ public class UIIntentsImpl extends UIIntents {
|
|||||||
}
|
}
|
||||||
return PendingIntent.getBroadcast(context,
|
return PendingIntent.getBroadcast(context,
|
||||||
requestCode, intent,
|
requestCode, intent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -446,7 +447,8 @@ public class UIIntentsImpl extends UIIntents {
|
|||||||
// Adds the back stack for the Intent (plus the Intent itself)
|
// Adds the back stack for the Intent (plus the Intent itself)
|
||||||
stackBuilder.addNextIntentWithParentStack(intent);
|
stackBuilder.addNextIntentWithParentStack(intent);
|
||||||
final PendingIntent resultPendingIntent =
|
final PendingIntent resultPendingIntent =
|
||||||
stackBuilder.getPendingIntent(requestCode, PendingIntent.FLAG_UPDATE_CURRENT);
|
stackBuilder.getPendingIntent(requestCode,
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
|
||||||
return resultPendingIntent;
|
return resultPendingIntent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user