Implement work-profile infra in BasePreferenceController

- Add settings:forWork in xml
- Set mIsForWork based on xml attribute
- Delete WorkProfilePreferenceController and move its function to
BasePreferenceController

Fixes: 123376083
Test: Add work profile, go to Settings->System->Language&input,
UI should show work profile related items
Change-Id: Id2dcbb0e158c117cdfd363466a275f4e133c345e
This commit is contained in:
Raff Tsai
2019-12-02 10:55:29 +08:00
parent 9700435b4d
commit f71db73025
13 changed files with 132 additions and 149 deletions

View File

@@ -56,9 +56,7 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
@Override
public int getAvailabilityStatus() {
// Looking for a managed profile. If there are no managed profiles then we are removing the
// managed profile category.
return Utils.getManagedProfile(mUserManager) != null ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
return AVAILABLE;
}
@Override