Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23658,6 +23658,7 @@ package android.os { method public android.os.Bundle getUserRestrictions(); method public android.os.Bundle getUserRestrictions(android.os.UserHandle); method public boolean hasUserRestriction(java.lang.String); method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25558,6 +25558,7 @@ package android.os { method public android.os.Bundle getUserRestrictions(android.os.UserHandle); method public boolean hasUserRestriction(java.lang.String); method public boolean isManagedProfile(); method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); core/java/android/os/UserManager.java +13 −2 Original line number Diff line number Diff line Loading @@ -466,9 +466,9 @@ public class UserManager { } /** * Returns the user handle for the user that the calling process is running on. * Returns the user handle for the user that this process is running under. * * @return the user handle of the user making this call. * @return the user handle of this process. * @hide */ public int getUserHandle() { Loading Loading @@ -504,6 +504,17 @@ public class UserManager { .isPackageAvailable("com.coffeestainstudios.goatsimulator"); } /** * Used to check if this process is running under the system user. The system user * is the initial user that is implicitly created on first boot and hosts most of the * system services. * * @return whether this process is running under the system user. */ public boolean isSystemUser() { return UserHandle.myUserId() == UserHandle.USER_OWNER; } /** * Used to check if the user making this call is linked to another user. Linked users may have * a reduced number of available apps, app restrictions and account restrictions. Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23658,6 +23658,7 @@ package android.os { method public android.os.Bundle getUserRestrictions(); method public android.os.Bundle getUserRestrictions(android.os.UserHandle); method public boolean hasUserRestriction(java.lang.String); method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle);
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25558,6 +25558,7 @@ package android.os { method public android.os.Bundle getUserRestrictions(android.os.UserHandle); method public boolean hasUserRestriction(java.lang.String); method public boolean isManagedProfile(); method public boolean isSystemUser(); method public boolean isUserAGoat(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle);
core/java/android/os/UserManager.java +13 −2 Original line number Diff line number Diff line Loading @@ -466,9 +466,9 @@ public class UserManager { } /** * Returns the user handle for the user that the calling process is running on. * Returns the user handle for the user that this process is running under. * * @return the user handle of the user making this call. * @return the user handle of this process. * @hide */ public int getUserHandle() { Loading Loading @@ -504,6 +504,17 @@ public class UserManager { .isPackageAvailable("com.coffeestainstudios.goatsimulator"); } /** * Used to check if this process is running under the system user. The system user * is the initial user that is implicitly created on first boot and hosts most of the * system services. * * @return whether this process is running under the system user. */ public boolean isSystemUser() { return UserHandle.myUserId() == UserHandle.USER_OWNER; } /** * Used to check if the user making this call is linked to another user. Linked users may have * a reduced number of available apps, app restrictions and account restrictions. Loading