Skip to content

Commit 847b122

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Fix problems with IME layers." into jb-mr1-dev
2 parents bb5f014 + e6f7d50 commit 847b122

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,12 +1210,9 @@ int findDesiredInputMethodWindowIndexLocked(boolean willMove) {
12101210
final WindowState curTarget = mInputMethodTarget;
12111211
if (curTarget != null && w != null
12121212
&& curTarget.isDisplayedLw()
1213-
&& curTarget.mExiting) {
1214-
if (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer) {
1215-
w = curTarget;
1216-
i = windows.indexOf(w);
1217-
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, switching to: " + w);
1218-
}
1213+
&& (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) {
1214+
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, not changing");
1215+
return windows.indexOf(curTarget) + 1;
12191216
}
12201217

12211218
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Desired input method target="
@@ -4184,6 +4181,7 @@ public void executeAppTransition() {
41844181
}
41854182
}
41864183

4184+
@Override
41874185
public void setAppStartingWindow(IBinder token, String pkg,
41884186
int theme, CompatibilityInfo compatInfo,
41894187
CharSequence nonLocalizedLabel, int labelRes, int icon,

services/java/com/android/server/wm/WindowState.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,18 +788,21 @@ boolean isReadyForDisplayIgnoringKeyguard() {
788788
* Like isOnScreen, but returns false if the surface hasn't yet
789789
* been drawn.
790790
*/
791+
@Override
791792
public boolean isDisplayedLw() {
792793
final AppWindowToken atoken = mAppToken;
793794
return isDrawnLw() && mPolicyVisibility
794795
&& ((!mAttachedHidden &&
795796
(atoken == null || !atoken.hiddenRequested))
796-
|| mWinAnimator.mAnimating);
797+
|| mWinAnimator.mAnimating
798+
|| (atoken != null && atoken.mAppAnimator.animation != null));
797799
}
798800

799801
/**
800802
* Return true if this window (or a window it is attached to, but not
801803
* considering its app token) is currently animating.
802804
*/
805+
@Override
803806
public boolean isAnimatingLw() {
804807
return mWinAnimator.mAnimation != null;
805808
}

0 commit comments

Comments
 (0)