Skip to content

Commit 175609b

Browse files
committed
fix(IntentService): use FLAG_MUTABLE
1 parent 93dad42 commit 175609b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/org/glpi/inventory/agent/service/InventoryService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private void startMyOwnForeground(){
129129
//create intent to redirect user to app on click
130130
Intent appIntent = new Intent(getApplicationContext(), ActivityMain.class);
131131
appIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
132-
PendingIntent appIntentRedirect = PendingIntent.getActivity(getApplicationContext(), 0, appIntent, 0);
132+
PendingIntent appIntentRedirect = PendingIntent.getActivity(getApplicationContext(), 0, appIntent, PendingIntent.FLAG_MUTABLE);
133133

134134

135135
//create inent to invite user to disable notification
@@ -139,7 +139,7 @@ private void startMyOwnForeground(){
139139
notificationIntent.putExtra("app_uid", getApplicationInfo().uid);
140140
notificationIntent.putExtra("android.provider.extra.APP_PACKAGE", getPackageName());
141141
PendingIntent notificationIntentRedirect = PendingIntent.getActivity(getApplicationContext(), 0,
142-
notificationIntent, 0);
142+
notificationIntent, PendingIntent.FLAG_MUTABLE);
143143

144144
//create notification
145145
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID);

0 commit comments

Comments
 (0)