Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1903 added regex check to ensure analytics/crashlytics is explic…
…itly disab… (#4995) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation Fix #1903 Adds a regex check in file content validation to ensure Firebase analytics are disabled in the codebase. Both regex are tested in https://regex101.com/r/l14O5J/1, https://regex101.com/r/QVHGxi/1 for Firebase analytics, Crashlytics, respectively. - "Fixes ##1903:" Adds a regex check that ensures that firebase analytics and crashlytics are explicitly disabled in AndroidManifest.xml, new pull requests based on /pull/4944 Manual testing: Case 1: firebase_analytis_collection_deactivated = false in AndroidManifest.xml; want = true (line 19) ![image](https://github.com/oppia/oppia-android/assets/44930615/0da2895b-55ea-4d17-acb9-00cf0e3dbfbe) Case 2: firebase_analytis_collection_deactivated = true not found in AndroidManifest.xml; want = explicit line (line 19) ![image](https://github.com/oppia/oppia-android/assets/44930615/99ebcd4e-bb10-4e49-a1a1-141d8e2e7ae9) Case 3: firebase_crashlytics_collection_enabled = true in AndroidManifest.xml; want = false (line 20) ![image](https://github.com/oppia/oppia-android/assets/44930615/0f459eb0-4c34-46b9-baff-3a5efd99e320) Case 4: firebase_crashlytics_collection_enabled = false not found in AndroidManifest.xml; want = explicit line (line 20) ![image](https://github.com/oppia/oppia-android/assets/44930615/92f5d167-dc12-4cb1-a940-9d836cf7e7db) Case 5: happy case ![image](https://github.com/oppia/oppia-android/assets/44930615/f38d4460-9d0a-4b5f-af7e-b2b8df31c3a8) ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [X] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). --------- Co-authored-by: Ben Henning <[email protected]>
- Loading branch information