fix data race condition BUG: 25819358 am: 2242b4d2bd
am: 1dbb0355dc
* commit '1dbb0355dc89a9f878365ee793ec48f6cb0b1426':
fix data race condition BUG: 25819358
This commit is contained in:
@@ -1289,10 +1289,11 @@ public class NotificationManagerService extends SystemService {
|
||||
Binder.getCallingUid(), incomingUserId, true, false,
|
||||
"getAppActiveNotifications", pkg);
|
||||
|
||||
final int N = mNotificationList.size();
|
||||
final ArrayList<StatusBarNotification> list = new ArrayList<StatusBarNotification>(N);
|
||||
final ArrayList<StatusBarNotification> list
|
||||
= new ArrayList<StatusBarNotification>(mNotificationList.size());
|
||||
|
||||
synchronized (mNotificationList) {
|
||||
final int N = mNotificationList.size();
|
||||
for (int i = 0; i < N; i++) {
|
||||
final StatusBarNotification sbn = mNotificationList.get(i).sbn;
|
||||
if (sbn.getPackageName().equals(pkg) && sbn.getUserId() == userId) {
|
||||
|
||||
Reference in New Issue
Block a user