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:
@@ -65,6 +65,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
implements SettingsBaseActivity.CategoryListener, Indexable,
|
||||
PreferenceGroup.OnExpandButtonClickListener,
|
||||
BasePreferenceController.UiBlockListener {
|
||||
public static final String CATEGORY = "category";
|
||||
private static final String TAG = "DashboardFragment";
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -206,6 +207,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
mMetricsFeatureProvider.logDashboardStartIntent(
|
||||
getContext(), preference.getIntent(), getMetricsCategory());
|
||||
// Give all controllers a chance to handle click.
|
||||
preference.getExtras().putInt(CATEGORY, getMetricsCategory());
|
||||
for (List<AbstractPreferenceController> controllerList : controllers) {
|
||||
for (AbstractPreferenceController controller : controllerList) {
|
||||
if (controller.handlePreferenceTreeClick(preference)) {
|
||||
|
Reference in New Issue
Block a user