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] Fixed receiving of referrer from GPS #8843

Merged
merged 1 commit into from
May 18, 2021

Conversation

samartnik
Copy link
Contributor

@samartnik samartnik commented May 18, 2021

Resolves brave/brave-browser#15903

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • 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, npm run lint, 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:

@samartnik samartnik added CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels May 18, 2021
@samartnik samartnik added this to the 1.26.x - Nightly milestone May 18, 2021
@samartnik samartnik requested a review from a team as a code owner May 18, 2021 15:52
@samartnik samartnik self-assigned this May 18, 2021
@@ -45,7 +45,7 @@ index e5a9fd2d98b65ff7bb54ded343d1de3891b232a8..70a15ac085e9c2dd413d73b13d252dfe

+<!--
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
+-->
+--> <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for a quick fix as we need it ASAP, follow up issue for proper AndroidManifest patching is created brave/brave-browser#15942

@samartnik samartnik requested a review from jumde May 18, 2021 15:58
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

patches ++

@kkuehlz kkuehlz requested a review from bsclifton May 18, 2021 16:03
Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

Copy link
Contributor

@jumde jumde left a comment

Choose a reason for hiding this comment

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

lgtm

@samartnik samartnik merged commit 41cacb6 into master May 18, 2021
@samartnik samartnik deleted the android_referrer_fix branch May 18, 2021 17:05
@samartnik samartnik restored the android_referrer_fix branch May 18, 2021 17:10
@samartnik samartnik deleted the android_referrer_fix branch May 18, 2021 17:23
@kjozwiak
Copy link
Member

kjozwiak commented May 19, 2021

Verification PASSED on Samsung S10+ running Android 11 using the following build:

1.26.31 CR: 91.0.4472.57

STR:

  • visited https://kjozwiak.github.io/
  • clicked on Nightly GPS TVT141 which points to the following:
    • https://play.google.com/store/apps/details?id=com.brave.browser_nightly&referrer=urpc%3DTVT141
  • installed Nightly via GPS
  • launched and checked brave://local-state
"referral": {
        "download_id": "69816d5c-cd0c-496c-9911-a42926558462",
        "headers": [ {
           "cookieNames": [  ],
           "domains": [ "eaff.com", "stg.eaff.com" ],
           "expiration": 31536000000.0,
           "headers": {
              "X-Brave-Partner": "eaff"
           }
        }, {
           "cookieNames": [  ],
           "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
           "expiration": 31536000000.0,
           "headers": {
              "X-Brave-Partner": "uphold"
           }
        }, {
           "cookieNames": [  ],
           "domains": [ "www.grammarly.com", "grammarly.com", "static.grammarly.com", "gnar.grammarly.com" ],
           "expiration": 31536000000.0,
           "headers": {
              "X-Brave-Partner": "grammarly"
           }
        } ],
        "initialization": true,
        "promo_code": "TVT141"
     },
     "referral_android_first_run_timestamp": "13265929012491584",
     "stats": {
        "first_check_made": true,
        "last_check_month": 5,
        "last_check_woy": 20,
        "last_check_ymd": "2021-05-19",
        "threshold_query": "https://laptop-updates.brave.com/1/usage/brave-core-threshold?platform=android-bc&channel=canary&version=1.26.31&daily=true&weekly=true&monthly=true&first=true&woi=2021-05-17&dtoi=2021-05-19&ref=TVT141&adsEnabled=false&arch=",
        "week_of_installation": "2021-05-17"
     }

Screenshot_20210519-161723_Brave - Nightly


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android 1.24.x can't retrieve Referral codes from google play services
6 participants