Merge "Push unlocking/unlocked state to UserManager" into nyc-dev am: fdc675968c am: 6b366a34ee
am: 5a8fb5004c
* commit '5a8fb5004ce396716660ca115e1d583c869570b7':
Push unlocking/unlocked state to UserManager
Change-Id: I9796ecc6ded494c9ad8dd8a10600f6eae593ce01
This commit is contained in:
@@ -998,6 +998,7 @@ public class UserManager {
|
||||
|
||||
/** {@hide} */
|
||||
public boolean isUserUnlockingOrUnlocked(@UserIdInt int userId) {
|
||||
// TODO Switch to using UMS internal isUserUnlockingOrUnlocked
|
||||
try {
|
||||
return ActivityManagerNative.getDefault().isUserRunning(userId,
|
||||
ActivityManager.FLAG_AND_UNLOCKING_OR_UNLOCKED);
|
||||
|
||||
@@ -126,4 +126,18 @@ public abstract class UserManagerInternal {
|
||||
* createAndManageUser is called by the device owner.
|
||||
*/
|
||||
public abstract UserInfo createUserEvenWhenDisallowed(String name, int flags);
|
||||
|
||||
/**
|
||||
* Return whether the given user is running in an
|
||||
* {@link com.android.server.am.UserState#STATE_RUNNING_UNLOCKING "unlocking"} or
|
||||
* {@link com.android.server.am.UserState#STATE_RUNNING_UNLOCKED "unlocked"} state.
|
||||
*/
|
||||
public abstract boolean isUserUnlockingOrUnlocked(int userId);
|
||||
|
||||
/**
|
||||
* Sets whether the given user is running in an
|
||||
* {@link com.android.server.am.UserState#STATE_RUNNING_UNLOCKING "unlocking"} or
|
||||
* {@link com.android.server.am.UserState#STATE_RUNNING_UNLOCKED "unlocked"} state.
|
||||
*/
|
||||
public abstract void setUserUnlockingOrUnlocked(int userId, boolean unlockingOrUnlocked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user