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

Commit 64141a96 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Prevent recomputeDisableFlags from clobbering the system disable flags"...

Merge "Prevent recomputeDisableFlags from clobbering the system disable flags" into sc-v2-dev am: 27cef855 am: 6fafaf44

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16307531

Change-Id: I2e33dd32725efa2a51780c10b10981bc1f0284b9
parents 3c667652 6fafaf44
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -533,10 +533,14 @@ public class CommandQueue extends IStatusBar.Stub implements
     * @param animate {@code true} to show animations.
     */
    public void recomputeDisableFlags(int displayId, boolean animate) {
        // This must update holding the lock otherwise it can clobber the disabled flags set on the
        // binder thread from the disable() call
        synchronized (mLock) {
            int disabled1 = getDisabled1(displayId);
            int disabled2 = getDisabled2(displayId);
            disable(displayId, disabled1, disabled2, animate);
        }
    }

    private void setDisabled(int displayId, int disabled1, int disabled2) {
        mDisplayDisabled.put(displayId, new Pair<>(disabled1, disabled2));