Merge "Fix problems with IME layers." into jb-mr1-dev

This commit is contained in:
Craig Mautner
2012-10-08 12:28:23 -07:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 7 deletions

View File

@@ -1210,12 +1210,9 @@ public class WindowManagerService extends IWindowManager.Stub
final WindowState curTarget = mInputMethodTarget;
if (curTarget != null && w != null
&& curTarget.isDisplayedLw()
&& curTarget.mExiting) {
if (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer) {
w = curTarget;
i = windows.indexOf(w);
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, switching to: " + w);
}
&& (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) {
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, not changing");
return windows.indexOf(curTarget) + 1;
}
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Desired input method target="
@@ -4184,6 +4181,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
@Override
public void setAppStartingWindow(IBinder token, String pkg,
int theme, CompatibilityInfo compatInfo,
CharSequence nonLocalizedLabel, int labelRes, int icon,

View File

@@ -788,18 +788,21 @@ final class WindowState implements WindowManagerPolicy.WindowState {
* Like isOnScreen, but returns false if the surface hasn't yet
* been drawn.
*/
@Override
public boolean isDisplayedLw() {
final AppWindowToken atoken = mAppToken;
return isDrawnLw() && mPolicyVisibility
&& ((!mAttachedHidden &&
(atoken == null || !atoken.hiddenRequested))
|| mWinAnimator.mAnimating);
|| mWinAnimator.mAnimating
|| (atoken != null && atoken.mAppAnimator.animation != null));
}
/**
* Return true if this window (or a window it is attached to, but not
* considering its app token) is currently animating.
*/
@Override
public boolean isAnimatingLw() {
return mWinAnimator.mAnimation != null;
}