mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +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 ArrayList<RemoteAction> actions = new ArrayList<>();
|
||||||
|
|
||||||
final Icon icon = Icon.createWithResource(this, iconId);
|
final Icon icon = Icon.createWithResource(this, iconId);
|
||||||
final PendingIntent intent =
|
PendingIntent intent;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
intent =
|
||||||
PendingIntent.getBroadcast(
|
PendingIntent.getBroadcast(
|
||||||
this,
|
this,
|
||||||
requestCode,
|
requestCode,
|
||||||
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode),
|
||||||
FLAG_MUTABLE);
|
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));
|
actions.add(new RemoteAction(icon, title, title, intent));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user