Merge "Address API council comments."

This commit is contained in:
TreeHugger Robot
2019-03-27 19:43:36 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -145,7 +145,7 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
mContext.getString(R.string.config_settingsintelligence_package_name)); mContext.getString(R.string.config_settingsintelligence_package_name));
final LocationManager locationManager = final LocationManager locationManager =
(LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
final String locationHistoryPackage = locationManager.getLocationControllerExtraPackage(); final String locationHistoryPackage = locationManager.getExtraLocationControllerPackage();
if (locationHistoryPackage != null) { if (locationHistoryPackage != null) {
keepEnabledPackages.add(locationHistoryPackage); keepEnabledPackages.add(locationHistoryPackage);
} }

View File

@@ -272,7 +272,7 @@ public final class ApplicationFeatureProviderImplTest {
// Spy the real context to mock LocationManager. // Spy the real context to mock LocationManager.
Context spyContext = spy(RuntimeEnvironment.application); Context spyContext = spy(RuntimeEnvironment.application);
when(mLocationManager.getLocationControllerExtraPackage()).thenReturn(testLocationHistory); when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory);
when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager);
ReflectionHelpers.setField(mProvider, "mContext", spyContext); ReflectionHelpers.setField(mProvider, "mContext", spyContext);