Skip to content

Commit 19563cc

Browse files
committed
LocationManagerService: Fix bug removing proximity alerts.
Alerts were not being removed from the mProximitiesEntered array. Signed-off-by: Mike Lockwood <lockwood@android.com>
1 parent 8ca2f47 commit 19563cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,12 +1204,10 @@ public void onLocationChanged(Location loc) {
12041204
// Remove expired alerts
12051205
if (intentsToRemove != null) {
12061206
for (PendingIntent i : intentsToRemove) {
1207-
mProximityAlerts.remove(i);
1208-
ProximityAlert alert = mProximityAlerts.get(i);
1207+
ProximityAlert alert = mProximityAlerts.remove(i);
12091208
mProximitiesEntered.remove(alert);
12101209
}
12111210
}
1212-
12131211
}
12141212

12151213
// Note: this is called with the lock held.

0 commit comments

Comments
 (0)