From 24c9ed390038df1122482a2514d1073a250bfee7 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Fri, 21 Apr 2017 16:32:55 -0700 Subject: [PATCH] Do not deliver INSTALL_SHORTCUT. (And pretend it succeeded.) Test: manual test with Hangouts and Nova. Bug 37511844 Change-Id: Ie6453bc1bd40d6e5874ca14ed6a49f9e3378d182 --- .../java/com/android/server/am/ActivityManagerService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 98b31c0c5860d..9f96d69a398e9 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -19121,6 +19121,12 @@ public class ActivityManagerService extends IActivityManager.Stub case android.security.KeyChain.ACTION_TRUST_STORE_CHANGED: mHandler.sendEmptyMessage(HANDLE_TRUST_STORAGE_UPDATE_MSG); break; + case "com.android.launcher.action.INSTALL_SHORTCUT": + // As of O, we no longer support this broadcasts, even for pre-O apps. + // Apps should now be using ShortcutManager.pinRequestShortcut(). + Log.w(TAG, "Broadcast " + action + + " no longer supported. It will not be delivered."); + return ActivityManager.BROADCAST_SUCCESS; } if (Intent.ACTION_PACKAGE_ADDED.equals(action) ||