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

Commit 3d43f63a authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas
Browse files

Replace isChangeEnabled() package name argument.

In DPMS.setKeyGrantForApp() the isChangeEnabled() method call takes the
wrong argument. Should take "callerPackage" variable not the
"packageName" variable.

Fixes: 247969365
Test: atest KeyManagementTest#grantKeyPairToApp_nonExistent_throwsIllegalArgumentException
Change-Id: Ifab8b1c980e7a5a63037b9a8da268ae367e706ff
parent c760f482
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5725,7 +5725,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        try {
            return setKeyChainGrantInternal(alias, hasGrant, granteeUid, caller.getUserHandle());
        } catch (IllegalArgumentException e) {
            if (mInjector.isChangeEnabled(THROW_EXCEPTION_WHEN_KEY_MISSING, packageName,
            if (mInjector.isChangeEnabled(THROW_EXCEPTION_WHEN_KEY_MISSING, callerPackage,
                    caller.getUserId())) {
                throw e;
            }