diff options
| author | 2025-02-12 16:57:28 -0800 | |
|---|---|---|
| committer | 2025-02-12 16:57:28 -0800 | |
| commit | 8fe8eff756b1678e436c9e0421dffa32a9979bdb (patch) | |
| tree | 9d40782ede76807b20f8c01095dbe34fadae758e | |
| parent | 01694b7b66c1f61313bd5b2c94ef60018a3a50b6 (diff) | |
| parent | 340f45bb4aead3b8930e7412057de48609921287 (diff) | |
Merge "getUserLogoutability() to have user id as argument" into main
| -rw-r--r-- | core/java/android/os/UserManager.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 08365c935626..33bf4a29ecc6 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -2776,7 +2776,7 @@ public class UserManager { } /** - * Returns whether logging out is currently allowed for the context user. + * Returns whether logging out is currently allowed for the specified user. * * <p>Logging out is not allowed in the following cases: * <ol> @@ -2794,11 +2794,10 @@ public class UserManager { * {@link #LOGOUTABILITY_STATUS_CANNOT_SWITCH}. * @hide */ - @UserHandleAware @RequiresPermission(Manifest.permission.MANAGE_USERS) - public @UserLogoutability int getUserLogoutability() { + public @UserLogoutability int getUserLogoutability(@UserIdInt int userId) { try { - return mService.getUserLogoutability(mUserId); + return mService.getUserLogoutability(userId); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } |