OSDN Git Service

Remove ProximityAlerts Receiver when last ProximityAlert expires.
authorSean Foy <sean.foy@gmail.com>
Thu, 4 Mar 2010 18:17:54 +0000 (12:17 -0600)
committerJean-Baptiste Queru <jbq@google.com>
Tue, 11 May 2010 21:24:26 +0000 (14:24 -0700)
Remove the ProximityAlerts update Receiver when the last ProximityAlert expires.
Fixes issue 6900.

Change-Id: Ida1970c084e71df47b204c64986a065cb75d0c13

services/java/com/android/server/LocationManagerService.java

index e39da8c..d679a5e 100644 (file)
@@ -1202,8 +1202,9 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
             // Remove expired alerts
             if (intentsToRemove != null) {
                 for (PendingIntent i : intentsToRemove) {
-                    ProximityAlert alert = mProximityAlerts.remove(i);
+                    ProximityAlert alert = mProximityAlerts.get(i);
                     mProximitiesEntered.remove(alert);
+                    removeProximityAlertLocked(i);
                 }
             }
         }