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

Commit 9074cb61 authored by Pavel Grafov's avatar Pavel Grafov Committed by Automerger Merge Worker
Browse files

Merge "Make sure DPC knows if revoke fails" into sc-dev am: f8cd83ff

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14266665

Change-Id: I6b2db423a05f372d778b5fe39ec549fcfd339f2d
parents 173301c9 f8cd83ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ interface IKeyChainService {
    boolean isCredentialManagementApp(String packageName);

    // APIs used by KeyChainActivity
    void setGrant(int uid, String alias, boolean value);
    // setGrant may fail with value=false when ungrant operation fails in KeyStore.
    boolean setGrant(int uid, String alias, boolean value);
    boolean hasGrant(int uid, String alias);

    // API used by Wifi
+1 −2
Original line number Diff line number Diff line
@@ -5662,8 +5662,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
            try (KeyChainConnection keyChainConnection =
                         KeyChain.bindAsUser(mContext, userHandle)) {
                IKeyChainService keyChain = keyChainConnection.getService();
                keyChain.setGrant(granteeUid, alias, hasGrant);
                return true;
                return keyChain.setGrant(granteeUid, alias, hasGrant);
            } catch (RemoteException e) {
                Slogf.e(LOG_TAG, "Setting grant for package.", e);
                return false;