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

Commit e0fa1b38 authored by Victoria Lease's avatar Victoria Lease
Browse files

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
parent a7acb4b9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 {