зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366993 - With "Don't keep activities" on, search activity's 'New tab' doesn't work r=maliu
add handling of about:home in intent.data explicitly. MozReview-Commit-ID: D46VVQaR0Z1 --HG-- extra : rebase_source : 37db2673e52f28ac6db216417ac88337dafdfb6d
This commit is contained in:
Родитель
f1f7ad791c
Коммит
886d48d230
|
@ -1729,7 +1729,8 @@ public abstract class GeckoApp extends GeckoActivity
|
||||||
|
|
||||||
final String passedUri = getIntentURI(intent);
|
final String passedUri = getIntentURI(intent);
|
||||||
|
|
||||||
final boolean isExternalURL = invokedWithExternalURL(passedUri);
|
final boolean isExternalURL = passedUri != null;
|
||||||
|
final boolean isAboutHomeURL = isExternalURL && AboutPages.isAboutHome(passedUri);
|
||||||
|
|
||||||
// Start migrating as early as possible, can do this in
|
// Start migrating as early as possible, can do this in
|
||||||
// parallel with Gecko load.
|
// parallel with Gecko load.
|
||||||
|
@ -1753,7 +1754,7 @@ public abstract class GeckoApp extends GeckoActivity
|
||||||
if (mIsRestoringActivity && hasGeckoTab(intent)) {
|
if (mIsRestoringActivity && hasGeckoTab(intent)) {
|
||||||
Tabs.getInstance().notifyListeners(null, Tabs.TabEvents.RESTORED);
|
Tabs.getInstance().notifyListeners(null, Tabs.TabEvents.RESTORED);
|
||||||
handleSelectTabIntent(intent);
|
handleSelectTabIntent(intent);
|
||||||
// External URLs should always be loaded regardless of whether Gecko is
|
// External URLs and new tab from widget should always be loaded regardless of whether Gecko is
|
||||||
// already running.
|
// already running.
|
||||||
} else if (isExternalURL) {
|
} else if (isExternalURL) {
|
||||||
// Restore tabs before opening an external URL so that the new tab
|
// Restore tabs before opening an external URL so that the new tab
|
||||||
|
@ -1762,8 +1763,13 @@ public abstract class GeckoApp extends GeckoActivity
|
||||||
processActionViewIntent(new Runnable() {
|
processActionViewIntent(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final int flags = getNewTabFlags();
|
if (isAboutHomeURL) {
|
||||||
loadStartupTab(passedUri, intent, flags);
|
// respect the user preferences for about:home from external intent calls
|
||||||
|
loadStartupTab(Tabs.LOADURL_NEW_TAB, action);
|
||||||
|
} else {
|
||||||
|
final int flags = getNewTabFlags();
|
||||||
|
loadStartupTab(passedUri, intent, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче