diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 406897d7aeaac..1c82c94e77ae8 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -1203,12 +1203,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run // Remove expired alerts if (intentsToRemove != null) { for (PendingIntent i : intentsToRemove) { - mProximityAlerts.remove(i); - ProximityAlert alert = mProximityAlerts.get(i); + ProximityAlert alert = mProximityAlerts.remove(i); mProximitiesEntered.remove(alert); } } - } // Note: this is called with the lock held.