From 8ac7f2134cc34e8be20049aad50761aef41039d0 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Thu, 5 May 2016 10:03:09 -0700 Subject: [PATCH] Fix reboot loop when "password to boot" is enabled on ... a non english locale. Bug 28607673 Change-Id: I316f348305238616e8254bb878b66099015a3793 --- .../java/com/android/server/am/ActivityManagerService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 2c46fbf866fc1..94118e62b495b 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -18220,8 +18220,11 @@ public final class ActivityManagerService extends ActivityManagerNative // Tell the shortcut manager that the system locale changed. It needs to know // it before any other apps receive ACTION_LOCALE_CHANGED, which is why // we "push" from here, rather than having the service listen to the broadcast. - LocalServices.getService(ShortcutServiceInternal.class) - .onSystemLocaleChangedNoLock(); + final ShortcutServiceInternal shortcutService = + LocalServices.getService(ShortcutServiceInternal.class); + if (shortcutService != null) { + shortcutService.onSystemLocaleChangedNoLock(); + } intent = new Intent(Intent.ACTION_LOCALE_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);