diff --git a/res/layout/profile_select_tablayout.xml b/res/layout/profile_select_tablayout.xml index 8c0ca8c080d..3e83bb9b2c4 100644 --- a/res/layout/profile_select_tablayout.xml +++ b/res/layout/profile_select_tablayout.xml @@ -32,7 +32,6 @@ app:tabMaxWidth="0dp" app:tabGravity="fill" app:tabMode="fixed" - app:tabIndicatorFullWidth="false" app:tabIndicatorColor="@*android:color/accent_device_default" app:tabSelectedTextColor="@*android:color/accent_device_default" app:tabTextColor="?android:attr/textColorSecondary" /> diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java index 8e3e7022e7d..6e1727b004d 100644 --- a/src/com/android/settings/accounts/AccountPreferenceController.java +++ b/src/com/android/settings/accounts/AccountPreferenceController.java @@ -329,19 +329,23 @@ public class AccountPreferenceController extends AbstractPreferenceController preferenceGroup.setContentDescription( mContext.getString(R.string.account_settings)); } else if (userInfo.isManagedProfile()) { - preferenceGroup.setTitle(R.string.category_work); - String workGroupSummary = getWorkGroupSummary(context, userInfo); - preferenceGroup.setSummary(workGroupSummary); - preferenceGroup.setContentDescription( - mContext.getString(R.string.accessibility_category_work, workGroupSummary)); + if (mType == ProfileSelectFragment.ALL) { + preferenceGroup.setTitle(R.string.category_work); + final String workGroupSummary = getWorkGroupSummary(context, userInfo); + preferenceGroup.setSummary(workGroupSummary); + preferenceGroup.setContentDescription( + mContext.getString(R.string.accessibility_category_work, workGroupSummary)); + } profileData.removeWorkProfilePreference = newRemoveWorkProfilePreference(); mHelper.enforceRestrictionOnPreference(profileData.removeWorkProfilePreference, DISALLOW_REMOVE_MANAGED_PROFILE, UserHandle.myUserId()); profileData.managedProfilePreference = newManagedProfileSettings(); } else { - preferenceGroup.setTitle(R.string.category_personal); - preferenceGroup.setContentDescription( - mContext.getString(R.string.accessibility_category_personal)); + if (mType == ProfileSelectFragment.ALL) { + preferenceGroup.setTitle(R.string.category_personal); + preferenceGroup.setContentDescription( + mContext.getString(R.string.accessibility_category_personal)); + } } final PreferenceScreen screen = mParent.getPreferenceScreen(); if (screen != null) {