Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f367e02 authored by Oli Lan's avatar Oli Lan Committed by Automerger Merge Worker
Browse files

Add UserManagerInternal method to get the main user id. am: 051f5714 am: cc920b54

parents 8c08e338 cc920b54
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -305,4 +305,10 @@ public abstract class UserManagerInternal {
     * for users that already existed on-disk from an older version of Android.
     */
    public abstract boolean shouldIgnorePrepareStorageErrors(int userId);

    /**
     * Returns the user id of the main user, or {@link android.os.UserHandle#USER_NULL} if there is
     * no main user.
     */
    public abstract @UserIdInt int getMainUserId();
}
+5 −0
Original line number Diff line number Diff line
@@ -6376,6 +6376,11 @@ public class UserManagerService extends IUserManager.Stub {
                return userData != null && userData.getIgnorePrepareStorageErrors();
            }
        }

        @Override
        public @UserIdInt int getMainUserId() {
            return UserHandle.USER_SYSTEM;
        }
    }

    /**