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

Commit 81d457f7 authored by shawnlin's avatar shawnlin Committed by Shawn Lin
Browse files

Fix ConcurrentModificationException when addTunable

Calls to addTunnable() in systemui are all in mainExecutor, we should
also use it in ScreenDecorations to prevent concurrent issue.

Bug: 199385132
Test: atest ScreenDecorationsTest
Change-Id: Idb8c3800c1bf222f57e212a89c6466367aa5d818
parent 35f5342a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable {
            mDisplayManager.getDisplay(DEFAULT_DISPLAY).getMetrics(metrics);
            mDensity = metrics.density;

            mExecutor.execute(() -> mTunerService.addTunable(this, SIZE));
            mMainExecutor.execute(() -> mTunerService.addTunable(this, SIZE));

            // Watch color inversion and invert the overlay as needed.
            if (mColorInversionSetting == null) {