fix: PendingIntent in VoIPService
This commit is contained in:
parent
e4728e0c62
commit
cec644d57d
@ -2876,9 +2876,9 @@ public class VoIPService extends Service implements SensorEventListener, AudioMa
|
||||
Intent endIntent = new Intent(this, VoIPActionsReceiver.class);
|
||||
endIntent.setAction(getPackageName() + ".END_CALL");
|
||||
if (groupCall != null) {
|
||||
builder.addAction(R.drawable.ic_call_end_white_24dp, ChatObject.isChannelOrGiga(chat) ? LocaleController.getString("VoipChannelLeaveAlertTitle", R.string.VoipChannelLeaveAlertTitle) : LocaleController.getString("VoipGroupLeaveAlertTitle", R.string.VoipGroupLeaveAlertTitle), PendingIntent.getBroadcast(this, 0, endIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(R.drawable.ic_call_end_white_24dp, ChatObject.isChannelOrGiga(chat) ? LocaleController.getString("VoipChannelLeaveAlertTitle", R.string.VoipChannelLeaveAlertTitle) : LocaleController.getString("VoipGroupLeaveAlertTitle", R.string.VoipGroupLeaveAlertTitle), PendingIntent.getBroadcast(this, 0, endIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE));
|
||||
} else {
|
||||
builder.addAction(R.drawable.ic_call_end_white_24dp, LocaleController.getString("VoipEndCall", R.string.VoipEndCall), PendingIntent.getBroadcast(this, 0, endIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(R.drawable.ic_call_end_white_24dp, LocaleController.getString("VoipEndCall", R.string.VoipEndCall), PendingIntent.getBroadcast(this, 0, endIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE));
|
||||
}
|
||||
builder.setPriority(Notification.PRIORITY_MAX);
|
||||
builder.setShowWhen(false);
|
||||
@ -3315,7 +3315,7 @@ public class VoIPService extends Service implements SensorEventListener, AudioMa
|
||||
FileLog.d("Starting incall activity for incoming call");
|
||||
}
|
||||
try {
|
||||
PendingIntent.getActivity(VoIPService.this, 12345, new Intent(VoIPService.this, LaunchActivity.class).setAction("voip"), 0).send();
|
||||
PendingIntent.getActivity(VoIPService.this, 12345, new Intent(VoIPService.this, LaunchActivity.class).setAction("voip"), PendingIntent.FLAG_MUTABLE).send();
|
||||
} catch (Exception x) {
|
||||
if (BuildVars.LOGS_ENABLED) {
|
||||
FileLog.e("Error starting incall activity", x);
|
||||
|
Loading…
Reference in New Issue
Block a user