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:
Raff Tsai
2019-11-22 11:35:40 +08:00
parent a6198c25be
commit 2229585e88
17 changed files with 209 additions and 273 deletions

View File

@@ -38,7 +38,7 @@ public class LocationScanningPreferenceControllerTest {
@Before
public void setUp() {
mContext = RuntimeEnvironment.application;
mController = new LocationScanningPreferenceController(mContext);
mController = new LocationScanningPreferenceController(mContext, "key");
}
@Test