-
Notifications
You must be signed in to change notification settings - Fork 925
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
Fixes a crash on calling TemplateUrlServiceFactory when main Activity is stopping #21328
Conversation
@@ -803,7 +792,6 @@ public void initializeState() { | |||
setLoadedFeed(false); | |||
setComesFromNewTab(false); | |||
setNewsItemsFeedCards(null); | |||
BraveSearchEngineUtils.initializeBraveSearchEngineStates(getTabModelSelector()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it to finishNativeInitialization
as it does native calls inside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if (profile != null && profile.isOffTheRecord()) { | ||
// Set normal DSE as an active DSE when brave goes in background | ||
// because currently set DSE is used by outside of brave(ex, brave search widget). | ||
BraveSearchEngineUtils.updateActiveDSE(profile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SergeyZhukovsky are we okay removing the change here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified such steps:
- Set standard tab SE to Brave.
- Set private tab SE to Qwant.
- Made some search on both and made sure they are correct.
- Switched to Private tab, closed Brave.
- Added a search widget.
- Tried to search via widget and made sure Brave SE is used in a standard tab is used for that.
Do you have other steps or do you know why we added the above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see any reason why it's there, but I'll keep an eye what happens once the change hits users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you verify the change with quick action search
widget we have ?
Steps :
- add widget on then home screen
- open brave app and change search engine from Brave to something else.
- Minimize the app and check widget, if it shows the write search engine on the url bar.
If above looks good, we are good to go ahead with the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen_recording_20231211_152350.webm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves brave/brave-browser#34826
It's an attempt to fix the issue. I couldn't find any reason why we had that code, search widget works fine, it always uses a standard tab search engine even though we can set a different one for private tabs.
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
there is none.