Don't iterate over a list items are removed from.
Change-Id: I896cd4578da15e21d422ca8db42e34bbd10912e8 Fixes: 29512540
This commit is contained in:
@@ -3898,7 +3898,9 @@ public class NotificationManagerService extends SystemService {
|
|||||||
@Override
|
@Override
|
||||||
public void onUserSwitched(int user) {
|
public void onUserSwitched(int user) {
|
||||||
synchronized (mNotificationList) {
|
synchronized (mNotificationList) {
|
||||||
for (ManagedServiceInfo info : mServices) {
|
int i = mServices.size()-1;
|
||||||
|
while (i --> 0) {
|
||||||
|
final ManagedServiceInfo info = mServices.get(i);
|
||||||
unregisterService(info.service, info.userid);
|
unregisterService(info.service, info.userid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user