Merge "Close gap on tracing AppsFilter"

This commit is contained in:
TreeHugger Robot
2020-01-31 00:49:49 +00:00
committed by Android (Google) Code Review

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);