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

Commit 789aff81 authored by Shai Barack's avatar Shai Barack Committed by Android Build Coastguard Worker
Browse files

Always postInvalidateOnAnimation from awakenScrollBars

This fixes a performance regression.
See analysis on b/420829149.

Bug: 420829149
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fd9387dbf9e80cda0a79ced08bd856fa5bebdffb)
Merged-In: Iddc01cbb2138615ea28631991bc6b415e5aa3020
Change-Id: Iddc01cbb2138615ea28631991bc6b415e5aa3020
parent 7da508ad
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -21142,6 +21142,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (isHorizontalScrollBarEnabled() || isVerticalScrollBarEnabled()) {
            if (invalidate) {
                // Invalidate to show the scrollbars
                postInvalidateOnAnimation();
            }
            if (scrollCache.state == ScrollabilityCache.OFF) {
                // FIXME: this is copied from WindowManagerService.
                // We should get this value from the system when it
@@ -21157,18 +21162,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            scrollCache.state = ScrollabilityCache.ON;
            // Schedule our fader to run if it's not already scheduled
            if (!scrollCache.fadeScrollBarsScheduled) {
                if (invalidate) {
                    // Invalidate to show the scrollbars
                    postInvalidateOnAnimation();
                }
                if (mAttachInfo != null) {
            if (!scrollCache.fadeScrollBarsScheduled && mAttachInfo != null) {
                final Handler handler = mAttachInfo.mHandler;
                scrollCache.handler = handler;
                scrollCache.fadeScrollBarsScheduled = true;
                handler.postAtTime(scrollCache, fadeStartTime);
            }
            }
            return true;
        }