summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorAntony Sargent <asargent@google.com>2022-02-09 17:08:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-02-09 17:08:28 +0000
commit615b6c4e5dce96d31cb8651d18795cac4d0db287 (patch)
tree8a6f7c01e70db341ea384c607bd09341a64f4e6a /core/java
parent5fa64ead9079ec89e06ad87162422ec891b74ba6 (diff)
parente1db351bfb9ee89a0333113b1c44c57c537f9eb1 (diff)
Merge "Rename LOCK_STATE_ALWAYS_LOCKED to LOCK_STATE_DEFAULT"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/companion/virtual/VirtualDeviceParams.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/companion/virtual/VirtualDeviceParams.java b/core/java/android/companion/virtual/VirtualDeviceParams.java
index 1d0f7c091807..45d0ad51da04 100644
--- a/core/java/android/companion/virtual/VirtualDeviceParams.java
+++ b/core/java/android/companion/virtual/VirtualDeviceParams.java
@@ -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)