Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Fix for search widget suggestions #27974

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.AutocompleteMediator {
*** mNativeInitialized;
*** mDropdownViewInfoListManager;
*** mDropdownViewInfoListBuilder;
public <init>(...);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ class BraveAutocompleteMediator extends AutocompleteMediator
private AutocompleteDelegate mDelegate;
private Supplier<Tab> mActivityTabSupplier;

/** Will be deleted in bytecode, value from the parent class will be used instead. */
private boolean mNativeInitialized;

/** Will be deleted in bytecode, value from the parent class will be used instead. */
private DropdownItemViewInfoListManager mDropdownViewInfoListManager;

Expand Down Expand Up @@ -97,13 +94,6 @@ public BraveAutocompleteMediator(
mActivityTabSupplier = activityTabSupplier;
}

@Override
public void onOmniboxSessionStateChange(boolean activated) {
if (!mNativeInitialized) return;

super.onOmniboxSessionStateChange(activated);
}

@Override
public void removeBraveSearchSuggestion() {
if (mDropdownViewInfoListManager instanceof BraveDropdownItemViewInfoListManager) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2009,12 +2009,6 @@ public void testFieldsExist() throws Exception {
"DEFAULT_FAST_VARIATIONS_SERVER_URL",
true,
String.class));
Assert.assertTrue(
fieldExists(
"org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator",
"mNativeInitialized",
true,
boolean.class));
Assert.assertTrue(
fieldExists(
"org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public BraveAutocompleteMediatorClassAdapter(ClassVisitor visitor) {

redirectConstructor(sAutocompleteMediator, sBraveAutocompleteMediator);

deleteField(sBraveAutocompleteMediator, "mNativeInitialized");
makeProtectedField(sAutocompleteMediator, "mNativeInitialized");

deleteField(sBraveAutocompleteMediator, "mDropdownViewInfoListManager");
makeProtectedField(sAutocompleteMediator, "mDropdownViewInfoListManager");

Expand Down
Loading