From 917bf2e93bdfac05ddc7bb3baade4b118107a636 Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Wed, 17 Jan 2024 13:52:00 -0800 Subject: [ECM] Correct trusted installer logic This was a boolean logic typo. Correct the logic by inverting it, and use a variable to make the intention clear. Obviously, being installed from a trusted installer should imply *more* trustworthiness, not less. Bug: 310655061 Test: manual Change-Id: Ic1e0b19d5565011bc3aa0dd151b49ff0d0b2458b --- framework-s/java/android/app/ecm/EnhancedConfirmationManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework-s/java') diff --git a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java index 23dc10c71..4f1edb092 100644 --- a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java +++ b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java @@ -358,8 +358,9 @@ public final class EnhancedConfirmationManager { // ECM doesn't consider a transitive chain of trust for install sources. // If this package hasn't been explicitly handled by this point // then it is exempt from ECM if the immediate parent is a trusted installer - return installSource.getInstallingPackageName() != null && isAppTrustedInstaller( - installSource.getInstallingPackageName()); + boolean installedFromTrustedInstaller = installSource.getInstallingPackageName() != null + && isAppTrustedInstaller(installSource.getInstallingPackageName()); + return !installedFromTrustedInstaller; } /** -- cgit v1.2.3-59-g8ed1b