Commit 43925dc8 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Only execute shortcut handler on active application.

The shortcut handler is already executed when application becomes
active.
Executing it in performActionForShortcutItem will result in two
execution which can cause issues (e.g. if action is to trigger camera).

Bug: 1000940
Change-Id: Id89a1c1c88fc9594599772cb0170c7c6e08deded
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1789523Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Auto-Submit: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695763}
parent 691227a2
......@@ -209,7 +209,9 @@ NSString* const kShortcutQRScanner = @"OpenQRScanner";
BOOL handledShortcutItem =
[UserActivityHandler handleShortcutItem:shortcutItem
startupInformation:startupInformation];
if (handledShortcutItem) {
BOOL isActive = [[UIApplication sharedApplication] applicationState] ==
UIApplicationStateActive;
if (handledShortcutItem && isActive) {
[UserActivityHandler
handleStartupParametersWithTabOpener:tabOpener
startupInformation:startupInformation
......
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