Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a19ad08 authored by Victoria Lease's avatar Victoria Lease
Browse files

Adjust update interval when expiring location requests.

This is a more complete solution for this issue that disables
location providers when expiring their last request *and* adjusts
update intervals when expiring any request. This should help
further limit battery drain when a high-frequency-update app
exits, as it allows the system to throttle the update interval
back down to something appropriate for the remaining listeners.

Bug: 7611837
Change-Id: I88b419c92940b7e536d48b26e5fc0f72f3c9e73d
parent e81f55ba
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1710,9 +1710,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
            for (UpdateRecord r : deadUpdateRecords) {
                r.disposeLocked(true);
            }
        }
        // let the provider know if we just disposed its last update record
        if (records.size() == 0) {
            applyRequirementsLocked(provider);
        }
    }