summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-10-31 12:26:21 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-31 12:26:21 +0000
commit266d9ad1f87ffe2fd670897b3d053d3857b86ef0 (patch)
tree4ee749d45f8645dcce0f629106ec72ebfe1904a2
parent648fe071d4daea8c3bbd52f4987f31f3f3995182 (diff)
parentf0fd595f0f3203fb81cb39a367b2a06647db907d (diff)
downloadframeworks_base-266d9ad1f87ffe2fd670897b3d053d3857b86ef0.zip
frameworks_base-266d9ad1f87ffe2fd670897b3d053d3857b86ef0.tar.gz
frameworks_base-266d9ad1f87ffe2fd670897b3d053d3857b86ef0.tar.bz2
am f0fd595f: Merge "Hide ime switcher when the screen is turned off." into ics-mr1
* commit 'f0fd595f0f3203fb81cb39a367b2a06647db907d': Hide ime switcher when the screen is turned off.
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 03d6b41..17ea03b 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -374,6 +374,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mScreenOn = true;
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
mScreenOn = false;
+ setImeWindowVisibilityStatusHiddenLocked();
} else if (intent.getAction().equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
hideInputMethodMenu();
return;
@@ -468,8 +469,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
// Uh oh, current input method is no longer around!
// Pick another one...
Slog.i(TAG, "Current input method removed: " + curInputMethodId);
- mImeWindowVis = 0;
- updateImeWindowStatusLocked();
+ setImeWindowVisibilityStatusHiddenLocked();
if (!chooseNewDefaultIMELocked()) {
changed = true;
curIm = null;
@@ -625,7 +625,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
}
- void updateImeWindowStatusLocked() {
+ private void setImeWindowVisibilityStatusHiddenLocked() {
+ mImeWindowVis = 0;
+ updateImeWindowStatusLocked();
+ }
+
+ private void updateImeWindowStatusLocked() {
setImeWindowStatus(mCurToken, mImeWindowVis, mBackDisposition);
}
@@ -999,8 +1004,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
sessionState.session.finishSession();
} catch (RemoteException e) {
Slog.w(TAG, "Session failed to close due to remote exception", e);
- mImeWindowVis = 0;
- updateImeWindowStatusLocked();
+ setImeWindowVisibilityStatusHiddenLocked();
}
}
}
@@ -1395,13 +1399,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
if (DEBUG) Slog.w(TAG, "Ignoring hideSoftInput of uid "
+ uid + ": " + client);
- mImeWindowVis = 0;
- updateImeWindowStatusLocked();
+ setImeWindowVisibilityStatusHiddenLocked();
return false;
}
} catch (RemoteException e) {
- mImeWindowVis = 0;
- updateImeWindowStatusLocked();
+ setImeWindowVisibilityStatusHiddenLocked();
return false;
}
}