Commit b07e1bbf authored by nancy's avatar nancy Committed by Commit Bot

When the app is paused, don't launch the app.

BUG=1011235

Change-Id: Ib717d59170c30ada1613ee2b485d44c961fefa11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906852
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714133}
parent 80466044
......@@ -200,6 +200,9 @@ void AppServiceProxy::Launch(const std::string& app_id,
if (app_service_.is_connected()) {
cache_.ForOneApp(app_id, [this, event_flags, launch_source,
display_id](const apps::AppUpdate& update) {
if (update.Paused() == apps::mojom::OptionalBool::kTrue) {
return;
}
RecordAppLaunch(update.AppId(), launch_source);
app_service_->Launch(update.AppType(), update.AppId(), event_flags,
launch_source, display_id);
......@@ -215,6 +218,9 @@ void AppServiceProxy::LaunchAppWithIntent(
if (app_service_.is_connected()) {
cache_.ForOneApp(app_id, [this, &intent, launch_source,
display_id](const apps::AppUpdate& update) {
if (update.Paused() == apps::mojom::OptionalBool::kTrue) {
return;
}
RecordAppLaunch(update.AppId(), launch_source);
app_service_->LaunchAppWithIntent(update.AppType(), update.AppId(),
std::move(intent), launch_source,
......
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