summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-07-27 14:28:00 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-07-27 14:28:00 +0000
commit658150895efcf91d2bc862774473291372682cf1 (patch)
treedc02e71597c1f8ce4e6e92b186d0282e4e21569e
parenta12326e5c05e6938f1d9edf93e4cd2000cdfed23 (diff)
parentd9807a663e2b26079bd486632b432b07ff9099dd (diff)
Merge "Don't calculate isSameProfileGroup twice"
-rw-r--r--services/core/java/com/android/server/am/UserController.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 9562158f9bb6..1bf761ff9d2a 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -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;