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

Commit 903dd899 authored by Yvonne Jiang's avatar Yvonne Jiang
Browse files

Fix user id check in createConfirmSupervisionCredentialsIntent.

Bug: 406877588
Test: atest CtsSupervisionTestCases
Test: atest SupervisionServiceTest
Flag: android.app.supervision.flags.supervision_manager_apis
Change-Id: I74ef7aa86d40f6e352b84040532ec7ae4d4c089b
parent 37af29e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ public class SupervisionService extends ISupervisionManager.Stub {
    @Nullable
    public Intent createConfirmSupervisionCredentialsIntent() {
        enforceAnyPermission(QUERY_USERS, MANAGE_USERS);
        if (!isSupervisionEnabledForUser(mContext.getUserId())) {
        if (!isSupervisionEnabledForUser(UserHandle.getCallingUserId())) {
            return null;
        }
        // Verify the supervising user profile exists and has a secure credential set.