From 3bb858b2f430704743164424e9111df58357c6f2 Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Mon, 3 Oct 2022 15:48:50 +0000 Subject: [PATCH] Use non-deprecated methods. Feature ID was renamed to Attribution Tag. The old methods were marked @Deprecated and @removed. Bug: 135214188 Test: atest MediaInserterTest Change-Id: Id2fd77dcdc5125ea949c23825606e7a046697e8e --- location/java/android/location/LocationManager.java | 8 ++++---- .../mediaframeworktest/unit/MediaInserterTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 32015b87f487b..9b81c09f5c5b1 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -2103,7 +2103,7 @@ public class LocationManager { try { mService.addTestProvider(provider, properties, new ArrayList<>(extraAttributionTags), - mContext.getOpPackageName(), mContext.getFeatureId()); + mContext.getOpPackageName(), mContext.getAttributionTag()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -2125,7 +2125,7 @@ public class LocationManager { try { mService.removeTestProvider(provider, mContext.getOpPackageName(), - mContext.getFeatureId()); + mContext.getAttributionTag()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -2160,7 +2160,7 @@ public class LocationManager { try { mService.setTestProviderLocation(provider, location, mContext.getOpPackageName(), - mContext.getFeatureId()); + mContext.getAttributionTag()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -2190,7 +2190,7 @@ public class LocationManager { try { mService.setTestProviderEnabled(provider, enabled, mContext.getOpPackageName(), - mContext.getFeatureId()); + mContext.getAttributionTag()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaInserterTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaInserterTest.java index a0d449239b2a1..ea0494f2a8f18 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaInserterTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaInserterTest.java @@ -89,7 +89,7 @@ public class MediaInserterTest extends InstrumentationTestCase { MockitoAnnotations.initMocks(this); final Context attributionContext = getInstrumentation().getContext() - .createFeatureContext(TEST_FEATURE_ID); + .createAttributionContext(TEST_FEATURE_ID); final ContentProviderClient client = new ContentProviderClient(attributionContext .getContentResolver(), mMockProvider, true);