Expose some level of logging to aid debugging. am: bc86158b25
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11818182 Change-Id: I17982934f26c4fbc2856996b0c5ddc6bdbac1c80
This commit is contained in:
@@ -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,8 +677,10 @@ 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(
|
||||||
"Rule provider system app list contains: %s", allowedRuleProviders));
|
TAG,
|
||||||
|
String.format(
|
||||||
|
"Rule provider system app list contains: %s", allowedRuleProviders));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Identify the package names in the caller list.
|
// Identify the package names in the caller list.
|
||||||
@@ -730,9 +736,9 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
|
|||||||
|
|
||||||
private boolean integrityCheckIncludesRuleProvider() {
|
private boolean integrityCheckIncludesRuleProvider() {
|
||||||
return Settings.Global.getInt(
|
return Settings.Global.getInt(
|
||||||
mContext.getContentResolver(),
|
mContext.getContentResolver(),
|
||||||
Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER,
|
Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER,
|
||||||
0)
|
0)
|
||||||
== 1;
|
== 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user