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

Update billing dependency and update VPN code #19576

Merged
merged 17 commits into from
Sep 8, 2023

Conversation

deeppandya
Copy link
Contributor

@deeppandya deeppandya commented Aug 4, 2023

Resolves brave/brave-browser#30673
Security review : https://github.com/brave/reviews/issues/1323

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@deeppandya deeppandya changed the title Billing client 6 0 android [WIP] Billing client 6 0 android Aug 4, 2023
@deeppandya deeppandya force-pushed the billing_client_6_0_android branch 3 times, most recently from cd4f863 to b6a38e5 Compare August 25, 2023 05:50
@deeppandya deeppandya changed the title [WIP] Billing client 6 0 android Update billing dependency and update VPN code Aug 25, 2023
@deeppandya deeppandya added this to the 1.59.x - Nightly milestone Aug 28, 2023
@deeppandya deeppandya force-pushed the billing_client_6_0_android branch from fa1cb99 to 2812f69 Compare August 28, 2023 12:34
@deeppandya deeppandya marked this pull request as ready for review August 28, 2023 12:36
@deeppandya deeppandya requested review from bridiver and a team as code owners August 28, 2023 12:36
Copy link
Contributor

@samartnik samartnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@tapanmodh tapanmodh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -7,6 +7,8 @@ group("android_deps") {
":com_android_installreferrer_java",
":com_brave_playlist_java",
":com_github_bumptech_glide_java",
":com_google_android_datatransport_transport_backend_cct_java",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android_deps target does not appear to actually be used anywhere so can we just remove it?

@@ -44,6 +44,8 @@ brave_chrome_java_deps = [
"//brave/third_party/android_deps:com_android_installreferrer_java",
"//brave/third_party/android_deps:com_brave_playlist_java",
"//brave/third_party/android_deps:com_github_bumptech_glide_java",
"//brave/third_party/android_deps:com_google_android_datatransport_transport_backend_cct_java",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not be adding indirect deps to this list. Only add direct deps here (the java imports you actually reference). Indirect deps are handled automatically and should not be added individually.

":*",
"//third_party/androidx:*",
]
+ visibility += [ "//chrome/android:chrome_java", "//brave/third_party/android_deps:com_google_android_datatransport_transport_runtime_java__classes" ] supports_android = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this list should only contain com_google_android_datatransport_transport_runtime_java__classes because you shouldn't be adding this dep directly to chrome_brave_java_deps

@deeppandya deeppandya force-pushed the billing_client_6_0_android branch from 2812f69 to 328769c Compare September 7, 2023 13:01
@deeppandya deeppandya requested a review from bridiver September 7, 2023 13:01
@deeppandya deeppandya force-pushed the billing_client_6_0_android branch from 1754a35 to 3cfa329 Compare September 7, 2023 18:52
@@ -0,0 +1,9 @@
# Copyright (c) 2023 The Brave Authors. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just sources.gni is the convention

@deeppandya deeppandya force-pushed the billing_client_6_0_android branch from 3cfa329 to 9f12b6f Compare September 8, 2023 06:20
@deeppandya deeppandya merged commit c74ae6f into master Sep 8, 2023
@deeppandya deeppandya deleted the billing_client_6_0_android branch September 8, 2023 16:22
deeppandya added a commit that referenced this pull request Sep 11, 2023
Update billing dependency and update VPN code
deeppandya added a commit that referenced this pull request Sep 11, 2023
Update billing dependency and update VPN code
@hffvld
Copy link
Collaborator

hffvld commented Sep 12, 2023

Verified Fresh install flow on Pixel 7 using version(s):

Device/OS: Pixel 7 [panther_beta-user 14 UPB5.230623.009 release-keys]
Brave build: 1.60.14
Chromium: 117.0.5938.48 (Official Build) canary (64-bit)
Revision: 988f725c9e62f571c6622c233aa00ae129504fd3

STEPS:

  1. Install Brave Nightly build from this link
  2. Launch Brave > Enable VPN and VPN Staging in QA settings > Relaunch Brave
  3. Three-dot menu > Brave VPN > Purchase subscription > Verify
  4. Tap Install VPN Profile > Ok > Verify

ACTUAL RESULTS:

  • Verified that no Brave crash is happening when enabling VPN on Android 14
  • Verified that Restore button is not shown when no active VPN subscription is available
  • Verified that a new VPN subscription can be purchased
  • Verified that no error message is shown when trying to Install VPN Profile for the first time
  • Verified that VPN is enabled successfully
  • Verified connectin VPN to different countries is working
  • Verified VPN sync is working cross-platform (Android, iOS, Web) when a subscription purchased on Android

1 2
1 2
1 2

No Brave Crash and no VPN profile error message

timestamp_09-40-59_09-41-47.mp4

Restore button when an active subscription is available

timestamp_10-32-37_10-33-12.mp4

@hffvld
Copy link
Collaborator

hffvld commented Sep 12, 2023

Verified Upgrade install flow on Pixel 7 using version(s):

Device/OS: Pixel 7 [panther_beta-user 14 UPB5.230623.009 release-keys]
Brave build: 1.60.17
Chromium: 117.0.5938.48 (Official Build) canary (64-bit)
Revision: 1e992619df2f5f217c5a422fed2fef524683373b

"Restore" button when no active subscription

STEPS:

  1. Install Brave Nightly build 1.59.76 with C116 from Play Store
  2. Launch Brave > Enable VPN and VPN Staging in QA settings > Relaunch Brave
  3. Three-dot menu > Brave VPN > Observe Restore button even when no subscription is available
  4. Upgrade Brave to build 1.60.17 with C117
  5. Launch Brave > Three-dot menu > Brave VPN > Verify

ACTUAL RESULTS:

  • Verified that no Brave crash is happening
  • Verified that Restore button is not shown when no active VPN subscription is available

1
1
Untitled.mp4
"Restore" button when an active subscription is available

STEPS:

  1. Install Brave Nightly build 1.59.76 with C116 from Play Store
  2. Launch Brave > Enable VPN and VPN Staging in QA settings > Relaunch Brave
  3. Three-dot menu > Brave VPN > Purchase a new subscription and Install VPN profile
  4. Uninstall Brave > Install build 1.59.76 again and go through onboarding
  5. Upgrade Brave to build 1.60.17 with C117
  6. Launch Brave > Three-dot menu > Brave VPN
  7. Tap Restore button > Install VPN Profile > Verify

ACTUAL RESULTS:

  • Verified that no Brave crash is happening
  • Verified that Restore button is shown when an active VPN subscription is available
  • Verified that no error message is shown when trying to Install VPN Profile for the first time
  • Verified that restore VPN subscription is working

1
1
timestamp_14-43-03_14-45-27_2.mov

kjozwiak pushed a commit that referenced this pull request Sep 12, 2023
* Merge pull request #19576 from brave/billing_client_6_0_android

Update billing dependency and update VPN code

* Add foreground service type for wireguard service

* Update manifest

Add livedata for purchases

Update livedata implementation

* Resolve presubmit error

* Resolve formatting error
kjozwiak pushed a commit that referenced this pull request Sep 12, 2023
* Merge pull request #19576 from brave/billing_client_6_0_android

Update billing dependency and update VPN code

* Add foreground service type for wireguard service

* Update manifest

Add livedata for purchases

Update livedata implementation

* Resolve presubmit error

* Resolve formatting error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Play Billing Library
5 participants