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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user