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

Commit d8bdc45e authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove unused deferClearAllDrawn

The flag was added in commit 7636dfbc and the only read
was removed in commit f5f9e121 (version P, 2 years ago).

Also correct the dump format of activity record.

Test: presubmit
Bug: 139522754
Change-Id: Ie81bf5c758e1c537994ddded937c4ace10ef86ab
parent 35fc4484
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -620,10 +620,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    // TODO: Make this final
    int mTargetSdk;

    // Set to true when this app creates a surface while in the middle of an animation. In that
    // case do not clear allDrawn until the animation completes.
    boolean deferClearAllDrawn;

    // Is this window's surface needed?  This is almost like visible, except
    // it will sometimes be true a little earlier: when the activity record has
    // been shown, but is still waiting for its app transition to execute
@@ -771,10 +767,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                        pw.print(" primaryColor=");
                        pw.println(Integer.toHexString(taskDescription.getPrimaryColor()));
                        pw.print(prefix + " backgroundColor=");
                        pw.println(Integer.toHexString(taskDescription.getBackgroundColor()));
                        pw.print(prefix + " statusBarColor=");
                        pw.println(Integer.toHexString(taskDescription.getStatusBarColor()));
                        pw.print(prefix + " navigationBarColor=");
                        pw.print(Integer.toHexString(taskDescription.getBackgroundColor()));
                        pw.print(" statusBarColor=");
                        pw.print(Integer.toHexString(taskDescription.getStatusBarColor()));
                        pw.print(" navigationBarColor=");
                        pw.println(Integer.toHexString(taskDescription.getNavigationBarColor()));
            }
        }
@@ -847,14 +843,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            pw.println(requestedVrComponent);
        }
        super.dump(pw, prefix, dumpAll);
        pw.print(" visible="); pw.print(mVisible);
        if (appToken != null) {
            pw.println(prefix + "app=true mVoiceInteraction=" + mVoiceInteraction);
        if (mVoiceInteraction) {
            pw.println(prefix + "mVoiceInteraction=true");
        }
        pw.print(prefix); pw.print("mOccludesParent="); pw.print(mOccludesParent);
        pw.print(" mOrientation="); pw.println(mOrientation);
        pw.println(prefix + "mVisibleRequested=" + mVisibleRequested
                + " mClientVisible=" + mClientVisible
                + " mVisible=" + mVisible + " mClientVisible=" + mClientVisible
                + ((mDeferHidingClient) ? " mDeferHidingClient=" + mDeferHidingClient : "")
                + " reportedDrawn=" + reportedDrawn + " reportedVisible=" + reportedVisible);
        if (paused) {
@@ -3234,7 +3229,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                // to move that animation to the new one.
                if (fromActivity.allDrawn) {
                    allDrawn = true;
                    deferClearAllDrawn = fromActivity.deferClearAllDrawn;
                }
                if (fromActivity.firstWindowDrawn) {
                    firstWindowDrawn = true;
@@ -3718,7 +3712,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    void clearAllDrawn() {
        allDrawn = false;
        deferClearAllDrawn = false;
    }

    /**
+0 −1
Original line number Diff line number Diff line
@@ -389,7 +389,6 @@ public class AppTransitionController {
            // this guy's animations regardless of whether it's
            // gotten drawn.
            wtoken.allDrawn = true;
            wtoken.deferClearAllDrawn = false;
            // Ensure that apps that are mid-starting are also scheduled to have their
            // starting windows removed after the animation is complete
            if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
+0 −4
Original line number Diff line number Diff line
@@ -439,10 +439,6 @@ class WindowStateAnimator {

        if (!mWin.mActivityRecord.isAnimating(TRANSITION)) {
            mWin.mActivityRecord.clearAllDrawn();
        } else {
            // Currently animating, persist current state of allDrawn until animation
            // is complete.
            mWin.mActivityRecord.deferClearAllDrawn = true;
        }
    }

+3 −2
Original line number Diff line number Diff line
@@ -280,10 +280,11 @@ class WindowToken extends WindowContainer<WindowState> {
        super.dump(pw, prefix, dumpAll);
        pw.print(prefix); pw.print("windows="); pw.println(mChildren);
        pw.print(prefix); pw.print("windowType="); pw.print(windowType);
                pw.print(" hasVisible="); pw.println(hasVisible);
                pw.print(" hasVisible="); pw.print(hasVisible);
        if (waitingToShow) {
            pw.print(prefix); pw.print("waitingToShow="); pw.print(waitingToShow);
            pw.print(" waitingToShow=true");
        }
        pw.println();
    }

    @Override