-
Notifications
You must be signed in to change notification settings - Fork 905
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
Moved from tabs to core option to control opening pages in custom tabs #5199
Conversation
468a5c1
to
49ba8dc
Compare
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.
++
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
49ba8dc
to
ce7395b
Compare
* @return Whether the intent is for launching a Custom Tab. | ||
*/ | ||
public static boolean isCustomTabIntent(Intent intent) { | ||
+ if(!BraveLaunchIntentDispatcher.useCustomTabs()) return false; |
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.
There are a couple different ways we could do this with asm. Let's dm to discuss
@@ -147,6 +155,28 @@ protected void makePublicMethod(String className, String methodName) { | |||
methods.add(methodName); | |||
} | |||
|
|||
private String shouldChangeOwner(String owner, String methodName) { |
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.
since the semantics of this are slightly different than the making methods public, maybe call it maybeChangeOwner
and return the original owner instead of an empty string if it doesn't change? Then you don't need this https://github.com/brave/brave-core/pull/5199/files#diff-125eb2dc484493790df1e4b6cca9fd3bR77 and you can add the println inside shouldChangeOwner
. Just a suggestion though
import org.chromium.base.ContextUtils; | ||
import org.chromium.chrome.browser.preferences.BravePreferenceKeys; | ||
|
||
public class BraveLaunchIntentDispatcher { |
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.
in other classes I left a comment // see BraveLaunchIntentDispatcherClassAdapter
so it's easier to track down how this works
Verification passed on OnePlus 6T with Android 10 running 1.9.21 x64 Nightly build
|
Resolves brave/brave-browser#9074
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.