summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-12-04 15:04:43 -0800
committerVictoria Lease <violets@google.com>2012-12-04 15:42:22 -0800
commite0fa1b387f6ae3d347d76860eefff7a0d149cdba (patch)
tree147bcb608d5bf99de89a4870f4813e43cbf7c186 /services
parenta7acb4b9cdbf39b3456bd45ef82681716e1ab2f8 (diff)
downloadframeworks_base-e0fa1b387f6ae3d347d76860eefff7a0d149cdba.zip
frameworks_base-e0fa1b387f6ae3d347d76860eefff7a0d149cdba.tar.gz
frameworks_base-e0fa1b387f6ae3d347d76860eefff7a0d149cdba.tar.bz2
DO NOT MERGE Notify provider when disposing last UpdateRecord
Cherry-pick of Id48151eb7de40164258cde7da220a4d6bb34b89a Location providers were not being notified of the change in status when the last UpdateRecord was removed due to numUpdates exhaustion or request expiry. Oops! Enjoy some free battery life! Bug: 7611837 Change-Id: I66303b355be4e4a56a81efb5406c9353b2588595
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/LocationManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 0d4a1c2..233a051 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1711,6 +1711,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
r.disposeLocked(true);
}
}
+ // let the provider know if we just disposed its last update record
+ if (records.size() == 0) {
+ applyRequirementsLocked(provider);
+ }
}
private class LocationWorkerHandler extends Handler {