-
Notifications
You must be signed in to change notification settings - Fork 893
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
Ads fixes for Android Ads Custom Notifications #7293
Conversation
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
0c48e7b
to
ab46af7
Compare
ab46af7
to
ce9beed
Compare
ce9beed
to
ff07790
Compare
ff07790
to
c731a73
Compare
c731a73
to
3c27368
Compare
(1) Font size and background (2) Fix buttons to use 48dp Support dismiss instead of X. Closes brave/brave-browser#12956
3c27368
to
7533fb1
Compare
@@ -70,44 +81,73 @@ public static void showAdNotification(Context context, final String notification | |||
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, |
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.
Do we still need this call given that flag had been set before?
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.
Will fix.
BraveAdsNativeHelper.nativeOnCloseAdNotification( | ||
Profile.getLastUsedRegularProfile(), mNotificationId, true); | ||
mNotificationId = null; | ||
public boolean onTouch(View v, MotionEvent event) { |
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.
Are we handling swipes up and down? Usually notifications are dismissed by swiping left and right on Android.
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.
Ads team wanted to copy the behavior from iOS. @tmancey would you chime in? I don't know if I can make it in time for trains, but we can let it sit and if users want left/right swipe I can do so.
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.
@jenn-rhim Your thoughts? For me, I like to follow the system's default, which as above is left/right. @yachtcaptain23 Depending on the decision from @jenn-rhim we should make the change before merging. Thanks
case MotionEvent.ACTION_MOVE: | ||
deltaY = event.getRawY() + mYDown; | ||
if (deltaY > 0) { | ||
deltaY = 0; |
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.
nit: formatting
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.
Fixed.
@yachtcaptain23 Can you please run |
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, the only concern if the direction of swiping
@samartnik Discussed with @jenn-rhim and swipe up is preferred. Thanks |
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
CI failed for unrelated JUnit tests |
Closes brave/brave-browser#13038
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
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
On Android, go through OOBE and observe the new push notification test. Try swiping up to dismiss and make sure tapping opens up the notification.