Commit 274f763f authored by wanglei's avatar wanglei

...

parent 5cb3c820
......@@ -43,7 +43,7 @@ public class NotificationUtil {
}
// Create an Intent for the activity you want to open when the notification is clicked
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
Intent deleteIntent = new Intent(context, CloseNotificationReceiver.class);
......@@ -182,12 +182,12 @@ public class NotificationUtil {
Intent cancelIntent = new Intent(context, CloseNotificationReceiver.class);
cancelIntent.setAction("CANCEL_NOTIFICATION");
cancelIntent.putExtra(CloseNotificationReceiver.id, actionId);
int flag;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
flag = PendingIntent.FLAG_MUTABLE;
} else {
flag = PendingIntent.FLAG_UPDATE_CURRENT;
}
int flag = PendingIntent.FLAG_IMMUTABLE;
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// flag = PendingIntent.FLAG_MUTABLE;
// } else {
// flag = PendingIntent.FLAG_IMMUTABLE;
// }
Intent intent = new Intent(context, NewSplashActivity.class);
intent.putExtra("actionId", actionId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment