diff options
| author | Sander Alewijnse <salewijnse@google.com> | 2014-11-07 22:30:50 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-07 22:30:50 +0000 |
| commit | 8c1cd7e61f050afd450cb05add633e2fbe0b195a (patch) | |
| tree | 06343a59fd00a8f7433548aa84948444ec109212 /core/java | |
| parent | c30a7623a2f97ce791ed019d7014b842f9c9b7d2 (diff) | |
| parent | 3eed90f39301089a1c16d6e2c0d027b187567cf0 (diff) | |
| download | frameworks_base-8c1cd7e61f050afd450cb05add633e2fbe0b195a.zip frameworks_base-8c1cd7e61f050afd450cb05add633e2fbe0b195a.tar.gz frameworks_base-8c1cd7e61f050afd450cb05add633e2fbe0b195a.tar.bz2 | |
am 3eed90f3: Merge "Added the restrictions pending application restrictions key." into lmp-mr1-dev
* commit '3eed90f39301089a1c16d6e2c0d027b187567cf0':
Added the restrictions pending application restrictions key.
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 6 | ||||
| -rw-r--r-- | core/java/android/os/UserManager.java | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index d3ff79d..cf7c5e5 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -2586,6 +2586,10 @@ public class DevicePolicyManager { * <p>The application restrictions are only made visible to the target application and the * profile or device owner. * + * <p>If the restrictions are not available yet, but may be applied in the near future, + * the admin can notify the target application of that by adding + * {@link UserManager#KEY_RESTRICTIONS_PENDING} to the settings parameter. + * * <p>The calling device admin must be a profile or device owner; if it is not, a security * exception will be thrown. * @@ -2593,6 +2597,8 @@ public class DevicePolicyManager { * @param packageName The name of the package to update restricted settings for. * @param settings A {@link Bundle} to be parsed by the receiving application, conveying a new * set of active restrictions. + * + * @see UserManager#KEY_RESTRICTIONS_PENDING */ public void setApplicationRestrictions(ComponentName admin, String packageName, Bundle settings) { diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 3234e77..8ffd8f4 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -371,6 +371,24 @@ public class UserManager { */ public static final String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; + /** + * Application restriction key that is used to indicate the pending arrival + * of real restrictions for the app. + * + * <p> + * Applications that support restrictions should check for the presence of this key. + * A <code>true</code> value indicates that restrictions may be applied in the near + * future but are not available yet. It is the responsibility of any + * management application that sets this flag to update it when the final + * restrictions are enforced. + * + * <p/>Key for application restrictions. + * <p/>Type: Boolean + * @see android.app.admin.DevicePolicyManager#addApplicationRestriction() + * @see android.app.admin.DevicePolicyManager#getApplicationRestriction() + */ + public static final String KEY_RESTRICTIONS_PENDING = "restrictions_pending"; + /** @hide */ public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3; /** @hide */ |
