diff options
author | 2024-01-17 13:52:00 -0800 | |
---|---|---|
committer | 2024-01-17 15:41:09 -0800 | |
commit | 917bf2e93bdfac05ddc7bb3baade4b118107a636 (patch) | |
tree | 35c9a7b1eb9593655b4ae33cc819d74924ad3377 /framework-s/java | |
parent | d7af3561b14a919f3abf1972fc644f893a653c31 (diff) |
[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
Diffstat (limited to 'framework-s/java')
-rw-r--r-- | framework-s/java/android/app/ecm/EnhancedConfirmationManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
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; } /** |