Merge "Modify account page multiple profile UI"

This commit is contained in:
TreeHugger Robot
2019-11-08 03:48:32 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 9 deletions

View File

@@ -32,7 +32,6 @@
app:tabMaxWidth="0dp" app:tabMaxWidth="0dp"
app:tabGravity="fill" app:tabGravity="fill"
app:tabMode="fixed" app:tabMode="fixed"
app:tabIndicatorFullWidth="false"
app:tabIndicatorColor="@*android:color/accent_device_default" app:tabIndicatorColor="@*android:color/accent_device_default"
app:tabSelectedTextColor="@*android:color/accent_device_default" app:tabSelectedTextColor="@*android:color/accent_device_default"
app:tabTextColor="?android:attr/textColorSecondary" /> app:tabTextColor="?android:attr/textColorSecondary" />

View File

@@ -329,19 +329,23 @@ public class AccountPreferenceController extends AbstractPreferenceController
preferenceGroup.setContentDescription( preferenceGroup.setContentDescription(
mContext.getString(R.string.account_settings)); mContext.getString(R.string.account_settings));
} else if (userInfo.isManagedProfile()) { } else if (userInfo.isManagedProfile()) {
preferenceGroup.setTitle(R.string.category_work); if (mType == ProfileSelectFragment.ALL) {
String workGroupSummary = getWorkGroupSummary(context, userInfo); preferenceGroup.setTitle(R.string.category_work);
preferenceGroup.setSummary(workGroupSummary); final String workGroupSummary = getWorkGroupSummary(context, userInfo);
preferenceGroup.setContentDescription( preferenceGroup.setSummary(workGroupSummary);
mContext.getString(R.string.accessibility_category_work, workGroupSummary)); preferenceGroup.setContentDescription(
mContext.getString(R.string.accessibility_category_work, workGroupSummary));
}
profileData.removeWorkProfilePreference = newRemoveWorkProfilePreference(); profileData.removeWorkProfilePreference = newRemoveWorkProfilePreference();
mHelper.enforceRestrictionOnPreference(profileData.removeWorkProfilePreference, mHelper.enforceRestrictionOnPreference(profileData.removeWorkProfilePreference,
DISALLOW_REMOVE_MANAGED_PROFILE, UserHandle.myUserId()); DISALLOW_REMOVE_MANAGED_PROFILE, UserHandle.myUserId());
profileData.managedProfilePreference = newManagedProfileSettings(); profileData.managedProfilePreference = newManagedProfileSettings();
} else { } else {
preferenceGroup.setTitle(R.string.category_personal); if (mType == ProfileSelectFragment.ALL) {
preferenceGroup.setContentDescription( preferenceGroup.setTitle(R.string.category_personal);
mContext.getString(R.string.accessibility_category_personal)); preferenceGroup.setContentDescription(
mContext.getString(R.string.accessibility_category_personal));
}
} }
final PreferenceScreen screen = mParent.getPreferenceScreen(); final PreferenceScreen screen = mParent.getPreferenceScreen();
if (screen != null) { if (screen != null) {