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

Commit 4744da87 authored by Anna Bauza's avatar Anna Bauza Committed by Android (Google) Code Review
Browse files

Merge "Fix early access to cacheUserSerialNumber API" into main

parents cf7ea371 7bd8b480
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -6442,7 +6442,11 @@ public class UserManager {
     */
    @UnsupportedAppUsage
    public int getUserSerialNumber(@UserIdInt int userId) {
        if (android.multiuser.Flags.cacheUserSerialNumber()) {
        // Read only flag should is to fix early access to this API
        // cacheUserSerialNumber to be removed after the
        // cacheUserSerialNumberReadOnly is fully rolled out
        if (android.multiuser.Flags.cacheUserSerialNumberReadOnly()
                || android.multiuser.Flags.cacheUserSerialNumber()) {
            // System user serial number is always 0, and it always exists.
            // There is no need to call binder for that.
            if (userId == UserHandle.USER_SYSTEM) {