Loading location/java/android/location/provider/ILocationProviderManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import android.location.provider.ProviderProperties; * @hide */ interface ILocationProviderManager { void onInitialize(boolean allowed, in ProviderProperties properties, @nullable String packageName, @nullable String attributionTag); void onInitialize(boolean allowed, in ProviderProperties properties, @nullable String attributionTag); void onSetAllowed(boolean allowed); void onSetProperties(in ProviderProperties properties); Loading location/java/android/location/provider/LocationProviderBase.java +1 −3 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public abstract class LocationProviderBase { "com.android.location.service.FusedLocationProvider"; private final String mTag; private final @Nullable String mPackageName; private final @Nullable String mAttributionTag; private final IBinder mBinder; Loading @@ -108,7 +107,6 @@ public abstract class LocationProviderBase { public LocationProviderBase(@NonNull Context context, @NonNull String tag, @NonNull ProviderProperties properties) { mTag = tag; mPackageName = context.getPackageName(); mAttributionTag = context.getAttributionTag(); mBinder = new Service(); Loading Loading @@ -305,7 +303,7 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { manager.onInitialize(mAllowed, mProperties, mPackageName, mAttributionTag); manager.onInitialize(mAllowed, mProperties, mAttributionTag); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (RuntimeException e) { Loading location/lib/java/com/android/location/provider/LocationProviderBase.java +1 −3 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public abstract class LocationProviderBase { public static final String FUSED_PROVIDER = LocationManager.FUSED_PROVIDER; final String mTag; @Nullable final String mPackageName; @Nullable final String mAttributionTag; final IBinder mBinder; Loading Loading @@ -133,7 +132,6 @@ public abstract class LocationProviderBase { public LocationProviderBase(Context context, String tag, ProviderPropertiesUnbundled properties) { mTag = tag; mPackageName = context != null ? context.getPackageName() : null; mAttributionTag = context != null ? context.getAttributionTag() : null; mBinder = new Service(); Loading Loading @@ -370,7 +368,7 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { manager.onInitialize(mAllowed, mProperties, mPackageName, mAttributionTag); manager.onInitialize(mAllowed, mProperties, mAttributionTag); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (RuntimeException e) { Loading packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java +5 −13 Original line number Diff line number Diff line Loading @@ -151,20 +151,14 @@ public class FusedLocationServiceTest { } @Override public void onInitialize(boolean allowed, ProviderProperties properties, String packageName, String attributionTag) { } public void onInitialize(boolean allowed, ProviderProperties properties, String attributionTag) {} @Override public void onSetAllowed(boolean allowed) { } public void onSetAllowed(boolean allowed) {} @Override public void onSetProperties(ProviderProperties properties) { } public void onSetProperties(ProviderProperties properties) {} @Override public void onReportLocation(Location location) { Loading @@ -177,9 +171,7 @@ public class FusedLocationServiceTest { } @Override public void onFlushComplete() { } public void onFlushComplete() {} public Location getNextLocation(long timeoutMs) throws InterruptedException { return mLocations.poll(timeoutMs, TimeUnit.MILLISECONDS); Loading services/core/java/com/android/server/location/GeocoderProxy.java +8 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.location.IGeocodeProvider; import android.os.IBinder; import android.os.RemoteException; import com.android.server.servicewatcher.CurrentUserServiceSupplier; import com.android.server.servicewatcher.ServiceWatcher; import java.util.Collections; Loading Loading @@ -54,9 +55,11 @@ public class GeocoderProxy { private final ServiceWatcher mServiceWatcher; private GeocoderProxy(Context context) { mServiceWatcher = new ServiceWatcher(context, SERVICE_ACTION, null, null, mServiceWatcher = ServiceWatcher.create(context, "GeocoderProxy", new CurrentUserServiceSupplier(context, SERVICE_ACTION, com.android.internal.R.bool.config_enableGeocoderOverlay, com.android.internal.R.string.config_geocoderProviderPackageName); com.android.internal.R.string.config_geocoderProviderPackageName), null); } private boolean register() { Loading @@ -72,7 +75,7 @@ public class GeocoderProxy { */ public void getFromLocation(double latitude, double longitude, int maxResults, GeocoderParams params, IGeocodeListener listener) { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderRunner() { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderOperation() { @Override public void run(IBinder binder) throws RemoteException { IGeocodeProvider provider = IGeocodeProvider.Stub.asInterface(binder); Loading @@ -97,7 +100,7 @@ public class GeocoderProxy { double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, int maxResults, GeocoderParams params, IGeocodeListener listener) { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderRunner() { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderOperation() { @Override public void run(IBinder binder) throws RemoteException { IGeocodeProvider provider = IGeocodeProvider.Stub.asInterface(binder); Loading Loading
location/java/android/location/provider/ILocationProviderManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import android.location.provider.ProviderProperties; * @hide */ interface ILocationProviderManager { void onInitialize(boolean allowed, in ProviderProperties properties, @nullable String packageName, @nullable String attributionTag); void onInitialize(boolean allowed, in ProviderProperties properties, @nullable String attributionTag); void onSetAllowed(boolean allowed); void onSetProperties(in ProviderProperties properties); Loading
location/java/android/location/provider/LocationProviderBase.java +1 −3 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public abstract class LocationProviderBase { "com.android.location.service.FusedLocationProvider"; private final String mTag; private final @Nullable String mPackageName; private final @Nullable String mAttributionTag; private final IBinder mBinder; Loading @@ -108,7 +107,6 @@ public abstract class LocationProviderBase { public LocationProviderBase(@NonNull Context context, @NonNull String tag, @NonNull ProviderProperties properties) { mTag = tag; mPackageName = context.getPackageName(); mAttributionTag = context.getAttributionTag(); mBinder = new Service(); Loading Loading @@ -305,7 +303,7 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { manager.onInitialize(mAllowed, mProperties, mPackageName, mAttributionTag); manager.onInitialize(mAllowed, mProperties, mAttributionTag); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (RuntimeException e) { Loading
location/lib/java/com/android/location/provider/LocationProviderBase.java +1 −3 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public abstract class LocationProviderBase { public static final String FUSED_PROVIDER = LocationManager.FUSED_PROVIDER; final String mTag; @Nullable final String mPackageName; @Nullable final String mAttributionTag; final IBinder mBinder; Loading Loading @@ -133,7 +132,6 @@ public abstract class LocationProviderBase { public LocationProviderBase(Context context, String tag, ProviderPropertiesUnbundled properties) { mTag = tag; mPackageName = context != null ? context.getPackageName() : null; mAttributionTag = context != null ? context.getAttributionTag() : null; mBinder = new Service(); Loading Loading @@ -370,7 +368,7 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { manager.onInitialize(mAllowed, mProperties, mPackageName, mAttributionTag); manager.onInitialize(mAllowed, mProperties, mAttributionTag); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (RuntimeException e) { Loading
packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java +5 −13 Original line number Diff line number Diff line Loading @@ -151,20 +151,14 @@ public class FusedLocationServiceTest { } @Override public void onInitialize(boolean allowed, ProviderProperties properties, String packageName, String attributionTag) { } public void onInitialize(boolean allowed, ProviderProperties properties, String attributionTag) {} @Override public void onSetAllowed(boolean allowed) { } public void onSetAllowed(boolean allowed) {} @Override public void onSetProperties(ProviderProperties properties) { } public void onSetProperties(ProviderProperties properties) {} @Override public void onReportLocation(Location location) { Loading @@ -177,9 +171,7 @@ public class FusedLocationServiceTest { } @Override public void onFlushComplete() { } public void onFlushComplete() {} public Location getNextLocation(long timeoutMs) throws InterruptedException { return mLocations.poll(timeoutMs, TimeUnit.MILLISECONDS); Loading
services/core/java/com/android/server/location/GeocoderProxy.java +8 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.location.IGeocodeProvider; import android.os.IBinder; import android.os.RemoteException; import com.android.server.servicewatcher.CurrentUserServiceSupplier; import com.android.server.servicewatcher.ServiceWatcher; import java.util.Collections; Loading Loading @@ -54,9 +55,11 @@ public class GeocoderProxy { private final ServiceWatcher mServiceWatcher; private GeocoderProxy(Context context) { mServiceWatcher = new ServiceWatcher(context, SERVICE_ACTION, null, null, mServiceWatcher = ServiceWatcher.create(context, "GeocoderProxy", new CurrentUserServiceSupplier(context, SERVICE_ACTION, com.android.internal.R.bool.config_enableGeocoderOverlay, com.android.internal.R.string.config_geocoderProviderPackageName); com.android.internal.R.string.config_geocoderProviderPackageName), null); } private boolean register() { Loading @@ -72,7 +75,7 @@ public class GeocoderProxy { */ public void getFromLocation(double latitude, double longitude, int maxResults, GeocoderParams params, IGeocodeListener listener) { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderRunner() { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderOperation() { @Override public void run(IBinder binder) throws RemoteException { IGeocodeProvider provider = IGeocodeProvider.Stub.asInterface(binder); Loading @@ -97,7 +100,7 @@ public class GeocoderProxy { double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, int maxResults, GeocoderParams params, IGeocodeListener listener) { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderRunner() { mServiceWatcher.runOnBinder(new ServiceWatcher.BinderOperation() { @Override public void run(IBinder binder) throws RemoteException { IGeocodeProvider provider = IGeocodeProvider.Stub.asInterface(binder); Loading