mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Set intent flag required by Android 12 (SDK 31)
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
738ed94f98
commit
331309405d
@ -161,6 +161,7 @@ import me.zhanghai.android.effortlesspermissions.OpenAppDetailsDialogFragment;
|
||||
import okhttp3.Cache;
|
||||
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||
|
||||
import static android.app.PendingIntent.FLAG_MUTABLE;
|
||||
import static android.app.PendingIntent.FLAG_MUTABLE;
|
||||
import static com.nextcloud.talk.webrtc.Globals.JOB_ID;
|
||||
import static com.nextcloud.talk.webrtc.Globals.PARTICIPANTS_UPDATE;
|
||||
@ -2606,22 +2607,19 @@ public class CallActivity extends CallBaseActivity {
|
||||
final ArrayList<RemoteAction> actions = new ArrayList<>();
|
||||
|
||||
final Icon icon = Icon.createWithResource(this, iconId);
|
||||
PendingIntent intent;
|
||||
|
||||
int intentFlag;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
intent =
|
||||
PendingIntent.getBroadcast(
|
||||
this,
|
||||
requestCode,
|
||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||
FLAG_MUTABLE);
|
||||
intentFlag = FLAG_MUTABLE;
|
||||
} else {
|
||||
intent =
|
||||
PendingIntent.getBroadcast(
|
||||
this,
|
||||
requestCode,
|
||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||
0);
|
||||
intentFlag = 0;
|
||||
}
|
||||
final PendingIntent intent =
|
||||
PendingIntent.getBroadcast(
|
||||
this,
|
||||
requestCode,
|
||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||
intentFlag);
|
||||
|
||||
actions.add(new RemoteAction(icon, title, title, intent));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user