Merge "Fixes component-based visibility recompute" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e505016e9b
@@ -708,12 +708,15 @@ public class AppsFilter {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method recomputes all component / intent-based visibility and is intended to match the
|
||||||
|
* relevant logic of {@link #addPackageInternal(PackageSetting, ArrayMap)}
|
||||||
|
*/
|
||||||
private void recomputeComponentVisibility(ArrayMap<String, PackageSetting> existingSettings) {
|
private void recomputeComponentVisibility(ArrayMap<String, PackageSetting> existingSettings) {
|
||||||
mQueriesViaComponent.clear();
|
mQueriesViaComponent.clear();
|
||||||
for (int i = existingSettings.size() - 1; i >= 0; i--) {
|
for (int i = existingSettings.size() - 1; i >= 0; i--) {
|
||||||
PackageSetting setting = existingSettings.valueAt(i);
|
PackageSetting setting = existingSettings.valueAt(i);
|
||||||
if (setting.pkg == null
|
if (setting.pkg == null || requestsQueryAllPackages(setting.pkg)) {
|
||||||
|| mForceQueryable.contains(setting.appId)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int j = existingSettings.size() - 1; j >= 0; j--) {
|
for (int j = existingSettings.size() - 1; j >= 0; j--) {
|
||||||
@@ -721,7 +724,7 @@ public class AppsFilter {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final PackageSetting otherSetting = existingSettings.valueAt(j);
|
final PackageSetting otherSetting = existingSettings.valueAt(j);
|
||||||
if (otherSetting.pkg == null) {
|
if (otherSetting.pkg == null || mForceQueryable.contains(otherSetting.appId)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (canQueryViaComponents(setting.pkg, otherSetting.pkg, mProtectedBroadcasts)) {
|
if (canQueryViaComponents(setting.pkg, otherSetting.pkg, mProtectedBroadcasts)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user