Close gap on tracing AppsFilter

This change adds tracing to the only missing section of code.

Test: atest AppEnumerationTests
Bug: 141922841
Change-Id: I2ec606b6270af7329a2bb5e68bbd8884ccefedf2
This commit is contained in:
Patrick Baumann
2020-01-30 10:45:02 -08:00
parent 397101302b
commit c51cabd2c6

View File

@@ -613,6 +613,7 @@ public class AppsFilter {
} finally {
Trace.endSection();
}
if (callingPkgSetting != null) {
if (callingPkgInstruments(callingPkgSetting, targetPkgSetting, targetName)) {
return false;
@@ -626,28 +627,34 @@ public class AppsFilter {
}
}
if (callingSharedPkgSettings != null) {
int size = callingSharedPkgSettings.size();
for (int index = 0; index < size; index++) {
PackageSetting pkgSetting = callingSharedPkgSettings.valueAt(index);
if (mOverlayReferenceMapper.isValidActor(targetName, pkgSetting.name)) {
try {
Trace.beginSection("mOverlayReferenceMapper");
if (callingSharedPkgSettings != null) {
int size = callingSharedPkgSettings.size();
for (int index = 0; index < size; index++) {
PackageSetting pkgSetting = callingSharedPkgSettings.valueAt(index);
if (mOverlayReferenceMapper.isValidActor(targetName, pkgSetting.name)) {
if (DEBUG_LOGGING) {
log(callingPkgSetting, targetPkgSetting,
"matches shared user of package that acts on target of "
+ "overlay");
}
return false;
}
}
} else {
if (mOverlayReferenceMapper.isValidActor(targetName, callingPkgSetting.name)) {
if (DEBUG_LOGGING) {
log(callingPkgSetting, targetPkgSetting,
"matches shared user of package that acts on target of "
+ "overlay");
log(callingPkgSetting, targetPkgSetting, "acts on target of overlay");
}
return false;
}
}
} else {
if (mOverlayReferenceMapper.isValidActor(targetName, callingPkgSetting.name)) {
if (DEBUG_LOGGING) {
log(callingPkgSetting, targetPkgSetting, "acts on target of overlay");
}
return false;
}
} finally {
Trace.endSection();
}
return true;
} finally {
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);