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

Commit 615b6c4e authored by Antony Sargent's avatar Antony Sargent Committed by Android (Google) Code Review
Browse files

Merge "Rename LOCK_STATE_ALWAYS_LOCKED to LOCK_STATE_DEFAULT"

parents 5fa64ead e1db351b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2778,8 +2778,8 @@ package android.companion.virtual {
    method @NonNull public java.util.Set<android.os.UserHandle> getUsersWithMatchingAccounts();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.companion.virtual.VirtualDeviceParams> CREATOR;
    field public static final int LOCK_STATE_ALWAYS_LOCKED = 0; // 0x0
    field public static final int LOCK_STATE_ALWAYS_UNLOCKED = 1; // 0x1
    field public static final int LOCK_STATE_DEFAULT = 0; // 0x0
  }
  public static final class VirtualDeviceParams.Builder {
+7 −6
Original line number Diff line number Diff line
@@ -48,15 +48,16 @@ public final class VirtualDeviceParams implements Parcelable {

    /** @hide */
    @IntDef(prefix = "LOCK_STATE_",
            value = {LOCK_STATE_ALWAYS_LOCKED, LOCK_STATE_ALWAYS_UNLOCKED})
            value = {LOCK_STATE_DEFAULT, LOCK_STATE_ALWAYS_UNLOCKED})
    @Retention(RetentionPolicy.SOURCE)
    @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
    public @interface LockState {}

    /**
     * Indicates that the lock state of the virtual device should be always locked.
     * Indicates that the lock state of the virtual device will be the same as the default physical
     * display.
     */
    public static final int LOCK_STATE_ALWAYS_LOCKED = 0;
    public static final int LOCK_STATE_DEFAULT = 0;

    /**
     * Indicates that the lock state of the virtual device should be always unlocked.
@@ -199,7 +200,7 @@ public final class VirtualDeviceParams implements Parcelable {
     */
    public static final class Builder {

        private @LockState int mLockState = LOCK_STATE_ALWAYS_LOCKED;
        private @LockState int mLockState = LOCK_STATE_DEFAULT;
        private Set<UserHandle> mUsersWithMatchingAccounts;
        @Nullable private Set<ComponentName> mBlockedActivities;
        @Nullable private Set<ComponentName> mAllowedActivities;
@@ -207,9 +208,9 @@ public final class VirtualDeviceParams implements Parcelable {
        /**
         * Sets the lock state of the device. The permission {@code ADD_ALWAYS_UNLOCKED_DISPLAY}
         * is required if this is set to {@link #LOCK_STATE_ALWAYS_UNLOCKED}.
         * The default is {@link #LOCK_STATE_ALWAYS_LOCKED}.
         * The default is {@link #LOCK_STATE_DEFAULT}.
         *
         * @param lockState The lock state, either {@link #LOCK_STATE_ALWAYS_LOCKED} or
         * @param lockState The lock state, either {@link #LOCK_STATE_DEFAULT} or
         *   {@link #LOCK_STATE_ALWAYS_UNLOCKED}.
         */
        @RequiresPermission(value = ADD_ALWAYS_UNLOCKED_DISPLAY, conditional = true)