diff options
author | 2020-11-09 18:35:30 +0000 | |
---|---|---|
committer | 2020-11-09 18:35:30 +0000 | |
commit | e197de6bfc1cc0890210562a4433889be0caea0f (patch) | |
tree | 25c6200cf65409b94d864750b305c612943fba32 | |
parent | af9c36ce10f6e3c55f45a9dcc6f689c1d33baf9b (diff) | |
parent | 3d5a2c2da7089bfb4f00442a58271d70e056af39 (diff) |
Merge "Assorted renaming and repackaging"
27 files changed, 73 insertions, 69 deletions
diff --git a/services/core/java/com/android/server/ContextHubSystemService.java b/services/core/java/com/android/server/ContextHubSystemService.java index c6853a5119ec..a35351958f43 100644 --- a/services/core/java/com/android/server/ContextHubSystemService.java +++ b/services/core/java/com/android/server/ContextHubSystemService.java @@ -20,7 +20,7 @@ import android.content.Context; import android.util.Log; import com.android.internal.util.ConcurrentUtils; -import com.android.server.location.ContextHubService; +import com.android.server.location.contexthub.ContextHubService; import java.util.concurrent.Future; diff --git a/services/core/java/com/android/server/CountryDetectorService.java b/services/core/java/com/android/server/CountryDetectorService.java index b0132d35fa3b..a2a7dd35371f 100644 --- a/services/core/java/com/android/server/CountryDetectorService.java +++ b/services/core/java/com/android/server/CountryDetectorService.java @@ -33,8 +33,8 @@ import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.os.BackgroundThread; import com.android.internal.util.DumpUtils; -import com.android.server.location.ComprehensiveCountryDetector; -import com.android.server.location.CountryDetectorBase; +import com.android.server.location.countrydetector.ComprehensiveCountryDetector; +import com.android.server.location.countrydetector.CountryDetectorBase; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -43,10 +43,9 @@ import java.util.HashMap; /** * This class detects the country that the user is in. The default country detection is made through - * {@link com.android.server.location.ComprehensiveCountryDetector}. It is possible to overlay the - * detection algorithm by overlaying the attribute R.string.config_customCountryDetector with the - * custom class name to use instead. The custom class must extend - * {@link com.android.server.location.CountryDetectorBase} + * {@link ComprehensiveCountryDetector}. It is possible to overlay the detection algorithm by + * overlaying the attribute R.string.config_customCountryDetector with the custom class name to use + * instead. The custom class must extend {@link CountryDetectorBase} * * @hide */ diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java index 18185ae520b8..9d3855e6dd75 100644 --- a/services/core/java/com/android/server/location/LocationManagerService.java +++ b/services/core/java/com/android/server/location/LocationManagerService.java @@ -245,7 +245,7 @@ public class LocationManagerService extends ILocationManager.Stub { // set up passive provider first since it will be required for all other location providers, // which are loaded later once the system is ready. mPassiveManager = new PassiveLocationProviderManager(mContext, injector); - addLocationProviderManager(mPassiveManager, new PassiveProvider(mContext)); + addLocationProviderManager(mPassiveManager, new PassiveLocationProvider(mContext)); // TODO: load the gps provider here as well, which will require refactoring @@ -320,7 +320,7 @@ public class LocationManagerService extends ILocationManager.Stub { } void onSystemThirdPartyAppsCanStart() { - LocationProviderProxy networkProvider = LocationProviderProxy.createAndRegister( + ProxyLocationProvider networkProvider = ProxyLocationProvider.createAndRegister( mContext, NETWORK_LOCATION_SERVICE_ACTION, com.android.internal.R.bool.config_enableNetworkLocationOverlay, @@ -339,7 +339,7 @@ public class LocationManagerService extends ILocationManager.Stub { MATCH_DIRECT_BOOT_AWARE | MATCH_SYSTEM_ONLY, UserHandle.USER_SYSTEM).isEmpty(), "Unable to find a direct boot aware fused location provider"); - LocationProviderProxy fusedProvider = LocationProviderProxy.createAndRegister( + ProxyLocationProvider fusedProvider = ProxyLocationProvider.createAndRegister( mContext, FUSED_LOCATION_SERVICE_ACTION, com.android.internal.R.bool.config_enableFusedLocationOverlay, @@ -404,7 +404,7 @@ public class LocationManagerService extends ILocationManager.Stub { Integer.parseInt(fragments[8]) /* powerRequirement */, Integer.parseInt(fragments[9]) /* accuracy */); getOrAddLocationProviderManager(name).setMockProvider( - new MockProvider(properties, CallerIdentity.fromContext(mContext))); + new MockLocationProvider(properties, CallerIdentity.fromContext(mContext))); } } @@ -1037,7 +1037,7 @@ public class LocationManagerService extends ILocationManager.Stub { } getOrAddLocationProviderManager(provider).setMockProvider( - new MockProvider(properties, identity)); + new MockLocationProvider(properties, identity)); } @Override diff --git a/services/core/java/com/android/server/location/LocationProviderManager.java b/services/core/java/com/android/server/location/LocationProviderManager.java index 7b328be92c06..fc0704a15359 100644 --- a/services/core/java/com/android/server/location/LocationProviderManager.java +++ b/services/core/java/com/android/server/location/LocationProviderManager.java @@ -1312,7 +1312,7 @@ class LocationProviderManager extends } } - public void setMockProvider(@Nullable MockProvider provider) { + public void setMockProvider(@Nullable MockLocationProvider provider) { synchronized (mLock) { Preconditions.checkState(mState != STATE_STOPPED); diff --git a/services/core/java/com/android/server/location/MockProvider.java b/services/core/java/com/android/server/location/MockLocationProvider.java index fc88f147ea9d..e8067283fb8c 100644 --- a/services/core/java/com/android/server/location/MockProvider.java +++ b/services/core/java/com/android/server/location/MockLocationProvider.java @@ -34,11 +34,11 @@ import java.io.PrintWriter; * * {@hide} */ -public class MockProvider extends AbstractLocationProvider { +public class MockLocationProvider extends AbstractLocationProvider { @Nullable private Location mLocation; - public MockProvider(ProviderProperties properties, CallerIdentity identity) { + public MockLocationProvider(ProviderProperties properties, CallerIdentity identity) { // using a direct executor is ok because this class has no locks that could deadlock super(DIRECT_EXECUTOR, identity); setProperties(properties); diff --git a/services/core/java/com/android/server/location/MockableLocationProvider.java b/services/core/java/com/android/server/location/MockableLocationProvider.java index d8d435aa4ac0..6744d2a3dd6d 100644 --- a/services/core/java/com/android/server/location/MockableLocationProvider.java +++ b/services/core/java/com/android/server/location/MockableLocationProvider.java @@ -54,7 +54,7 @@ public class MockableLocationProvider extends AbstractLocationProvider { @GuardedBy("mOwnerLock") @Nullable private AbstractLocationProvider mRealProvider; @GuardedBy("mOwnerLock") - @Nullable private MockProvider mMockProvider; + @Nullable private MockLocationProvider mMockProvider; @GuardedBy("mOwnerLock") private ProviderRequest mRequest; @@ -113,7 +113,7 @@ public class MockableLocationProvider extends AbstractLocationProvider { * inline invocation of {@link Listener#onStateChanged(State, State)} if this results in a * state change. */ - public void setMockProvider(@Nullable MockProvider provider) { + public void setMockProvider(@Nullable MockLocationProvider provider) { synchronized (mOwnerLock) { if (mMockProvider == provider) { return; diff --git a/services/core/java/com/android/server/location/PassiveProvider.java b/services/core/java/com/android/server/location/PassiveLocationProvider.java index f6896b86f9b9..fba9a89e5ea2 100644 --- a/services/core/java/com/android/server/location/PassiveProvider.java +++ b/services/core/java/com/android/server/location/PassiveLocationProvider.java @@ -37,7 +37,7 @@ import java.io.PrintWriter; * * {@hide} */ -public class PassiveProvider extends AbstractLocationProvider { +public class PassiveLocationProvider extends AbstractLocationProvider { private static final ProviderProperties PROPERTIES = new ProviderProperties( /* requiresNetwork = */false, @@ -50,7 +50,7 @@ public class PassiveProvider extends AbstractLocationProvider { Criteria.POWER_LOW, Criteria.ACCURACY_COARSE); - public PassiveProvider(Context context) { + public PassiveLocationProvider(Context context) { // using a direct executor is ok because this class has no locks that could deadlock super(DIRECT_EXECUTOR, CallerIdentity.fromContext(context)); diff --git a/services/core/java/com/android/server/location/PassiveLocationProviderManager.java b/services/core/java/com/android/server/location/PassiveLocationProviderManager.java index b7718611cffc..e390138bafab 100644 --- a/services/core/java/com/android/server/location/PassiveLocationProviderManager.java +++ b/services/core/java/com/android/server/location/PassiveLocationProviderManager.java @@ -36,12 +36,12 @@ class PassiveLocationProviderManager extends LocationProviderManager { @Override public void setRealProvider(AbstractLocationProvider provider) { - Preconditions.checkArgument(provider instanceof PassiveProvider); + Preconditions.checkArgument(provider instanceof PassiveLocationProvider); super.setRealProvider(provider); } @Override - public void setMockProvider(@Nullable MockProvider provider) { + public void setMockProvider(@Nullable MockLocationProvider provider) { if (provider != null) { throw new IllegalArgumentException("Cannot mock the passive provider"); } @@ -49,12 +49,12 @@ class PassiveLocationProviderManager extends LocationProviderManager { public void updateLocation(Location location) { synchronized (mLock) { - PassiveProvider passiveProvider = (PassiveProvider) mProvider.getProvider(); - Preconditions.checkState(passiveProvider != null); + PassiveLocationProvider passive = (PassiveLocationProvider) mProvider.getProvider(); + Preconditions.checkState(passive != null); final long identity = Binder.clearCallingIdentity(); try { - passiveProvider.updateLocation(location); + passive.updateLocation(location); } finally { Binder.restoreCallingIdentity(identity); } diff --git a/services/core/java/com/android/server/location/LocationProviderProxy.java b/services/core/java/com/android/server/location/ProxyLocationProvider.java index b111c155fac5..5ab7abd24b46 100644 --- a/services/core/java/com/android/server/location/LocationProviderProxy.java +++ b/services/core/java/com/android/server/location/ProxyLocationProvider.java @@ -43,16 +43,16 @@ import java.util.Objects; /** * Proxy for ILocationProvider implementations. */ -public class LocationProviderProxy extends AbstractLocationProvider { +public class ProxyLocationProvider extends AbstractLocationProvider { /** * Creates and registers this proxy. If no suitable service is available for the proxy, returns * null. */ @Nullable - public static LocationProviderProxy createAndRegister(Context context, String action, + public static ProxyLocationProvider createAndRegister(Context context, String action, int enableOverlayResId, int nonOverlayPackageResId) { - LocationProviderProxy proxy = new LocationProviderProxy(context, action, enableOverlayResId, + ProxyLocationProvider proxy = new ProxyLocationProvider(context, action, enableOverlayResId, nonOverlayPackageResId); if (proxy.register()) { return proxy; @@ -73,7 +73,7 @@ public class LocationProviderProxy extends AbstractLocationProvider { private volatile ProviderRequest mRequest; - private LocationProviderProxy(Context context, String action, int enableOverlayResId, + private ProxyLocationProvider(Context context, String action, int enableOverlayResId, int nonOverlayPackageResId) { // safe to use direct executor since our locks are not acquired in a code path invoked by // our owning provider diff --git a/services/core/java/com/android/server/location/ConcurrentLinkedEvictingDeque.java b/services/core/java/com/android/server/location/contexthub/ConcurrentLinkedEvictingDeque.java index 6910c353e546..0427007d7d50 100644 --- a/services/core/java/com/android/server/location/ConcurrentLinkedEvictingDeque.java +++ b/services/core/java/com/android/server/location/contexthub/ConcurrentLinkedEvictingDeque.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import java.util.concurrent.ConcurrentLinkedDeque; diff --git a/services/core/java/com/android/server/location/ContextHubClientBroker.java b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java index e27eb65eccfc..20458b4db558 100644 --- a/services/core/java/com/android/server/location/ContextHubClientBroker.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import static android.content.pm.PackageManager.PERMISSION_GRANTED; @@ -37,6 +37,8 @@ import android.os.RemoteException; import android.util.Log; import android.util.proto.ProtoOutputStream; +import com.android.server.location.ClientBrokerProto; + import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; diff --git a/services/core/java/com/android/server/location/ContextHubClientManager.java b/services/core/java/com/android/server/location/contexthub/ContextHubClientManager.java index 33ceeeff331f..eda89ab52c6f 100644 --- a/services/core/java/com/android/server/location/ContextHubClientManager.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubClientManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.annotation.IntDef; import android.app.PendingIntent; @@ -29,6 +29,8 @@ import android.os.RemoteException; import android.util.Log; import android.util.proto.ProtoOutputStream; +import com.android.server.location.ClientManagerProto; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.text.DateFormat; diff --git a/services/core/java/com/android/server/location/ContextHubService.java b/services/core/java/com/android/server/location/contexthub/ContextHubService.java index 7a2e4ed3cc0b..63a42f845cee 100644 --- a/services/core/java/com/android/server/location/ContextHubService.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.app.PendingIntent; import android.content.BroadcastReceiver; @@ -54,6 +54,7 @@ import android.util.Log; import android.util.proto.ProtoOutputStream; import com.android.internal.util.DumpUtils; +import com.android.server.location.ContextHubServiceProto; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/services/core/java/com/android/server/location/ContextHubServiceTransaction.java b/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java index 62bd91bda1b8..a31aecbe4228 100644 --- a/services/core/java/com/android/server/location/ContextHubServiceTransaction.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.hardware.location.ContextHubTransaction; import android.hardware.location.NanoAppState; diff --git a/services/core/java/com/android/server/location/ContextHubServiceUtil.java b/services/core/java/com/android/server/location/contexthub/ContextHubServiceUtil.java index 9145eca9ad6f..88ed1053616a 100644 --- a/services/core/java/com/android/server/location/ContextHubServiceUtil.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubServiceUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import static android.content.pm.PackageManager.PERMISSION_GRANTED; diff --git a/services/core/java/com/android/server/location/ContextHubTransactionManager.java b/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java index d3fc7058bcf2..f81208fbf241 100644 --- a/services/core/java/com/android/server/location/ContextHubTransactionManager.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.hardware.contexthub.V1_0.IContexthub; import android.hardware.contexthub.V1_0.Result; diff --git a/services/core/java/com/android/server/location/IContextHubWrapper.java b/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java index 9ac7c6b95583..4242d72239e2 100644 --- a/services/core/java/com/android/server/location/IContextHubWrapper.java +++ b/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.annotation.Nullable; import android.hardware.contexthub.V1_1.Setting; diff --git a/services/core/java/com/android/server/location/NanoAppStateManager.java b/services/core/java/com/android/server/location/contexthub/NanoAppStateManager.java index e26ccc3a7286..60109fe4b9f6 100644 --- a/services/core/java/com/android/server/location/NanoAppStateManager.java +++ b/services/core/java/com/android/server/location/contexthub/NanoAppStateManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.contexthub; import android.annotation.Nullable; import android.hardware.contexthub.V1_0.HubAppInfo; diff --git a/services/core/java/com/android/server/location/ComprehensiveCountryDetector.java b/services/core/java/com/android/server/location/countrydetector/ComprehensiveCountryDetector.java index 6117a9b8749a..af3907e78432 100644 --- a/services/core/java/com/android/server/location/ComprehensiveCountryDetector.java +++ b/services/core/java/com/android/server/location/countrydetector/ComprehensiveCountryDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11,10 +11,10 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.content.Context; import android.location.Country; diff --git a/services/core/java/com/android/server/location/CountryDetectorBase.java b/services/core/java/com/android/server/location/countrydetector/CountryDetectorBase.java index 682b104f6d7a..6e2e28caf4de 100644 --- a/services/core/java/com/android/server/location/CountryDetectorBase.java +++ b/services/core/java/com/android/server/location/countrydetector/CountryDetectorBase.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11,10 +11,10 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.content.Context; import android.location.Country; diff --git a/services/core/java/com/android/server/location/LocationBasedCountryDetector.java b/services/core/java/com/android/server/location/countrydetector/LocationBasedCountryDetector.java index 8ee1285b41f2..638f36f80143 100644 --- a/services/core/java/com/android/server/location/LocationBasedCountryDetector.java +++ b/services/core/java/com/android/server/location/countrydetector/LocationBasedCountryDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11,10 +11,10 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.content.Context; import android.location.Address; diff --git a/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java b/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java index d260e4dce79a..cc46d9d867ef 100644 --- a/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java @@ -152,7 +152,7 @@ public class LocationProviderManagerTest { mPassive = new PassiveLocationProviderManager(mContext, mInjector); mPassive.startManager(); - mPassive.setRealProvider(new PassiveProvider(mContext)); + mPassive.setRealProvider(new PassiveLocationProvider(mContext)); mProvider = new TestProvider(PROPERTIES, IDENTITY); mProvider.setProviderAllowed(true); @@ -308,7 +308,7 @@ public class LocationProviderManagerTest { @Test public void testGetLastLocation_ClearOnMockRemoval() { - MockProvider mockProvider = new MockProvider(PROPERTIES, IDENTITY); + MockLocationProvider mockProvider = new MockLocationProvider(PROPERTIES, IDENTITY); mockProvider.setAllowed(true); mManager.setMockProvider(mockProvider); diff --git a/services/tests/mockingservicestests/src/com/android/server/location/MockableLocationProviderTest.java b/services/tests/mockingservicestests/src/com/android/server/location/MockableLocationProviderTest.java index 374fc777546f..85cb7a0befe3 100644 --- a/services/tests/mockingservicestests/src/com/android/server/location/MockableLocationProviderTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/location/MockableLocationProviderTest.java @@ -50,7 +50,7 @@ public class MockableLocationProviderTest { private ProviderListenerCapture mListener; private AbstractLocationProvider mRealProvider; - private MockProvider mMockProvider; + private MockLocationProvider mMockProvider; private MockableLocationProvider mProvider; @@ -60,7 +60,7 @@ public class MockableLocationProviderTest { mListener = new ProviderListenerCapture(lock); mRealProvider = spy(new FakeProvider()); - mMockProvider = spy(new MockProvider(new ProviderProperties( + mMockProvider = spy(new MockLocationProvider(new ProviderProperties( false, false, false, diff --git a/services/tests/servicestests/src/com/android/server/CountryDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/CountryDetectorServiceTest.java index d5483ffa5445..83a597dfad5c 100644 --- a/services/tests/servicestests/src/com/android/server/CountryDetectorServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/CountryDetectorServiceTest.java @@ -35,8 +35,8 @@ import android.os.RemoteException; import androidx.test.core.app.ApplicationProvider; import com.android.internal.R; -import com.android.server.location.ComprehensiveCountryDetector; -import com.android.server.location.CustomCountryDetectorTestClass; +import com.android.server.location.countrydetector.ComprehensiveCountryDetector; +import com.android.server.location.countrydetector.CustomCountryDetectorTestClass; import com.google.common.truth.Expect; @@ -53,7 +53,7 @@ import org.mockito.junit.MockitoJUnitRunner; public class CountryDetectorServiceTest { private static final String VALID_CUSTOM_TEST_CLASS = - "com.android.server.location.CustomCountryDetectorTestClass"; + "com.android.server.location.countrydetector.CustomCountryDetectorTestClass"; private static final String INVALID_CUSTOM_TEST_CLASS = "com.android.server.location.MissingCountryDetectorTestClass"; diff --git a/services/tests/servicestests/src/com/android/server/location/ComprehensiveCountryDetectorTest.java b/services/tests/servicestests/src/com/android/server/location/countrydetector/ComprehensiveCountryDetectorTest.java index 98966c032d14..41cfa62f2e2b 100644 --- a/services/tests/servicestests/src/com/android/server/location/ComprehensiveCountryDetectorTest.java +++ b/services/tests/servicestests/src/com/android/server/location/countrydetector/ComprehensiveCountryDetectorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11,10 +11,10 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.location.Country; import android.location.CountryListener; diff --git a/services/tests/servicestests/src/com/android/server/location/CustomCountryDetectorTestClass.java b/services/tests/servicestests/src/com/android/server/location/countrydetector/CustomCountryDetectorTestClass.java index e159012f1b54..fc19a945d09c 100644 --- a/services/tests/servicestests/src/com/android/server/location/CustomCountryDetectorTestClass.java +++ b/services/tests/servicestests/src/com/android/server/location/countrydetector/CustomCountryDetectorTestClass.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.content.Context; import android.location.Country; diff --git a/services/tests/servicestests/src/com/android/server/location/LocationBasedCountryDetectorTest.java b/services/tests/servicestests/src/com/android/server/location/countrydetector/LocationBasedCountryDetectorTest.java index 5f5d6684f383..46269ebb3219 100644 --- a/services/tests/servicestests/src/com/android/server/location/LocationBasedCountryDetectorTest.java +++ b/services/tests/servicestests/src/com/android/server/location/countrydetector/LocationBasedCountryDetectorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11,9 +11,9 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ -package com.android.server.location; +package com.android.server.location.countrydetector; import android.location.Country; import android.location.CountryListener; |