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

Commit e6ad5f75 authored by Takayuki Hoshi's avatar Takayuki Hoshi Committed by Android Git Automerger
Browse files

am ee57224c: Merge "Fix a bug where LocationManager\'s addGpsStatusListener...

am ee57224c: Merge "Fix a bug where LocationManager\'s addGpsStatusListener does not throw a SecurityException if LocationManagerService.mGpsStatusProvider is null even when ACCESS_FINE_LOCATION permission is not present." into lmp-mr1-dev

* commit 'ee57224c':
  Fix a bug where LocationManager's addGpsStatusListener does not throw a SecurityException if LocationManagerService.mGpsStatusProvider is null even when ACCESS_FINE_LOCATION permission is not present.
parents 8659bf19 ee57224c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1796,9 +1796,6 @@ public class LocationManagerService extends ILocationManager.Stub {

    @Override
    public boolean addGpsStatusListener(IGpsStatusListener listener, String packageName) {
        if (mGpsStatusProvider == null) {
            return false;
        }
        int allowedResolutionLevel = getCallerAllowedResolutionLevel();
        checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,
                LocationManager.GPS_PROVIDER);
@@ -1813,6 +1810,10 @@ public class LocationManagerService extends ILocationManager.Stub {
            Binder.restoreCallingIdentity(ident);
        }

        if (mGpsStatusProvider == null) {
            return false;
        }

        try {
            mGpsStatusProvider.addGpsStatusListener(listener);
        } catch (RemoteException e) {