summaryrefslogtreecommitdiffstats
path: root/core/java/android/os
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2014-09-18 09:42:42 -0700
committerAmith Yamasani <yamasani@google.com>2014-09-18 15:14:26 -0700
commitc34dc7cdeb5cae8ca4c731838aafe90ed4c9a2b8 (patch)
tree59d52438aef7f922ae643abb4d3c313da95a2d8e /core/java/android/os
parent1067b6e7edf573f41f00e7e90fd679f6e74daca6 (diff)
downloadframeworks_base-c34dc7cdeb5cae8ca4c731838aafe90ed4c9a2b8.zip
frameworks_base-c34dc7cdeb5cae8ca4c731838aafe90ed4c9a2b8.tar.gz
frameworks_base-c34dc7cdeb5cae8ca4c731838aafe90ed4c9a2b8.tar.bz2
Allow primary user profile owner to set device restrictions
In addition to device owners, profile owners on the primary user can also set user restrictions that are necessary to lock down the user. This is to enable the case of a profile owner registered after setup wizard is completed, on the primary user. Also make managed profile vs. profile wording consistent in the DevicePolicyManager docs. Bug: 17555025 Change-Id: Ib9d08b8af34a99b25e11757fa7dc83673a7deb32
Diffstat (limited to 'core/java/android/os')
-rw-r--r--core/java/android/os/UserManager.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 82016c3..2315c74 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -123,7 +123,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from transferring files over
- * USB. This can only be set by device owners. The default value is <code>false</code>.
+ * USB. This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -178,8 +179,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from configuring Tethering
- * & portable hotspots. This can only be set by device owners. The default value is
- * <code>false</code>.
+ * & portable hotspots. This can only be set by device owners and profile owners on the
+ * primary user. The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -190,8 +191,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from factory resetting
- * from Settings. This can only be set by device owners. The default value is
- * <code>false</code>.
+ * from Settings. This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -202,7 +203,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from adding new users and
- * profiles. This can only be set by device owners. The default value is <code>false</code>.
+ * profiles. This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -224,7 +226,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from configuring cell
- * broadcasts. This can only be set by device owners. The default value is <code>false</code>.
+ * broadcasts. This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -235,7 +238,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from configuring mobile
- * networks. This can only be set by device owners. The default value is <code>false</code>.
+ * networks. This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -266,8 +270,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from mounting
- * physical external media. This can only be set by device owners. The default value is
- * <code>false</code>.
+ * physical external media. This can only be set by device owners and profile owners on the
+ * primary user. The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -278,8 +282,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from adjusting microphone
- * volume. If set, the microphone will be muted. This can only be set by device owners.
- * The default value is <code>false</code>.
+ * volume. If set, the microphone will be muted. This can only be set by device owners
+ * and profile owners on the primary user. The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -290,8 +294,8 @@ public class UserManager {
/**
* Specifies if a user is disallowed from adjusting the master
- * volume. If set, the master volume will be muted. This can only be set by device owners.
- * The default value is <code>false</code>.
+ * volume. If set, the master volume will be muted. This can only be set by device owners
+ * and profile owners on the primary user. The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -314,7 +318,7 @@ public class UserManager {
/**
* Specifies that the user is not allowed to send or receive
- * SMS messages. This can only be set by device owners. The default value is <code>false</code>.
+ * SMS messages. The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean
@@ -333,7 +337,8 @@ public class UserManager {
* <li>{@link LayoutParams#TYPE_SYSTEM_ERROR}</li>
* <li>{@link LayoutParams#TYPE_SYSTEM_OVERLAY}</li>
*
- * <p>This can only be set by device owners. The default value is <code>false</code>.
+ * <p>This can only be set by device owners and profile owners on the primary user.
+ * The default value is <code>false</code>.
*
* <p/>Key for user restrictions.
* <p/>Type: Boolean