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

Commit d9807a66 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Don't calculate isSameProfileGroup twice

Minor improvement: we already calculated isSameProfileGroup
immediately above; no need to calculate again.

Test: compiles
Change-Id: I2cb1722511004ffceee88dc4b9eb0b8a9e292db6
parent 75301c4b
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;