Skip to content
Commit 1d9b8054 authored by Hyangseok Chae's avatar Hyangseok Chae Committed by Julia Reynolds
Browse files

Fix a missing synchronization to Notification

Concurrent access on allPendingIntents could cause
crash by ArrayIndexOutOfBoundsException.
Below two accesses can occur in two different threads.
But allPendingIntents(ArraySet) is not thread-safe.
1. Access to write.
   allPendingIntents = new ArraySet<>();
   parcel.writeArraySet(allPendingIntents)
2. Access to add.
   allPendingIntents.add(intent);

So, we added missing synchronization to Notification

Test:
It is hard to reproduce by manual.
Make/Update notification with pendingintent.

Change-Id: Ib866f6b92528f7a944ac93997a9cff07892d4192
Bugs: 144081764
parent 5fdaa0c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment