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

Commit e7c28572 authored by John Spurlock's avatar John Spurlock
Browse files

Optimize sysui ui queue during keyguard unlock.

Target the two biggest offenders:
 - Coalesce keyguard setHidden(false) calls during unlock.
 - Make sysui->WM call async.

Found during investigation into b/11221659.

Bug: 11221659
Change-Id: Icab48376bc356a933e0f9940bc2f924e2e77ab22
parent 2b5297a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ interface IWindowManager
    /**
     * Called by the status bar to notify Views of changes to System UI visiblity.
     */
    void statusBarVisibilityChanged(int visibility);
    oneway void statusBarVisibilityChanged(int visibility);

    /**
     * Block until the given window has been drawn to the screen.
+5 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ public class KeyguardService extends Service {
    }

    private final IKeyguardService.Stub mBinder = new IKeyguardService.Stub() {
        private boolean mSetHiddenCalled;
        private boolean mIsHidden;
        public boolean isShowing() {
            return mKeyguardViewMediator.isShowing();
        }
@@ -89,7 +91,10 @@ public class KeyguardService extends Service {
        }
        public void setHidden(boolean isHidden) {
            checkPermission();
            if (mSetHiddenCalled && mIsHidden == isHidden) return;
            mKeyguardViewMediator.setHidden(isHidden);
            mSetHiddenCalled = true;
            mIsHidden = isHidden;
        }
        public void dismiss() {
            mKeyguardViewMediator.dismiss();