summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/users
diff options
context:
space:
mode:
authorAlexandra Gherghina <alexgherghina@google.com>2014-04-23 10:56:37 +0000
committerAlexandra Gherghina <alexgherghina@google.com>2014-04-24 18:06:06 +0100
commit423bafccbcd83fa7c4d5081c5251d60ffe991998 (patch)
tree6c8e6d26c5bb9e9af42cf078df62d2bb35ba1bf4 /src/com/android/settings/users
parent1502fba4be3ad08c7fb518dbbeb66802ee487d48 (diff)
downloadpackages_apps_Settings-423bafccbcd83fa7c4d5081c5251d60ffe991998.zip
packages_apps_Settings-423bafccbcd83fa7c4d5081c5251d60ffe991998.tar.gz
packages_apps_Settings-423bafccbcd83fa7c4d5081c5251d60ffe991998.tar.bz2
Revert "Revert "Wiring for displaying managed profiles""
This reverts commit 91e3f7256935f1c805878c3a5241b9e5b9a67e44. Will wait until related commit is in to submit this. Bug: 13756871 Change-Id: I34642998adb71f44de1e529cc214ac4f921932ed
Diffstat (limited to 'src/com/android/settings/users')
-rw-r--r--src/com/android/settings/users/UserSettings.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index d8213ff..0a66046 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -639,11 +639,23 @@ public class UserSettings extends RestrictedSettingsFragment
pref.setTitle(user.name);
}
if (!isInitialized(user)) {
- pref.setSummary(user.isRestricted()
- ? R.string.user_summary_restricted_not_set_up
- : R.string.user_summary_not_set_up);
+ if (user.isRestricted()) {
+ pref.setSummary(R.string.user_summary_restricted_not_set_up);
+ } else if (user.isManagedProfile()) {
+ pref.setSummary(R.string.user_summary_managed_profile_not_set_up);
+ } else {
+ pref.setSummary(R.string.user_summary_not_set_up);
+ }
} else if (user.isRestricted()) {
pref.setSummary(R.string.user_summary_restricted_profile);
+ } else if (user.isManagedProfile()) {
+ DevicePolicyManager dpm = (DevicePolicyManager)
+ getActivity().getSystemService(Context.DEVICE_POLICY_SERVICE);
+ if (dpm.isProfileEnabled(user.id)) {
+ pref.setSummary(R.string.user_summary_managed_profile);
+ } else {
+ pref.setSummary(R.string.user_summary_managed_profile_not_enabled);
+ }
}
if (user.iconPath != null) {
if (mUserIcons.get(user.id) == null) {