Skip to content

Commit bfbf6e1

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Fix IME tile related crash" into jb-mr1-dev
2 parents ff70848 + aca0c75 commit bfbf6e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public void startObserving() {
184184
private State mLocationState = new State();
185185

186186
private QuickSettingsTileView mImeTile;
187-
private RefreshCallback mImeCallback;
187+
private RefreshCallback mImeCallback = null;
188188
private State mImeState = new State();
189189

190190
private QuickSettingsTileView mRotationLockTile;
@@ -551,7 +551,9 @@ void onImeWindowStatusChanged(boolean visible) {
551551
mImeState.enabled = (visible && needsToShowImeSwitchOngoingNotification(imm));
552552
mImeState.label = getCurrentInputMethodName(mContext, mContext.getContentResolver(),
553553
imm, imis, mContext.getPackageManager());
554-
mImeCallback.refreshView(mImeTile, mImeState);
554+
if (mImeCallback != null) {
555+
mImeCallback.refreshView(mImeTile, mImeState);
556+
}
555557
}
556558
private static String getCurrentInputMethodName(Context context, ContentResolver resolver,
557559
InputMethodManager imm, List<InputMethodInfo> imis, PackageManager pm) {

0 commit comments

Comments
 (0)