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

Commit e05040d5 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Fixed flicker on activity transition in docked stack."

parents 43d846ae e471be67
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -368,11 +368,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree

    @Override
    boolean isVisible() {
        if (hidden) {
            // TODO: Should this be checking hiddenRequested instead of hidden?
            return false;
        }
        return super.isVisible();
        // If the app token isn't hidden then it is considered visible and there is no need to check
        // its children windows to see if they are visible.
        return !hidden;
    }

    @Override
+16 −1
Original line number Diff line number Diff line
@@ -1302,7 +1302,22 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    @Override
    boolean isVisible() {
        if ((mAppToken == null || !mAppToken.hiddenRequested) && isVisibleUnchecked()) {
        // TODO: The check for hiddenRequested is commented out below, because the window can still
        // be visible on screen when the flag is true. We would like the isVisible() method to
        // return an answer closer to if the window is truly visible (can't be an exact answer
        // without checking the surface state), so comment out the check for now so we can test to
        // see what problem it causes.
        // If it doesn't cause any issues, then we can remove just before we lock down the current
        // release (O) and also consolidate this method with #isVisibleUnchecked() and possibly
        // other methods like isVisibleNow().
        // If it does cause problems, then we can look if there are other ways to solve the problem.
        // If there isn't then uncomment and document here why it is needed.
        if (/*(mAppToken == null || !mAppToken.hiddenRequested) && */isVisibleUnchecked()
            // TODO: The window isn't considered visible when the token is hidden, however
            // uncommenting the check below breaks the visual transition from an app to the launcher
            // if the home buttons is pressed. Need to investigate an fix that issue before
            // uncommenting.
            /* && !mToken.hidden*/) {
            // Is this window visible?  It is not visible if there is no surface, or we are in the
            // process of running an exit animation that will remove the surface, or its app token
            // has been hidden.