Loading src/com/android/settings/accounts/AccountDashboardFragment.java +12 −5 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.app.settings.SettingsEnums; import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.credentials.CredentialManager; import android.os.UserHandle; Loading Loading @@ -89,7 +90,8 @@ public class AccountDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -98,7 +100,8 @@ public class AccountDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers(context, controllers, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading @@ -110,9 +113,13 @@ public class AccountDashboardFragment extends DashboardFragment { } static void buildAutofillPreferenceControllers( Context context, List<AbstractPreferenceController> controllers) { Context context, List<AbstractPreferenceController> controllers, boolean isWorkProfile, boolean isPrivateSpace) { if (CredentialManager.isServiceEnabled(context)) { controllers.add(new DefaultCombinedPreferenceController(context)); controllers.add(new DefaultCombinedPreferenceController( context, isWorkProfile, isPrivateSpace)); controllers.add(new DefaultWorkCombinedPreferenceController(context)); controllers.add(new DefaultPrivateCombinedPreferenceController(context)); } else { Loading Loading @@ -162,7 +169,7 @@ public class AccountDashboardFragment extends DashboardFragment { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAccountPreferenceControllers( context, null /* parent */, null /* authorities*/, controllers); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers(context, controllers, false, false); return controllers; } Loading src/com/android/settings/accounts/AccountPersonalDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class AccountPersonalDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -87,7 +88,8 @@ public class AccountPersonalDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ false, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading src/com/android/settings/accounts/AccountPreferenceController.java +0 −9 Original line number Diff line number Diff line Loading @@ -194,9 +194,6 @@ public class AccountPreferenceController extends AbstractPreferenceController @Override public void updateDynamicRawDataToIndex(List<SearchIndexableRaw> rawData) { if (!isAvailable()) { return; } final Resources res = mContext.getResources(); final String screenTitle = res.getString(R.string.account_settings_title); Loading Loading @@ -288,12 +285,6 @@ public class AccountPreferenceController extends AbstractPreferenceController } private void updateUi() { if (!isAvailable()) { // This should not happen Log.e(TAG, "We should not be showing settings for a managed profile"); return; } for (int i = 0, size = mProfiles.size(); i < size; i++) { mProfiles.valueAt(i).pendingRemoval = true; } Loading src/com/android/settings/accounts/AccountPrivateDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,8 @@ public class AccountPrivateDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/true); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -86,7 +87,8 @@ public class AccountPrivateDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ false, /*isPrivateSpace=*/ true); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, authorities, controllers); return controllers; Loading src/com/android/settings/accounts/AccountWorkProfileDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/true); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/true, /*isPrivateSpace=*/false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -87,7 +88,8 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ true, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading Loading
src/com/android/settings/accounts/AccountDashboardFragment.java +12 −5 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.app.settings.SettingsEnums; import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.credentials.CredentialManager; import android.os.UserHandle; Loading Loading @@ -89,7 +90,8 @@ public class AccountDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -98,7 +100,8 @@ public class AccountDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers(context, controllers, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading @@ -110,9 +113,13 @@ public class AccountDashboardFragment extends DashboardFragment { } static void buildAutofillPreferenceControllers( Context context, List<AbstractPreferenceController> controllers) { Context context, List<AbstractPreferenceController> controllers, boolean isWorkProfile, boolean isPrivateSpace) { if (CredentialManager.isServiceEnabled(context)) { controllers.add(new DefaultCombinedPreferenceController(context)); controllers.add(new DefaultCombinedPreferenceController( context, isWorkProfile, isPrivateSpace)); controllers.add(new DefaultWorkCombinedPreferenceController(context)); controllers.add(new DefaultPrivateCombinedPreferenceController(context)); } else { Loading Loading @@ -162,7 +169,7 @@ public class AccountDashboardFragment extends DashboardFragment { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAccountPreferenceControllers( context, null /* parent */, null /* authorities*/, controllers); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers(context, controllers, false, false); return controllers; } Loading
src/com/android/settings/accounts/AccountPersonalDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class AccountPersonalDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/ false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -87,7 +88,8 @@ public class AccountPersonalDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ false, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading
src/com/android/settings/accounts/AccountPreferenceController.java +0 −9 Original line number Diff line number Diff line Loading @@ -194,9 +194,6 @@ public class AccountPreferenceController extends AbstractPreferenceController @Override public void updateDynamicRawDataToIndex(List<SearchIndexableRaw> rawData) { if (!isAvailable()) { return; } final Resources res = mContext.getResources(); final String screenTitle = res.getString(R.string.account_settings_title); Loading Loading @@ -288,12 +285,6 @@ public class AccountPreferenceController extends AbstractPreferenceController } private void updateUi() { if (!isAvailable()) { // This should not happen Log.e(TAG, "We should not be showing settings for a managed profile"); return; } for (int i = 0, size = mProfiles.size(); i < size; i++) { mProfiles.valueAt(i).pendingRemoval = true; } Loading
src/com/android/settings/accounts/AccountPrivateDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,8 @@ public class AccountPrivateDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/false, /*isPrivateSpace=*/true); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -86,7 +87,8 @@ public class AccountPrivateDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ false, /*isPrivateSpace=*/ true); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, authorities, controllers); return controllers; Loading
src/com/android/settings/accounts/AccountWorkProfileDashboardFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment { forceUpdatePreferences(); } }; cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/true); cmpp.init(this, getFragmentManager(), getIntent(), delegate, /*isWorkProfile=*/true, /*isPrivateSpace=*/false); } else { getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class)); } Loading @@ -87,7 +88,8 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); buildAutofillPreferenceControllers(context, controllers); buildAutofillPreferenceControllers( context, controllers, /*isWorkProfile=*/ true, /*isPrivateSpace=*/ false); final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES); buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers); return controllers; Loading