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

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

Merge "fix(force invert): fix app not redrawing when Force Invert enabled" into main

parents 005926f0 b178c342
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -2064,9 +2064,13 @@ public final class ViewRootImpl implements ViewParent,
        if (mAttachInfo.mThreadedRenderer == null) return;
        if (mAttachInfo.mThreadedRenderer.setForceDark(determineForceDarkType())) {
            // TODO: Don't require regenerating all display lists to apply this setting
            if (forceInvertColor()) {
                destroyAndInvalidate();
            } else {
                invalidateWorld(mView);
            }
        }
    }
    @UnsupportedAppUsage
    public View getView() {
@@ -11911,13 +11915,21 @@ public final class ViewRootImpl implements ViewParent,
        public void onHighTextContrastStateChanged(boolean enabled) {
            ThreadedRenderer.setHighContrastText(enabled);
            // Destroy Displaylists so they can be recreated with high contrast recordings
            destroyAndInvalidate();
        }
    }
    /**
     * Destroy Displaylists so they can be recreated with new recordings, in case you are changing
     * the way things are rendered (e.g. high contrast, force dark), then invalidate to trigger a
     * redraw.
     */
    private void destroyAndInvalidate() {
        destroyHardwareResources();
        // Schedule redraw, which will rerecord + redraw all text
        invalidate();
    }
    }
    /**
     * This class is an interface this ViewAncestor provides to the