Commit 83797449 authored by yusufo's avatar yusufo Committed by Commit bot

Don't play new animation on external intents

Playing this animation right after the task transition animation
causes a lot of jank. Removing it for external intents.

BUG=641592

Review-Url: https://codereview.chromium.org/2280233004
Cr-Commit-Position: refs/heads/master@{#414870}
parent a6b83ddf
......@@ -792,8 +792,12 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
break;
case OPEN_NEW_INCOGNITO_TAB:
if (url == null || url.equals(UrlConstants.NTP_URL)) {
if (fromLauncherShortcut) recordLauncherShortcutAction(true);
if (TextUtils.equals(externalAppId, getPackageName())) {
TabLaunchType launchType;
if (fromLauncherShortcut) {
getTabCreator(true).launchUrl(
UrlConstants.NTP_URL, TabLaunchType.FROM_EXTERNAL_APP);
recordLauncherShortcutAction(true);
} else if (TextUtils.equals(externalAppId, getPackageName())) {
// Used by the Account management screen to open a new incognito tab.
// Account management screen collects its metrics separately.
getTabCreator(true).launchUrl(
......@@ -1291,7 +1295,8 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
intent, IntentHandler.EXTRA_INVOKED_FROM_SHORTCUT, false);
return getTabCreator(isIncognito).launchUrl(
url,
fromLauncherShortcut ? TabLaunchType.FROM_CHROME_UI : TabLaunchType.FROM_LINK,
fromLauncherShortcut ? TabLaunchType.FROM_EXTERNAL_APP
: TabLaunchType.FROM_LINK,
intent,
mIntentHandlingTimeMs);
} else {
......
......@@ -91,6 +91,7 @@ public class LayoutManagerChrome
// Open the new tab
if (type == TabLaunchType.FROM_RESTORE) return;
if (type == TabLaunchType.FROM_REPARENTING) return;
if (type == TabLaunchType.FROM_EXTERNAL_APP) return;
tabCreating(getTabModelSelector().getCurrentTabId(), tab.getUrl(), tab.isIncognito());
}
......
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