Fix UI issue in LocationSettings

- Add WorkPreferenceController to support directly use work profile
related feature in xml
- Get only work/personal infos in RecentLocationRequestPreferenceController
and RecentLocationRequestSeeAllPreferenceController
- Remove ProfileSelectStorageFragment

Bug: 141601408
Fixes: 146080649
Test: manual, robolectric
Change-Id: Ide39c7a3796e16421f3a5690309c3d746a956de8
This commit is contained in:
Raff Tsai
2019-12-13 16:46:33 +08:00
parent d230b552f5
commit 5ec8efe7e0
21 changed files with 442 additions and 246 deletions

View File

@@ -21,6 +21,7 @@ import android.content.Context;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
/**
* Location Setting page for personal profile.
@@ -49,9 +50,14 @@ public class LocationPersonalSettings extends DashboardFragment {
super.onAttach(context);
use(AppLocationPermissionPreferenceController.class).init(this);
use(RecentLocationRequestPreferenceController.class).init(this);
use(LocationServicePreferenceController.class).init(this);
use(LocationFooterPreferenceController.class).init(this);
final int profileType = getArguments().getInt(ProfileSelectFragment.EXTRA_PROFILE);
final RecentLocationRequestPreferenceController controller = use(
RecentLocationRequestPreferenceController.class);
controller.init(this);
controller.setProfileType(profileType);
}
@Override