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

Commit cc920b54 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

parents ffa3b1c8 051f5714
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
@@ -6318,6 +6318,11 @@ public class UserManagerService extends IUserManager.Stub {
                return userData != null && userData.getIgnorePrepareStorageErrors();
            }
        }

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

    /**