Loading src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide mContext.getString(R.string.config_settingsintelligence_package_name)); final LocationManager locationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); final String locationHistoryPackage = locationManager.getLocationControllerExtraPackage(); final String locationHistoryPackage = locationManager.getExtraLocationControllerPackage(); if (locationHistoryPackage != null) { keepEnabledPackages.add(locationHistoryPackage); } Loading tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public final class ApplicationFeatureProviderImplTest { // Spy the real context to mock LocationManager. Context spyContext = spy(RuntimeEnvironment.application); when(mLocationManager.getLocationControllerExtraPackage()).thenReturn(testLocationHistory); when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); ReflectionHelpers.setField(mProvider, "mContext", spyContext); Loading Loading
src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide mContext.getString(R.string.config_settingsintelligence_package_name)); final LocationManager locationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); final String locationHistoryPackage = locationManager.getLocationControllerExtraPackage(); final String locationHistoryPackage = locationManager.getExtraLocationControllerPackage(); if (locationHistoryPackage != null) { keepEnabledPackages.add(locationHistoryPackage); } Loading
tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public final class ApplicationFeatureProviderImplTest { // Spy the real context to mock LocationManager. Context spyContext = spy(RuntimeEnvironment.application); when(mLocationManager.getLocationControllerExtraPackage()).thenReturn(testLocationHistory); when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); ReflectionHelpers.setField(mProvider, "mContext", spyContext); Loading