LocationManagerService: Fix bug removing proximity alerts.
Alerts were not being removed from the mProximitiesEntered array.
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 4c3893c..024d8da 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1204,12 +1204,10 @@
// 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.