Update the 'is valid contentIntent' check
Existing check required that the original request code be 0,
but that's not actually required for the intent to work on this
page
Test: tap on email notification in history, be brought to email
page and not main email list page
Fixes: 232495202
Change-Id: I120022535ddbde19003f2db6f1b81a983d00789d
diff --git a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
index 166ee5d..1a703eb 100644
--- a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
+++ b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
@@ -98,9 +98,7 @@
boolean isSnoozed, UiEventLogger uiEventLogger) {
Intent appIntent = itemView.getContext().getPackageManager()
.getLaunchIntentForPackage(pkg);
- boolean isPendingIntentValid = pi != null && PendingIntent.getActivity(
- itemView.getContext(), 0, pi.getIntent(),
- PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_NO_CREATE) != null;
+ boolean isPendingIntentValid = pi != null && pi.isActivity();
if (isPendingIntentValid || appIntent != null) {
itemView.setOnClickListener(v -> {
uiEventLogger.logWithInstanceIdAndPosition(