summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/ecm/EnhancedConfirmationService.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/ecm/EnhancedConfirmationService.java b/service/java/com/android/ecm/EnhancedConfirmationService.java
index 4ac83e1e3..c5700f3ed 100644
--- a/service/java/com/android/ecm/EnhancedConfirmationService.java
+++ b/service/java/com/android/ecm/EnhancedConfirmationService.java
@@ -279,6 +279,9 @@ public class EnhancedConfirmationService extends SystemService {
return true;
}
+ // If applicable, trust packages installed via non-allowlisted installers
+ if (trustPackagesInstalledViaNonAllowlistedInstallers()) return false;
+
// 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
@@ -308,6 +311,10 @@ public class EnhancedConfirmationService extends SystemService {
return false;
}
+ private boolean trustPackagesInstalledViaNonAllowlistedInstallers() {
+ return true; // TODO(b/327469700): Make this configurable
+ }
+
private boolean isPackagePreinstalled(@NonNull String packageName, @UserIdInt int userId) {
ApplicationInfo applicationInfo;
try {