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

Commit 69890d02 authored by Song Pan's avatar Song Pan Committed by Automerger Merge Worker
Browse files

Expose some level of logging to aid debugging. am: bc86158b am: 66fbe163

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11818182

Change-Id: I2aa3c10afe1d6b76a7085f04a03c3617dc8669ce
parents 877f8b2a 66fbe163
Loading
Loading
Loading
Loading
+17 −11
Original line number Original line Diff line number Diff line
@@ -205,8 +205,13 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
                    }
                    }


                    if (DEBUG_INTEGRITY_COMPONENT) {
                    if (DEBUG_INTEGRITY_COMPONENT) {
                        Slog.i(TAG, String.format("Successfully pushed rule set: %s", version));
                        Slog.i(
                                TAG,
                                String.format(
                                        "Successfully pushed rule set to version '%s' from '%s'",
                                        version, ruleProvider));
                    }
                    }

                    FrameworkStatsLog.write(
                    FrameworkStatsLog.write(
                            FrameworkStatsLog.INTEGRITY_RULES_PUSHED,
                            FrameworkStatsLog.INTEGRITY_RULES_PUSHED,
                            success,
                            success,
@@ -324,13 +329,12 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
                                + getAllowedInstallers(packageInfo));
                                + getAllowedInstallers(packageInfo));
            }
            }
            IntegrityCheckResult result = mEvaluationEngine.evaluate(appInstallMetadata);
            IntegrityCheckResult result = mEvaluationEngine.evaluate(appInstallMetadata);
            if (DEBUG_INTEGRITY_COMPONENT) {
            if (!result.getMatchedRules().isEmpty() || DEBUG_INTEGRITY_COMPONENT) {
                Slog.i(
                Slog.i(
                        TAG,
                        TAG,
                        "Integrity check result: "
                        String.format(
                                + result.getEffect()
                                "Integrity check of %s result: %s due to %s",
                                + " due to "
                                packageName, result.getEffect(), result.getMatchedRules()));
                                + result.getMatchedRules());
            }
            }


            FrameworkStatsLog.write(
            FrameworkStatsLog.write(
@@ -673,7 +677,9 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
        // Obtain the system apps that are whitelisted in config_integrityRuleProviderPackages.
        // Obtain the system apps that are whitelisted in config_integrityRuleProviderPackages.
        List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps();
        List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps();
        if (DEBUG_INTEGRITY_COMPONENT) {
        if (DEBUG_INTEGRITY_COMPONENT) {
            Slog.i(TAG, String.format(
            Slog.i(
                    TAG,
                    String.format(
                            "Rule provider system app list contains: %s", allowedRuleProviders));
                            "Rule provider system app list contains: %s", allowedRuleProviders));
        }
        }