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

Commit 65815089 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't calculate isSameProfileGroup twice"

parents a12326e5 d9807a66
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1891,8 +1891,7 @@ class UserController implements Handler.Callback {
        if (callingUid != 0 && callingUid != SYSTEM_UID) {
            final boolean allow;
            final boolean isSameProfileGroup = isSameProfileGroup(callingUserId, targetUserId);
            if (mInjector.isCallerRecents(callingUid)
                    && isSameProfileGroup(callingUserId, targetUserId)) {
            if (mInjector.isCallerRecents(callingUid) && isSameProfileGroup) {
                // If the caller is Recents and the caller has ownership of the profile group,
                // we then allow it to access its profiles.
                allow = true;