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

Commit 37fd8c29 authored by Luntao Wang's avatar Luntao Wang
Browse files

[Bugfix] Fix array out of bounds.

Problem:
JE caused by multi-threaded operation of WindowList.

Solution:
Lock to prevent array out of bounds.

Bug: 288065262
Test: Manual && Monkey Test
Change-Id: Idd58f5c74444e93758f89133779f2076f95f1725
parent 00e1235f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -549,8 +549,8 @@ public class TaskPersister implements PersisterQueue.Listener {
            // Write out one task.
            byte[] data = null;
            Task task = mTask;
            if (DEBUG) Slog.d(TAG, "Writing task=" + task);
            synchronized (mService.mGlobalLock) {
                if (DEBUG) Slog.d(TAG, "Writing task=" + task);
                if (task.inRecents) {
                    // Still there.
                    try {