kopia lustrzana https://github.com/ryukoposting/Signal-Android
Start call service as foreground for notification actions.
rodzic
b8cbcfe986
commit
2218fc0d41
|
@ -112,7 +112,8 @@ public class CallNotificationBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static NotificationCompat.Action getServiceNotificationAction(Context context, Intent intent, int iconResId, int titleResId) {
|
private static NotificationCompat.Action getServiceNotificationAction(Context context, Intent intent, int iconResId, int titleResId) {
|
||||||
PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0);
|
PendingIntent pendingIntent = Build.VERSION.SDK_INT >= 26 ? PendingIntent.getForegroundService(context, 0, intent, 0)
|
||||||
|
: PendingIntent.getService(context, 0, intent, 0);
|
||||||
|
|
||||||
return new NotificationCompat.Action(iconResId, context.getString(titleResId), pendingIntent);
|
return new NotificationCompat.Action(iconResId, context.getString(titleResId), pendingIntent);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue