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

Commit 7dc3a07b authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Remove previous workaround for setColorMode to WCG" into udc-qpr-dev...

Merge "Remove previous workaround for setColorMode to WCG" into udc-qpr-dev am: 50191e74 am: a0bb573b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23708723



Change-Id: Iab6bd21060ec7856f7fa7b7bca02639ca7c874bd
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents efdcaefb a0bb573b
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@ import static android.os.Build.VERSION_CODES.O;
import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
import static android.os.Process.SYSTEM_UID;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.COLOR_MODE_DEFAULT;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.Surface.ROTATION_270;
import static android.view.Surface.ROTATION_90;
@@ -4703,26 +4702,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    }

    /**
     * @return Whether we are allowed to show non-starting windows at the moment. We disallow
     *         showing windows while the transition animation is playing in case we have windows
     *         that have wide-color-gamut color mode set to avoid jank in the middle of the
     *         animation.
     * @return Whether we are allowed to show non-starting windows at the moment.
     */
    boolean canShowWindows() {
        final boolean drawn = mTransitionController.isShellTransitionsEnabled()
        return mTransitionController.isShellTransitionsEnabled()
                ? mSyncState != SYNC_STATE_WAITING_FOR_DRAW : allDrawn;
        final boolean animating = mTransitionController.isShellTransitionsEnabled()
                ? mTransitionController.inPlayingTransition(this)
                : isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION);
        return drawn && !(animating && hasNonDefaultColorWindow());
    }

    /**
     * @return true if we have a window that has a non-default color mode set; false otherwise.
     */
    private boolean hasNonDefaultColorWindow() {
        return forAllWindows(ws -> ws.mAttrs.getColorMode() != COLOR_MODE_DEFAULT,
                true /* topToBottom */);
    }

    @Override