Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74f41ae1 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am ca414550: am 67e6070f: Merge "Change method of tracking moving AppWindowTokens." into jb-dev

* commit 'ca414550':
  Change method of tracking moving AppWindowTokens.
parents 1fb5b3d4 ca414550
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -134,10 +134,11 @@ public class WindowAnimator {
    }

    private void updateWindowsAppsAndRotationAnimationsLocked() {
        final ArrayList<AppWindowToken> appTokens = mService.mAnimatingAppTokens;
        int i;
        final int NAT = mService.mAppTokens.size();
        final int NAT = appTokens.size();
        for (i=0; i<NAT; i++) {
            final AppWindowAnimator appAnimator = mService.mAppTokens.get(i).mAppAnimator;
            final AppWindowAnimator appAnimator = appTokens.get(i).mAppAnimator;
            final boolean wasAnimating = appAnimator.animation != null
                    && appAnimator.animation != AppWindowAnimator.sDummyAnimation;
            if (appAnimator.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) {
@@ -401,9 +402,10 @@ public class WindowAnimator {
    private void testTokenMayBeDrawnLocked() {
        // See if any windows have been drawn, so they (and others
        // associated with them) can now be shown.
        final int NT = mService.mAppTokens.size();
        final ArrayList<AppWindowToken> appTokens = mService.mAnimatingAppTokens;
        final int NT = appTokens.size();
        for (int i=0; i<NT; i++) {
            AppWindowToken wtoken = mService.mAppTokens.get(i);
            AppWindowToken wtoken = appTokens.get(i);
            if (wtoken.mAppAnimator.freezingScreen) {
                int numInteresting = wtoken.numInterestingWindows;
                if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
+128 −89

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -841,7 +841,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        }
    }

    /** Returns true if this window desires key events. */
    /** Returns true if this window desires key events.
     * TODO(cmautner): Is this the same as {@link WindowManagerService#canBeImeTarget}
     */
    public final boolean canReceiveKeys() {
        return     isVisibleOrAdding()
                && (mViewVisibility == View.VISIBLE)
+8 −5
Original line number Diff line number Diff line
@@ -403,8 +403,8 @@ class WindowStateAnimator {

    boolean finishDrawingLocked() {
        if (mDrawState == DRAW_PENDING) {
            if (DEBUG_ANIM || SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Slog.v(
                TAG, "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING " + this + " in "
            if (DEBUG_SURFACE_TRACE || DEBUG_ANIM || SHOW_TRANSACTIONS || DEBUG_ORIENTATION)
                Slog.v(TAG, "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING " + this + " in "
                        + mSurface);
            mDrawState = COMMIT_DRAW_PENDING;
            return true;
@@ -417,7 +417,7 @@ class WindowStateAnimator {
        if (mDrawState != COMMIT_DRAW_PENDING) {
            return false;
        }
        if (DEBUG_ANIM)
        if (DEBUG_SURFACE_TRACE || DEBUG_ANIM)
            Slog.i(TAG, "commitFinishDrawingLocked: mDrawState=READY_TO_SHOW " + mSurface);
        mDrawState = READY_TO_SHOW;
        final boolean starting = mWin.mAttrs.type == TYPE_APPLICATION_STARTING;
@@ -504,7 +504,9 @@ class WindowStateAnimator {
        @Override
        public void setWindowCrop(Rect crop) {
            super.setWindowCrop(crop);
            if (crop != null) {
                mWindowCrop.set(crop);
            }
            Slog.v(SURFACE_TAG, "setWindowCrop: " + this + ". Called by "
                    + Debug.getCallers(3));
        }
@@ -1232,7 +1234,8 @@ class WindowStateAnimator {

            // Force the show in the next prepareSurfaceLocked() call.
            mLastAlpha = -1;
            if (DEBUG_ANIM) Slog.v(TAG, "performShowLocked: mDrawState=HAS_DRAWN");
            if (DEBUG_SURFACE_TRACE || DEBUG_ANIM)
                Slog.v(TAG, "performShowLocked: mDrawState=HAS_DRAWN in " + this);
            mDrawState = HAS_DRAWN;
            mService.scheduleAnimationLocked();

+1 −6
Original line number Diff line number Diff line
@@ -71,10 +71,6 @@ class WindowToken {
    // windows will be put to the bottom of the list.
    boolean sendingToBottom;

    // Set to true when this token is in a pending transaction where its
    // windows will be put to the top of the list.
    boolean sendingToTop;

    WindowToken(WindowManagerService _service, IBinder _token, int type, boolean _explicit) {
        service = _service;
        token = _token;
@@ -88,11 +84,10 @@ class WindowToken {
        pw.print(prefix); pw.print("windowType="); pw.print(windowType);
                pw.print(" hidden="); pw.print(hidden);
                pw.print(" hasVisible="); pw.println(hasVisible);
        if (waitingToShow || waitingToHide || sendingToBottom || sendingToTop) {
        if (waitingToShow || waitingToHide || sendingToBottom) {
            pw.print(prefix); pw.print("waitingToShow="); pw.print(waitingToShow);
                    pw.print(" waitingToHide="); pw.print(waitingToHide);
                    pw.print(" sendingToBottom="); pw.print(sendingToBottom);
                    pw.print(" sendingToTop="); pw.println(sendingToTop);
        }
    }