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

Commit 9ec9d49f authored by Omer Ozer's avatar Omer Ozer
Browse files

Clear calling app identity before device config check

Bug: 268143699
Test: manual
Change-Id: I34ac9247ebdb283da0ff563c3e8634bb381a0bdc
parent 080f35d7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -245,8 +245,13 @@ public final class CredentialManagerService
    }

    public static boolean isCredentialDescriptionApiEnabled() {
        final long origId = Binder.clearCallingIdentity();
        try {
            return DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_CREDENTIAL, DEVICE_CONFIG_ENABLE_CREDENTIAL_DESC_API, false);
        } finally {
            Binder.restoreCallingIdentity(origId);
        }
    }

    @SuppressWarnings("GuardedBy") // ErrorProne requires initiateProviderSessionForRequestLocked