Refactor LocationSettings
- Extends BasePreferenceController in LocationBasePreferenceController which binds preference key based on xml file instead of writing the key in java code. Then the controller can be used in many xmls. - Modify LocationServicePreferenceController to support only personal or profile user. Bug: 141601408 Test: manual, robolectric Change-Id: I51ee950dfb87474df84a8dc3db55fb911edcf599
This commit is contained in:
@@ -70,7 +70,7 @@ public class LocationFooterPreferenceControllerTest {
|
||||
Context context = spy(RuntimeEnvironment.application);
|
||||
when(context.getPackageManager()).thenReturn(mPackageManager);
|
||||
when(mPreferenceCategory.getContext()).thenReturn(context);
|
||||
mController = spy(new LocationFooterPreferenceController(context));
|
||||
mController = spy(new LocationFooterPreferenceController(context, "key"));
|
||||
when(mPackageManager.getResourcesForApplication(any(ApplicationInfo.class)))
|
||||
.thenReturn(mResources);
|
||||
when(mResources.getString(TEST_RES_ID)).thenReturn(TEST_TEXT);
|
||||
|
||||
Reference in New Issue
Block a user