Three kinds of owner info - owner, user and profile

Bug: 8736733

Put the summary "Restricted profile" under the user name in app restrictions panel.
Bug: 8736734

Change-Id: I6b724bd10a9246eb57831bffb737a48c01e0c285
This commit is contained in:
Amith Yamasani
2013-04-28 22:13:22 -07:00
parent c5b036571e
commit b017171587
6 changed files with 27 additions and 7 deletions

View File

@@ -350,11 +350,15 @@ public class UserSettings extends SettingsPreferenceFragment
} else if (info.id == UserHandle.myUserId()) {
// Jump to owner info panel
Bundle extras = new Bundle();
extras.putBoolean(OwnerInfoSettings.EXTRA_SHOW_NICKNAME, true);
if (!info.isRestricted()) {
extras.putBoolean(OwnerInfoSettings.EXTRA_SHOW_NICKNAME, true);
}
int titleResId = info.id == UserHandle.USER_OWNER ? R.string.owner_info_settings_title
: (info.isRestricted() ? R.string.profile_info_settings_title
: R.string.user_info_settings_title);
((PreferenceActivity) getActivity()).startPreferencePanel(
OwnerInfoSettings.class.getName(),
extras, R.string.user_info_settings_title, null,
null, 0);
extras, titleResId, null, null, 0);
}
}