OSDN Git Service

LocationManagerService: Fix bug removing proximity alerts.
authorMike Lockwood <lockwood@android.com>
Tue, 19 Jan 2010 16:48:14 +0000 (11:48 -0500)
committerMike Lockwood <lockwood@android.com>
Tue, 19 Jan 2010 16:50:13 +0000 (11:50 -0500)
Alerts were not being removed from the mProximitiesEntered array.

Signed-off-by: Mike Lockwood <lockwood@android.com>
services/java/com/android/server/LocationManagerService.java

index 4c3893c..024d8da 100644 (file)
@@ -1204,12 +1204,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.