Fix pending intent links

Test: manual
Fixes: 154795795
Change-Id: Ia870bd0bfd90be852121b542100806cac5bac881
(cherry picked from commit 97894bcfb70ec0a90693d7634f2a49fc91bf2562)
diff --git a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
index de12847..ac39f88 100644
--- a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
+++ b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
@@ -108,7 +108,7 @@
                                 : NotificationHistoryActivity.NotificationHistoryEvent
                                 .NOTIFICATION_HISTORY_RECENT_ITEM_CLICK,
                         uid, pkg, instanceId, position);
-                if (pi != null) {
+                if (pi != null && isPendingIntentValid) {
                     try {
                         pi.send();
                     } catch (PendingIntent.CanceledException e) {