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

Commit 489565ad authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add visibility reason to ViewRootImpl draw logs" into main

parents e799629d 711055aa
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -2790,11 +2790,27 @@ public final class ViewRootImpl implements ViewParent,
    public void bringChildToFront(View child) {
    }
    // keep in sync with getHostVisibilityReason
    int getHostVisibility() {
        return mView != null && (mAppVisible || mForceDecorViewVisibility)
                ? mView.getVisibility() : View.GONE;
    }
    String getHostVisibilityReason() {
        if (mView == null) {
            return "mView is null";
        }
        if (!mAppVisible && !mForceDecorViewVisibility) {
            return "!mAppVisible && !mForceDecorViewVisibility";
        }
        switch (mView.getVisibility()) {
            case View.VISIBLE: return "View.VISIBLE";
            case View.GONE: return "View.GONE";
            case View.INVISIBLE: return "View.INVISIBLE";
            default: return "";
        }
    }
    /**
     * Add LayoutTransition to the list of transitions to be started in the next traversal.
     * This list will be cleared after the transitions on the list are start()'ed. These
@@ -3346,6 +3362,7 @@ public final class ViewRootImpl implements ViewParent,
        int desiredWindowHeight;
        final int viewVisibility = getHostVisibility();
        final String viewVisibilityReason = getHostVisibilityReason();
        final boolean viewVisibilityChanged = !mFirst
                && (mViewVisibility != viewVisibility || mNewSurfaceNeeded
                // Also check for possible double visibility update, which will make current
@@ -4220,7 +4237,7 @@ public final class ViewRootImpl implements ViewParent,
        if (!isViewVisible) {
            if (mLastTraversalWasVisible) {
                logAndTrace("Not drawing due to not visible");
                logAndTrace("Not drawing due to not visible. Reason=" + viewVisibilityReason);
            }
            mLastPerformTraversalsSkipDrawReason = "view_not_visible";
            if (mPendingTransitions != null && mPendingTransitions.size() > 0) {