Loading api/current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -28100,11 +28100,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle); api/system-current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -30094,11 +30094,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle); api/test-current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -28100,11 +28100,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle); core/java/android/os/UserManager.java +31 −0 Original line number Diff line number Diff line Loading @@ -781,6 +781,7 @@ public class UserManager { * pattern or PIN), and credential-encrypted private app data storage is * available. */ @Deprecated public boolean isUserRunningAndLocked() { return isUserRunningAndLocked(Process.myUserHandle()); } Loading @@ -793,6 +794,7 @@ public class UserManager { * * @param user to retrieve the unlocked state for. */ @Deprecated public boolean isUserRunningAndLocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( Loading @@ -808,6 +810,7 @@ public class UserManager { * pattern or PIN), and credential-encrypted private app data storage is * available. */ @Deprecated public boolean isUserRunningAndUnlocked() { return isUserRunningAndUnlocked(Process.myUserHandle()); } Loading @@ -820,6 +823,7 @@ public class UserManager { * * @param user to retrieve the unlocked state for. */ @Deprecated public boolean isUserRunningAndUnlocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( Loading @@ -829,6 +833,33 @@ public class UserManager { } } /** * Return whether the calling user is running in an "unlocked" state. A user * is unlocked only after they've entered their credentials (such as a lock * pattern or PIN), and credential-encrypted private app data storage is * available. */ public boolean isUserUnlocked() { return isUserUnlocked(Process.myUserHandle()); } /** * Return whether the given user is running in an "unlocked" state. A user * is unlocked only after they've entered their credentials (such as a lock * pattern or PIN), and credential-encrypted private app data storage is * available. * * @param user to retrieve the unlocked state for. */ public boolean isUserUnlocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; } } /** * Returns the UserInfo object describing a specific user. * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. Loading Loading
api/current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -28100,11 +28100,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle);
api/system-current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -30094,11 +30094,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle);
api/test-current.txt +6 −4 Original line number Diff line number Diff line Loading @@ -28100,11 +28100,13 @@ package android.os { method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningAndLocked(); method public boolean isUserRunningAndLocked(android.os.UserHandle); method public boolean isUserRunningAndUnlocked(); method public boolean isUserRunningAndUnlocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndLocked(); method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle); method public deprecated boolean isUserRunningAndUnlocked(); method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public boolean isUserUnlocked(); method public boolean isUserUnlocked(android.os.UserHandle); method public deprecated boolean setRestrictionsChallenge(java.lang.String); method public deprecated void setUserRestriction(java.lang.String, boolean); method public deprecated void setUserRestrictions(android.os.Bundle);
core/java/android/os/UserManager.java +31 −0 Original line number Diff line number Diff line Loading @@ -781,6 +781,7 @@ public class UserManager { * pattern or PIN), and credential-encrypted private app data storage is * available. */ @Deprecated public boolean isUserRunningAndLocked() { return isUserRunningAndLocked(Process.myUserHandle()); } Loading @@ -793,6 +794,7 @@ public class UserManager { * * @param user to retrieve the unlocked state for. */ @Deprecated public boolean isUserRunningAndLocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( Loading @@ -808,6 +810,7 @@ public class UserManager { * pattern or PIN), and credential-encrypted private app data storage is * available. */ @Deprecated public boolean isUserRunningAndUnlocked() { return isUserRunningAndUnlocked(Process.myUserHandle()); } Loading @@ -820,6 +823,7 @@ public class UserManager { * * @param user to retrieve the unlocked state for. */ @Deprecated public boolean isUserRunningAndUnlocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( Loading @@ -829,6 +833,33 @@ public class UserManager { } } /** * Return whether the calling user is running in an "unlocked" state. A user * is unlocked only after they've entered their credentials (such as a lock * pattern or PIN), and credential-encrypted private app data storage is * available. */ public boolean isUserUnlocked() { return isUserUnlocked(Process.myUserHandle()); } /** * Return whether the given user is running in an "unlocked" state. A user * is unlocked only after they've entered their credentials (such as a lock * pattern or PIN), and credential-encrypted private app data storage is * available. * * @param user to retrieve the unlocked state for. */ public boolean isUserUnlocked(UserHandle user) { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; } } /** * Returns the UserInfo object describing a specific user. * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. Loading