Commit 93dd3d3b authored by Maggie Cai's avatar Maggie Cai Committed by Commit Bot

[IntentHandling] Don't show uninstalled apps.

Currently intent query doesn't check if the app is uninstalled because I
assumed the intent_filter field will be removed from the app. This CL
fix this issue.

BUG=853604

Change-Id: Id418a1568477bbfe1a07792f17863229dacba100
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946047Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720389}
parent 65ae7f1f
......@@ -363,6 +363,9 @@ std::vector<std::string> AppServiceProxy::GetAppIdsForIntent(
std::vector<std::string> app_ids;
if (app_service_.is_bound()) {
cache_.ForEachApp([&app_ids, &intent](const apps::AppUpdate& update) {
if (update.Readiness() == apps::mojom::Readiness::kUninstalledByUser) {
return;
}
for (const auto& filter : update.IntentFilters()) {
if (apps_util::IntentMatchesFilter(intent, filter)) {
app_ids.push_back(update.AppId());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment