From b5dd049089a8c62efea445be9abd1f476fbf1ab9 Mon Sep 17 00:00:00 2001 From: Muyuan Li Date: Thu, 14 Apr 2016 13:22:20 -0700 Subject: [PATCH] Fixes a bug in shortcut key. All shortcut keys that are dispatched to listeners will be checked against user provisioning status. Only if user setup is complete will the listeners receive shortcut keys. Bug: 28192375 Change-Id: Iecc5a21a40d07bdc4f71d1a36187cca4a5b30bde (cherry picked from commit f0667f077f66ba3e58387f7570dd82a26aaed7b8) --- .../java/com/android/server/policy/PhoneWindowManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index d8c0775d51013..f6f401af1b110 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -3396,7 +3396,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { IShortcutService shortcutService = mShortcutKeyServices.get(shortcutCode); if (shortcutService != null) { try { - shortcutService.notifyShortcutKeyPressed(shortcutCode); + if (isUserSetupComplete()) { + shortcutService.notifyShortcutKeyPressed(shortcutCode); + } } catch (RemoteException e) { mShortcutKeyServices.delete(shortcutCode); }