diff options
-rw-r--r-- | java/com/android/dialer/shortcuts/PinnedShortcuts.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/dialer/shortcuts/PinnedShortcuts.java b/java/com/android/dialer/shortcuts/PinnedShortcuts.java index bfcc3df81..6e23a5c21 100644 --- a/java/com/android/dialer/shortcuts/PinnedShortcuts.java +++ b/java/com/android/dialer/shortcuts/PinnedShortcuts.java @@ -46,7 +46,6 @@ import java.util.Map; * <p>When refreshing pinned shortcuts, we check to make sure that pinned contact information is * still up to date (e.g. photo and name). We also check to see if the contact has been deleted from * the user's contacts, and if so, we disable the pinned shortcut. - * */ @TargetApi(VERSION_CODES.N_MR1) // Shortcuts introduced in N MR1 final class PinnedShortcuts { @@ -107,6 +106,14 @@ final class PinnedShortcuts { // setRank is nonsensical for pinned shortcuts and therefore could not be calculated. continue; } + // Exclude shortcuts like the "Phone NUI" shortcut. + String action = null; + if (shortcutInfo.getIntent() != null) { + action = shortcutInfo.getIntent().getAction(); + } + if (action == null || !action.equals("com.android.dialer.shortcuts.CALL_CONTACT")) { + continue; + } String lookupKey = DialerShortcut.getLookupKeyFromShortcutInfo(shortcutInfo); Uri lookupUri = DialerShortcut.getLookupUriFromShortcutInfo(shortcutInfo); |