[WallpaperManagerService] java.lang.ArrayIndexOutOfBoundsException--Array index out of range: 0
[RootCause]:
1. attachServiceLocked() calls the forEachDisplayConnector() method to traverse the SparseArray, and then executes the connectLocked() method
2. Due to DeadObjectException, the connectLocked() method is executed and the detachWallpaperLocked() method is called according to the logic
3. Then wallpaper.connection.mDisplayConnector.clear() is executed;
4. After that, the size becomes 0, and forEachDisplayConnector reports ArrayIndexOutOfBoundsException when traversing the next element
Details: issue number:428643555
[Modify]:
Re-obtain size() before each access to ensure the index is valid
[Test]
UAT stability
Flag: EXEMPT trivial fix
Bug: 428643555
Test: presubmit
Change-Id: Id5751f9c64bf70f4f779dcb34a50d8a3b6f8eb9a
Signed-off-by:
huwenbin1 <huwenbin1@xiaomi.com>
Loading
Please register or sign in to comment