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

Commit f8cd83ff authored by Pavel Grafov's avatar Pavel Grafov Committed by Android (Google) Code Review
Browse files

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

parents a3c2e847 67f11e65
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;