summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Griff Hazen <griff@google.com> 2016-03-25 18:16:46 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-25 18:16:47 +0000
commit3b67c0bda8b3d39db764ebe18cb76360b0bd4ad6 (patch)
treee5044b7731ffccb4320cdb758462914f08a6bd5b
parentb63188de43c57174cccc1dc4c9b1df94828047e0 (diff)
parent6090c265e5703601e197b41c3caa49749b510411 (diff)
Merge "Fix a status bar NPE in InputMethodManagerService" into nyc-dev
-rw-r--r--services/core/java/com/android/server/InputMethodManagerService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 898d5b73b8d6..e04248303c20 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -215,7 +215,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
// Ongoing notification
private NotificationManager mNotificationManager;
private KeyguardManager mKeyguardManager;
- private StatusBarManagerService mStatusBar;
+ private @Nullable StatusBarManagerService mStatusBar;
private Notification.Builder mImeSwitcherNotification;
private PendingIntent mImeSwitchPendingIntent;
private boolean mShowOngoingImeSwitcherForPhones;
@@ -1070,7 +1070,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mKeyguardManager = mContext.getSystemService(KeyguardManager.class);
mNotificationManager = mContext.getSystemService(NotificationManager.class);
mStatusBar = statusBar;
- statusBar.setIconVisibility(mSlotIme, false);
+ if (mStatusBar != null) {
+ mStatusBar.setIconVisibility(mSlotIme, false);
+ }
updateSystemUiLocked(mCurToken, mImeWindowVis, mBackDisposition);
mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
com.android.internal.R.bool.show_ongoing_ime_switcher);