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
This commit is contained in:
Victoria Lease
2012-12-04 15:04:43 -08:00
parent a7acb4b9cd
commit e0fa1b387f

View File

@@ -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 {