Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53d63dcd authored by Sander Alewijnse's avatar Sander Alewijnse
Browse files

Added the restrictions pending application restrictions key.

Bug:17632522
Change-Id: If5a0d0ea1f479b0584fc0b1cff2a179d296d2904
parent 4bc3c8bd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4404,9 +4404,9 @@ package android.app {
    method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence);
    method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
    method public boolean inKeyguardRestrictedInputMode();
    method public boolean isKeyguardInTrustedState();
    method public boolean isKeyguardLocked();
    method public boolean isKeyguardSecure();
    method public boolean isKeyguardInTrustedState();
    method public deprecated android.app.KeyguardManager.KeyguardLock newKeyguardLock(java.lang.String);
  }
@@ -22355,6 +22355,7 @@ package android.os {
    field public static final java.lang.String DISALLOW_UNMUTE_MICROPHONE = "no_unmute_microphone";
    field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
    field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
    field public static final java.lang.String KEY_RESTRICTIONS_PENDING = "restrictions_pending";
  }
  public abstract class Vibrator {
+6 −0
Original line number Diff line number Diff line
@@ -2584,6 +2584,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.
     *
@@ -2591,6 +2595,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) {
+18 −0
Original line number Diff line number Diff line
@@ -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 */