mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
only set intent flag for sdk>=31
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
98a96ef6e4
commit
3096d90bc6
@ -2606,12 +2606,22 @@ public class CallActivity extends CallBaseActivity {
|
||||
final ArrayList<RemoteAction> actions = new ArrayList<>();
|
||||
|
||||
final Icon icon = Icon.createWithResource(this, iconId);
|
||||
final PendingIntent intent =
|
||||
PendingIntent.getBroadcast(
|
||||
this,
|
||||
requestCode,
|
||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||
FLAG_MUTABLE);
|
||||
PendingIntent intent;
|
||||
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);
|
||||
} else {
|
||||
intent =
|
||||
PendingIntent.getBroadcast(
|
||||
this,
|
||||
requestCode,
|
||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||
0);
|
||||
}
|
||||
|
||||
actions.add(new RemoteAction(icon, title, title, intent));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user