VibrationSettings: add synchronized control for access of mProcStatesCache
// exception caused by concurrent access of mProcStatesCache
java.lang.ArrayIndexOutOfBoundsException: src.length=95 srcPos=-39 dst.length=95 dstPos=-38 length=93
at java.lang.System.arraycopy(System.java:637)
at com.android.internal.util.GrowingArrayUtils.insert(GrowingArrayUtils.java:155)
at android.util.SparseArray.put(SparseArray.java:280)
at com.android.server.vibrator.VibrationSettings$UidObserver.onUidStateChanged(VibrationSettings.java:736)
at com.android.server.am.UidObserverController.dispatchUidsChangedForObserver(UidObserverController.java:332)
at com.android.server.am.UidObserverController.dispatchUidsChanged(UidObserverController.java:207)
at com.android.server.am.UidObserverController$$ExternalSyntheticLambda0.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
at com.android.server.UiThread.run(UiThread.java:45)
Change-Id: Ie81c7deb617123ad427f8970d66d5fa0da3e723d
Signed-off-by: wumin3 <wumin3@xiaomi.com>
Loading
Please register or sign in to comment