Skip to content

Commit abac035

Browse files
Cal-Ltommasini
andauthored
fix: Remove Android access fine location from bluetooth library - cp-7.72.0 (#28395)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Remove Android access fine location from bluetooth library in an attempt to resolve duplicate declaration error when uploading build to Google play. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk manifest-only change; main risk is unintended removal/override of `ACCESS_FINE_LOCATION` affecting BLE behavior on older Android versions if the merge rules don’t apply as expected. > > **Overview** > Adjusts Android manifest BLE location permission declarations to avoid Google Play upload failures caused by duplicate `ACCESS_FINE_LOCATION` entries from dependency manifests. > > Keeps a single `uses-permission` with `android:maxSdkVersion="30"` and explicitly removes any `uses-permission-sdk-23` variant via `tools:node="remove"`, while updating comments to document the merge behavior. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c34b584. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: tommasini <tommasini15@gmail.com>
1 parent 62ea975 commit abac035

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
<!-- Android < 12 -->
1313
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
1414
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
15-
<!-- Merge with react-native-ble-plx (no maxSdkVersion); Play forbids duplicate maxSdkVersion for the same permission -->
15+
<!-- BLE location: single uses-permission (maxSdk 30). Play rejects duplicates when deps add the same permission differently (e.g. react-native-ble-plx uses-permission, rxandroidble uses-permission-sdk-23). -->
1616
<uses-permission
1717
android:name="android.permission.ACCESS_FINE_LOCATION"
1818
android:maxSdkVersion="30"
1919
tools:replace="android:maxSdkVersion" />
20+
<uses-permission-sdk-23
21+
android:name="android.permission.ACCESS_FINE_LOCATION"
22+
tools:node="remove" />
2023
<uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
2124

2225
<!-- Bluetooth permissions: Android API >= 31 (Android 12)-->

0 commit comments

Comments
 (0)