From 57de023a3c2cbbe30d990cefdc09631691dcb51d Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Wed, 3 May 2023 02:36:14 +0000 Subject: [PATCH] Make USER_CURRENT accessible by the Test Bug: 279699110 Test: atest ActivityVisibilityTests Change-Id: I41a22e691a7430dc9725891dc86e167a93248c3b --- core/api/test-current.txt | 1 + core/java/android/os/UserHandle.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index ae63816945e18..dac257f767160 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -2360,6 +2360,7 @@ package android.os { method public static boolean isApp(int); field public static final int MIN_SECONDARY_USER_ID = 10; // 0xa field public static final int USER_ALL = -1; // 0xffffffff + field public static final int USER_CURRENT = -2; // 0xfffffffe field public static final int USER_NULL = -10000; // 0xffffd8f0 field public static final int USER_SYSTEM = 0; // 0x0 } diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index 4ce9184f0b969..ef3901082833c 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -56,6 +56,7 @@ public final class UserHandle implements Parcelable { /** @hide A user id to indicate the currently active user */ @UnsupportedAppUsage + @TestApi public static final @UserIdInt int USER_CURRENT = -2; /** @hide A user handle to indicate the current user of the device */