Fix LocationBarPhone app crash at startup
This commit is contained in:
@@ -7,42 +7,49 @@ This reverts commit ae458edcc8422d0815d0e82261e71fe10d7d6fc2.
|
||||
|
||||
Disable search-ready omnibox by default
|
||||
---
|
||||
.../DropdownItemViewInfoListBuilder.java | 14 ++++++++------
|
||||
chrome/browser/about_flags.cc | 3 +++
|
||||
chrome/browser/flag-metadata.json | 5 +++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
.../browser/flags/android/chrome_feature_list.cc | 4 ++++
|
||||
chrome/browser/flags/android/chrome_feature_list.h | 1 +
|
||||
.../chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
8 files changed, 30 insertions(+), 6 deletions(-)
|
||||
.../suggestions/DropdownItemViewInfoListBuilder.java | 9 +++++++--
|
||||
chrome/browser/about_flags.cc | 3 +++
|
||||
chrome/browser/flag-metadata.json | 5 +++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 4 ++++
|
||||
chrome/browser/flags/android/chrome_feature_list.h | 1 +
|
||||
.../chromium/chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
8 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java
|
||||
@@ -83,14 +83,16 @@ class DropdownItemViewInfoListBuilder {
|
||||
@@ -61,6 +61,7 @@ class DropdownItemViewInfoListBuilder {
|
||||
private int mDropdownHeight;
|
||||
private boolean mEnableAdaptiveSuggestionsCount;
|
||||
private boolean mBuiltListHasFullyConcealedElements;
|
||||
+ private EditUrlSuggestionProcessor mEditUrlSuggestionProcessor;
|
||||
|
||||
DropdownItemViewInfoListBuilder() {
|
||||
mPriorityOrderedSuggestionProcessors = new ArrayList<>();
|
||||
@@ -89,8 +90,8 @@ class DropdownItemViewInfoListBuilder {
|
||||
() -> mShareDelegateSupplier == null ? null : mShareDelegateSupplier.get();
|
||||
|
||||
final Supplier<ImageFetcher> imageFetcherSupplier = () -> mImageFetcher;
|
||||
final Supplier<LargeIconBridge> iconBridgeSupplier = () -> mIconBridge;
|
||||
- final Supplier<Tab> tabSupplier =
|
||||
- () -> mActivityTabProvider == null ? null : mActivityTabProvider.get();
|
||||
- final Supplier<ShareDelegate> shareSupplier =
|
||||
- () -> mShareDelegateSupplier == null ? null : mShareDelegateSupplier.get();
|
||||
-
|
||||
mHeaderProcessor = new HeaderProcessor(context, host, delegate);
|
||||
- registerSuggestionProcessor(new EditUrlSuggestionProcessor(
|
||||
+
|
||||
+ if (ChromeFeatureList.isEnabled(ChromeFeatureList.SEARCH_READY_OMNIBOX)) {
|
||||
+ final Supplier<Tab> tabSupplier =
|
||||
+ () -> mActivityTabProvider == null ? null : mActivityTabProvider.get();
|
||||
+ final Supplier<ShareDelegate> shareSupplier =
|
||||
+ () -> mShareDelegateSupplier == null ? null : mShareDelegateSupplier.get();
|
||||
+ registerSuggestionProcessor(new EditUrlSuggestionProcessor(
|
||||
context, host, delegate, iconBridgeSupplier, tabSupplier, shareSupplier));
|
||||
+ }
|
||||
- context, host, delegate, iconBridgeSupplier, tabSupplier, shareSupplier));
|
||||
+ mEditUrlSuggestionProcessor = new EditUrlSuggestionProcessor(
|
||||
+ context, host, delegate, iconBridgeSupplier, tabSupplier, shareSupplier);
|
||||
registerSuggestionProcessor(
|
||||
new AnswerSuggestionProcessor(context, host, textProvider, imageFetcherSupplier));
|
||||
registerSuggestionProcessor(
|
||||
@@ -218,6 +219,10 @@ class DropdownItemViewInfoListBuilder {
|
||||
|
||||
/** Signals that native initialization has completed. */
|
||||
void onNativeInitialized() {
|
||||
+ if (ChromeFeatureList.isEnabled(ChromeFeatureList.SEARCH_READY_OMNIBOX)) {
|
||||
+ registerSuggestionProcessor(mEditUrlSuggestionProcessor);
|
||||
+ }
|
||||
+
|
||||
mEnableAdaptiveSuggestionsCount =
|
||||
ChromeFeatureList.isEnabled(ChromeFeatureList.OMNIBOX_ADAPTIVE_SUGGESTIONS_COUNT);
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
|
||||
Reference in New Issue
Block a user