Loading location/java/com/android/internal/location/ILocationProviderManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import com.android.internal.location.ProviderProperties; */ interface ILocationProviderManager { void onSetFeatureId(String featureId); void onSetAttributionTag(String attributionTag); @UnsupportedAppUsage void onSetAllowed(boolean allowed); Loading location/lib/java/com/android/location/provider/LocationProviderBase.java +4 −4 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public abstract class LocationProviderBase { public static final String FUSED_PROVIDER = LocationManager.FUSED_PROVIDER; final String mTag; final String mFeatureId; final String mAttributionTag; final IBinder mBinder; /** Loading Loading @@ -116,7 +116,7 @@ public abstract class LocationProviderBase { public LocationProviderBase(Context context, String tag, ProviderPropertiesUnbundled properties) { mTag = tag; mFeatureId = context != null ? context.getFeatureId() : null; mAttributionTag = context != null ? context.getAttributionTag() : null; mBinder = new Service(); mLocationManager = ILocationManager.Stub.asInterface( Loading Loading @@ -332,8 +332,8 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { if (mFeatureId != null) { manager.onSetFeatureId(mFeatureId); if (mAttributionTag != null) { manager.onSetAttributionTag(mAttributionTag); } manager.onSetProperties(mProperties); manager.onSetAllowed(mAllowed); Loading packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class FusedLocationServiceTest { } @Override public void onSetFeatureId(String featureId) { public void onSetAttributionTag(String attributionTag) { } Loading services/core/java/com/android/server/location/LocationProviderProxy.java +8 −10 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.location; import static com.android.internal.util.ConcurrentUtils.DIRECT_EXECUTOR; import android.annotation.Nullable; import android.content.ComponentName; import android.content.Context; import android.location.Location; import android.location.util.identity.CallerIdentity; Loading Loading @@ -136,21 +135,21 @@ public class LocationProviderProxy extends AbstractLocationProvider { // executed on binder thread @Override public void onSetFeatureId(String featureId) { public void onSetAttributionTag(String attributionTag) { synchronized (mLock) { if (mProxy != this) { return; } ComponentName service = mServiceWatcher.getBoundService().component; if (service == null) { String packageName = mServiceWatcher.getBoundService().getPackageName(); if (packageName == null) { return; } // we don't need to verify the package name because we're getting it straight from // the service watcher CallerIdentity identity = CallerIdentity.fromBinderUnsafe(mContext, service.getPackageName(), featureId); CallerIdentity identity = CallerIdentity.fromBinderUnsafe(mContext, packageName, attributionTag); setIdentity(identity); } } Loading @@ -165,12 +164,11 @@ public class LocationProviderProxy extends AbstractLocationProvider { // if no identity is set yet, set it now if (getIdentity() == null) { ComponentName service = mServiceWatcher.getBoundService().component; if (service != null) { String packageName = mServiceWatcher.getBoundService().getPackageName(); if (packageName != null) { // we don't need to verify the package name because we're getting it // straight from the service watcher setIdentity(CallerIdentity.fromBinderUnsafe(mContext, service.getPackageName(), null)); setIdentity(CallerIdentity.fromBinderUnsafe(mContext, packageName, null)); } } Loading Loading
location/java/com/android/internal/location/ILocationProviderManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import com.android.internal.location.ProviderProperties; */ interface ILocationProviderManager { void onSetFeatureId(String featureId); void onSetAttributionTag(String attributionTag); @UnsupportedAppUsage void onSetAllowed(boolean allowed); Loading
location/lib/java/com/android/location/provider/LocationProviderBase.java +4 −4 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public abstract class LocationProviderBase { public static final String FUSED_PROVIDER = LocationManager.FUSED_PROVIDER; final String mTag; final String mFeatureId; final String mAttributionTag; final IBinder mBinder; /** Loading Loading @@ -116,7 +116,7 @@ public abstract class LocationProviderBase { public LocationProviderBase(Context context, String tag, ProviderPropertiesUnbundled properties) { mTag = tag; mFeatureId = context != null ? context.getFeatureId() : null; mAttributionTag = context != null ? context.getAttributionTag() : null; mBinder = new Service(); mLocationManager = ILocationManager.Stub.asInterface( Loading Loading @@ -332,8 +332,8 @@ public abstract class LocationProviderBase { public void setLocationProviderManager(ILocationProviderManager manager) { synchronized (mBinder) { try { if (mFeatureId != null) { manager.onSetFeatureId(mFeatureId); if (mAttributionTag != null) { manager.onSetAttributionTag(mAttributionTag); } manager.onSetProperties(mProperties); manager.onSetAllowed(mAllowed); Loading
packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class FusedLocationServiceTest { } @Override public void onSetFeatureId(String featureId) { public void onSetAttributionTag(String attributionTag) { } Loading
services/core/java/com/android/server/location/LocationProviderProxy.java +8 −10 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.location; import static com.android.internal.util.ConcurrentUtils.DIRECT_EXECUTOR; import android.annotation.Nullable; import android.content.ComponentName; import android.content.Context; import android.location.Location; import android.location.util.identity.CallerIdentity; Loading Loading @@ -136,21 +135,21 @@ public class LocationProviderProxy extends AbstractLocationProvider { // executed on binder thread @Override public void onSetFeatureId(String featureId) { public void onSetAttributionTag(String attributionTag) { synchronized (mLock) { if (mProxy != this) { return; } ComponentName service = mServiceWatcher.getBoundService().component; if (service == null) { String packageName = mServiceWatcher.getBoundService().getPackageName(); if (packageName == null) { return; } // we don't need to verify the package name because we're getting it straight from // the service watcher CallerIdentity identity = CallerIdentity.fromBinderUnsafe(mContext, service.getPackageName(), featureId); CallerIdentity identity = CallerIdentity.fromBinderUnsafe(mContext, packageName, attributionTag); setIdentity(identity); } } Loading @@ -165,12 +164,11 @@ public class LocationProviderProxy extends AbstractLocationProvider { // if no identity is set yet, set it now if (getIdentity() == null) { ComponentName service = mServiceWatcher.getBoundService().component; if (service != null) { String packageName = mServiceWatcher.getBoundService().getPackageName(); if (packageName != null) { // we don't need to verify the package name because we're getting it // straight from the service watcher setIdentity(CallerIdentity.fromBinderUnsafe(mContext, service.getPackageName(), null)); setIdentity(CallerIdentity.fromBinderUnsafe(mContext, packageName, null)); } } Loading