Skip to content

Commit 26abeae

Browse files
seanmfoyJean-Baptiste Queru
authored andcommitted
Remove ProximityAlerts Receiver when last ProximityAlert expires.
Remove the ProximityAlerts update Receiver when the last ProximityAlert expires. Fixes issue 6900. Change-Id: Ida1970c084e71df47b204c64986a065cb75d0c13
1 parent 80131e4 commit 26abeae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,8 +1202,9 @@ public void onLocationChanged(Location loc) {
12021202
// Remove expired alerts
12031203
if (intentsToRemove != null) {
12041204
for (PendingIntent i : intentsToRemove) {
1205-
ProximityAlert alert = mProximityAlerts.remove(i);
1205+
ProximityAlert alert = mProximityAlerts.get(i);
12061206
mProximitiesEntered.remove(alert);
1207+
removeProximityAlertLocked(i);
12071208
}
12081209
}
12091210
}

0 commit comments

Comments
 (0)