diff options
| author | 2021-12-24 12:12:54 +0800 | |
|---|---|---|
| committer | 2021-12-27 06:02:23 +0000 | |
| commit | 81d457f7820fc9dc6ca28a2d3796d1134908bb1c (patch) | |
| tree | 51b4716ef3bbeea9c264607f91a66790057791e6 | |
| parent | 35f5342aaf81906824672808ffdd8d4561b6dc93 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index 33538ec25fcd..a100cb8caf98 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -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) { |