mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-10 11:23:57 +01:00
Compare commits
72 Commits
v5.41.0-de
...
v5.42.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7e199162 | ||
|
|
0c662c8e3b | ||
|
|
08e8ead04f | ||
|
|
d238a42708 | ||
|
|
673609c2aa | ||
|
|
5f1a485e8f | ||
|
|
6961babee9 | ||
|
|
328c9b6bbe | ||
|
|
4c8b56f546 | ||
|
|
1754023dd6 | ||
|
|
328234f39a | ||
|
|
326953cfc3 | ||
|
|
725d5dc974 | ||
|
|
76b0364c5b | ||
|
|
1cbff799ad | ||
|
|
080a226614 | ||
|
|
2b71bd80c2 | ||
|
|
5cb46c4e91 | ||
|
|
52c369576d | ||
|
|
28799a548a | ||
|
|
1c80774d79 | ||
|
|
7817885cff | ||
|
|
9afe9afc67 | ||
|
|
3a8091ae00 | ||
|
|
6192ece114 | ||
|
|
5d9971444e | ||
|
|
cdfa75dd5a | ||
|
|
6f92b6c50b | ||
|
|
1e023fa1f3 | ||
|
|
00477bfebc | ||
|
|
4be00d09b7 | ||
|
|
50aca3314f | ||
|
|
15a7e540de | ||
|
|
041f7e0140 | ||
|
|
3bd76d60d6 | ||
|
|
1587178ff8 | ||
|
|
8a69240d66 | ||
|
|
7a37d858fb | ||
|
|
0ed7067459 | ||
|
|
6102644194 | ||
|
|
a89556a017 | ||
|
|
2b555f67f0 | ||
|
|
fb87199514 | ||
|
|
dd4e2cd085 | ||
|
|
fadc66816d | ||
|
|
ffd933c673 | ||
|
|
69883530b7 | ||
|
|
39971291f3 | ||
|
|
51facf9321 | ||
|
|
b83d41ca88 | ||
|
|
bfbffbd1f5 | ||
|
|
ee4755646b | ||
|
|
d1a12930c3 | ||
|
|
dfac836a8c | ||
|
|
6fa404331b | ||
|
|
8bcb95adcd | ||
|
|
8af70fe2d1 | ||
|
|
191b9169ff | ||
|
|
212418b8db | ||
|
|
7dbc744be0 | ||
|
|
150a3e7c60 | ||
|
|
5027943470 | ||
|
|
fa9e590b3a | ||
|
|
5823f0e982 | ||
|
|
f506a67e4a | ||
|
|
ed6e1155f2 | ||
|
|
8c229954d7 | ||
|
|
c5eb88bbf6 | ||
|
|
ef514017f4 | ||
|
|
c72d99518c | ||
|
|
772df6eb73 | ||
|
|
dfb5407e67 |
4
.github/workflows/build_pull_request.yml
vendored
4
.github/workflows/build_pull_request.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
2
.github/workflows/open_pull_request.yml
vendored
2
.github/workflows/open_pull_request.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Open pull request
|
||||
uses: repo-sync/pull-request@v2
|
||||
|
||||
2
.github/workflows/pull_strings.yml
vendored
2
.github/workflows/pull_strings.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: dev
|
||||
clean: true
|
||||
|
||||
2
.github/workflows/push_strings.yml
vendored
2
.github/workflows/push_strings.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Preprocess strings
|
||||
env:
|
||||
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -18,10 +18,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
@@ -51,14 +51,14 @@ jobs:
|
||||
fingerprint: ${{ vars.GPG_FINGERPRINT }}
|
||||
|
||||
- name: Release
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
uses: cycjimmy/semantic-release-action@v5
|
||||
id: release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Attest
|
||||
if: steps.release.outputs.new_release_published == 'true'
|
||||
uses: actions/attest-build-provenance@v2
|
||||
uses: actions/attest-build-provenance@v3
|
||||
with:
|
||||
subject-name: 'ReVanced Patches ${{ steps.release.outputs.new_release_git_tag }}'
|
||||
subject-path: patches/build/libs/patches-*.rvp
|
||||
|
||||
2
.github/workflows/update-gradle-wrapper.yml
vendored
2
.github/workflows/update-gradle-wrapper.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Update Gradle Wrapper
|
||||
uses: gradle-update/update-gradle-wrapper-action@v1
|
||||
|
||||
205
CHANGELOG.md
205
CHANGELOG.md
@@ -1,3 +1,208 @@
|
||||
# [5.42.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.6...v5.42.0-dev.7) (2025-10-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Instagram:** Add `Open links externally` patch ([#6012](https://github.com/ReVanced/revanced-patches/issues/6012)) ([08e8ead](https://github.com/ReVanced/revanced-patches/commit/08e8ead04ffff47a4608a3db7aadc8d5feccd4ad))
|
||||
|
||||
# [5.42.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.5...v5.42.0-dev.6) (2025-09-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **X / Twitter:** Remove non functional and obsolete patch `Open links with app chooser` ([#6033](https://github.com/ReVanced/revanced-patches/issues/6033)) ([673609c](https://github.com/ReVanced/revanced-patches/commit/673609c2aa87988cdc138eab101b9750fe6a7b62))
|
||||
|
||||
# [5.42.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.4...v5.42.0-dev.5) (2025-09-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube Music:** Add `Custom branding` patch ([#6007](https://github.com/ReVanced/revanced-patches/issues/6007)) ([4c8b56f](https://github.com/ReVanced/revanced-patches/commit/4c8b56f5466b244737f501654eb7c5d34b6b2f88))
|
||||
|
||||
# [5.42.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.3...v5.42.0-dev.4) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube Music - GmsCore support:** Handle sharing links to certain apps such as Instagram ([#6026](https://github.com/ReVanced/revanced-patches/issues/6026)) ([328234f](https://github.com/ReVanced/revanced-patches/commit/328234f39ada81542e596f04e8ce410c787c15c8))
|
||||
|
||||
# [5.42.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.2...v5.42.0-dev.3) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide end screen cards:** Hide new type of end screen card ([#6027](https://github.com/ReVanced/revanced-patches/issues/6027)) ([76b0364](https://github.com/ReVanced/revanced-patches/commit/76b0364c5b5562c6a0d178d2bbe5b220f48aaca9))
|
||||
|
||||
# [5.42.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.42.0-dev.1...v5.42.0-dev.2) (2025-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Instagram - Hide navigation buttons:** Resolve app startup crash ([080a226](https://github.com/ReVanced/revanced-patches/commit/080a2266146798be71789c939deef2f289697523))
|
||||
|
||||
# [5.42.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.41.1-dev.2...v5.42.0-dev.1) (2025-09-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Viber:** Add `Hide navigation buttons` patch ([#5991](https://github.com/ReVanced/revanced-patches/issues/5991)) ([5cb46c4](https://github.com/ReVanced/revanced-patches/commit/5cb46c4e9180ebc16eddb983dad73d137d8ec047))
|
||||
|
||||
## [5.41.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.41.1-dev.1...v5.41.1-dev.2) (2025-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube Music - Hide cast button:** Fix patching error ([28799a5](https://github.com/ReVanced/revanced-patches/commit/28799a548a73651134ef304cb6cb542cf8e55abe))
|
||||
|
||||
## [5.41.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.41.0...v5.41.1-dev.1) (2025-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube Music - Hide cast button:** Resolve button not hiding ([7817885](https://github.com/ReVanced/revanced-patches/commit/7817885cffed66608039ab45881537cbd3069c9d))
|
||||
|
||||
# [5.41.0](https://github.com/ReVanced/revanced-patches/compare/v5.40.0...v5.41.0) (2025-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Instagram - Hide navigation buttons:** Remove button based on name ([#5971](https://github.com/ReVanced/revanced-patches/issues/5971)) ([6fa4043](https://github.com/ReVanced/revanced-patches/commit/6fa404331b5162682d83fba5f38ed570c31495fc))
|
||||
* **Instagram - Limit feed to followed profiles:** Preserve favorites feed ([#5963](https://github.com/ReVanced/revanced-patches/issues/5963)) ([ef51401](https://github.com/ReVanced/revanced-patches/commit/ef514017f46025d9aef6884424caeb0670514e7a))
|
||||
* **TikTok:** Show correct dialog restart text, use correct font color for non-dark mode ([d1a1293](https://github.com/ReVanced/revanced-patches/commit/d1a12930c35f630793a0f240d4203c2ff9060158))
|
||||
* **Twitch - Settings:** Fix missing style resources ([#5970](https://github.com/ReVanced/revanced-patches/issues/5970)) ([8c22995](https://github.com/ReVanced/revanced-patches/commit/8c229954d7f232a7a472ca49f1b5e7cdc475bbcc))
|
||||
* **YouTube - Hide Shorts components:** Fix "Hide preview comment" ([#5990](https://github.com/ReVanced/revanced-patches/issues/5990)) ([dd4e2cd](https://github.com/ReVanced/revanced-patches/commit/dd4e2cd0855ccc51b94593004fdd8150ac3b41cc))
|
||||
* **YouTube - Return YouTube Dislike:** Do not show error toast if API returns 401 status ([#5949](https://github.com/ReVanced/revanced-patches/issues/5949)) ([58d088a](https://github.com/ReVanced/revanced-patches/commit/58d088ab307440a6912a867246da799b7dd6499b))
|
||||
* **YouTube - Settings:** Handle on screen back swipe gesture ([#6002](https://github.com/ReVanced/revanced-patches/issues/6002)) ([6f92b6c](https://github.com/ReVanced/revanced-patches/commit/6f92b6c50beab091f5f7ef7386579eda38cb4c66))
|
||||
* **YouTube - Settings:** Use an overlay to show search results ([#5806](https://github.com/ReVanced/revanced-patches/issues/5806)) ([ece8076](https://github.com/ReVanced/revanced-patches/commit/ece8076f7cefd752b97515014bc50fe4fd80171e))
|
||||
* **YouTube - SponsorBlock:** Show category color dot in voting dialog menu ([4be00d0](https://github.com/ReVanced/revanced-patches/commit/4be00d09b7b87dcfac324de8709af06e9f730791))
|
||||
* **YouTube - SponsorBlock:** Show category color in create new segment menu ([#5987](https://github.com/ReVanced/revanced-patches/issues/5987)) ([ffd933c](https://github.com/ReVanced/revanced-patches/commit/ffd933c6734274cdde5aaec0159b67f173f9228c))
|
||||
* **YouTube - Spoof video streams:** Update client side effects summary text ([a0a62dd](https://github.com/ReVanced/revanced-patches/commit/a0a62ddad26cfab3e04907fae5532e1ba1fdf710))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Tumblr:** Add `Disable Tumblr TV` patch ([#5959](https://github.com/ReVanced/revanced-patches/issues/5959)) ([212418b](https://github.com/ReVanced/revanced-patches/commit/212418b8db9a730ae9efa89ad2bef24952afbadd))
|
||||
* **YouTube - Hide layout components:** Add "Hide Emoji and Timestamp buttons" setting ([#5992](https://github.com/ReVanced/revanced-patches/issues/5992)) ([2b555f6](https://github.com/ReVanced/revanced-patches/commit/2b555f67f07e0de5703c630888ce2fbba3145192))
|
||||
* **YouTube - Hide layout components:** Add "Hide view count" and "Hide upload time" settings ([#5983](https://github.com/ReVanced/revanced-patches/issues/5983)) ([7a37d85](https://github.com/ReVanced/revanced-patches/commit/7a37d858fb937c6bdc2219103dac765b62600e6c))
|
||||
* **YouTube - Loop video:** Add player button to change loop video state ([#5961](https://github.com/ReVanced/revanced-patches/issues/5961)) ([dfb5407](https://github.com/ReVanced/revanced-patches/commit/dfb5407e67222e80e23c8935e04b6dbf1a43d757))
|
||||
* **YouTube - Spoof app version:** Add spoof target `20.05.46` that fixes transcript functionality ([5823f0e](https://github.com/ReVanced/revanced-patches/commit/5823f0e982e87b4a35d30feeca8a7e16edfebc5f))
|
||||
* **YouTube Music:** Add `Check watch history domain name resolution` ([#5979](https://github.com/ReVanced/revanced-patches/issues/5979)) ([8af70fe](https://github.com/ReVanced/revanced-patches/commit/8af70fe2d10c0f4da2d7e53bd00f5b3979775d5d))
|
||||
* **YouTube Music:** Add `Sanitize sharing links` patch ([#5952](https://github.com/ReVanced/revanced-patches/issues/5952)) ([45c1ee8](https://github.com/ReVanced/revanced-patches/commit/45c1ee8a12dc777a371875d90741a05cf5d8e9dd))
|
||||
* **YouTube Music:** Add `Theme` patch ([#5984](https://github.com/ReVanced/revanced-patches/issues/5984)) ([3bd76d6](https://github.com/ReVanced/revanced-patches/commit/3bd76d60d664befff29c24c9de56dac1486a6e67))
|
||||
* **YouTube:** Add `Disable video codecs` patch ([#5981](https://github.com/ReVanced/revanced-patches/issues/5981)) ([bfbffbd](https://github.com/ReVanced/revanced-patches/commit/bfbffbd1f5aa867027053e25b343a51a606216a3))
|
||||
|
||||
# [5.41.0-dev.18](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.17...v5.41.0-dev.18) (2025-09-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Settings:** Handle on screen back swipe gesture ([#6002](https://github.com/ReVanced/revanced-patches/issues/6002)) ([6f92b6c](https://github.com/ReVanced/revanced-patches/commit/6f92b6c50beab091f5f7ef7386579eda38cb4c66))
|
||||
|
||||
# [5.41.0-dev.17](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.16...v5.41.0-dev.17) (2025-09-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - SponsorBlock:** Show category color dot in voting dialog menu ([4be00d0](https://github.com/ReVanced/revanced-patches/commit/4be00d09b7b87dcfac324de8709af06e9f730791))
|
||||
|
||||
# [5.41.0-dev.16](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.15...v5.41.0-dev.16) (2025-09-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube Music:** Add `Theme` patch ([#5984](https://github.com/ReVanced/revanced-patches/issues/5984)) ([3bd76d6](https://github.com/ReVanced/revanced-patches/commit/3bd76d60d664befff29c24c9de56dac1486a6e67))
|
||||
|
||||
# [5.41.0-dev.15](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.14...v5.41.0-dev.15) (2025-09-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide layout components:** Add "Hide view count" and "Hide upload time" settings ([#5983](https://github.com/ReVanced/revanced-patches/issues/5983)) ([7a37d85](https://github.com/ReVanced/revanced-patches/commit/7a37d858fb937c6bdc2219103dac765b62600e6c))
|
||||
|
||||
# [5.41.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.13...v5.41.0-dev.14) (2025-09-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide layout components:** Add "Hide Emoji and Timestamp buttons" setting ([#5992](https://github.com/ReVanced/revanced-patches/issues/5992)) ([2b555f6](https://github.com/ReVanced/revanced-patches/commit/2b555f67f07e0de5703c630888ce2fbba3145192))
|
||||
|
||||
# [5.41.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.12...v5.41.0-dev.13) (2025-09-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide Shorts components:** Fix "Hide preview comment" ([#5990](https://github.com/ReVanced/revanced-patches/issues/5990)) ([dd4e2cd](https://github.com/ReVanced/revanced-patches/commit/dd4e2cd0855ccc51b94593004fdd8150ac3b41cc))
|
||||
|
||||
# [5.41.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.11...v5.41.0-dev.12) (2025-09-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - SponsorBlock:** Show category color in create new segment menu ([#5987](https://github.com/ReVanced/revanced-patches/issues/5987)) ([ffd933c](https://github.com/ReVanced/revanced-patches/commit/ffd933c6734274cdde5aaec0159b67f173f9228c))
|
||||
|
||||
# [5.41.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.10...v5.41.0-dev.11) (2025-09-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube:** Add `Disable video codecs` patch ([#5981](https://github.com/ReVanced/revanced-patches/issues/5981)) ([bfbffbd](https://github.com/ReVanced/revanced-patches/commit/bfbffbd1f5aa867027053e25b343a51a606216a3))
|
||||
|
||||
# [5.41.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.9...v5.41.0-dev.10) (2025-09-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **TikTok:** Show correct dialog restart text, use correct font color for non-dark mode ([d1a1293](https://github.com/ReVanced/revanced-patches/commit/d1a12930c35f630793a0f240d4203c2ff9060158))
|
||||
|
||||
# [5.41.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.8...v5.41.0-dev.9) (2025-09-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Instagram - Hide navigation buttons:** Remove button based on name ([#5971](https://github.com/ReVanced/revanced-patches/issues/5971)) ([6fa4043](https://github.com/ReVanced/revanced-patches/commit/6fa404331b5162682d83fba5f38ed570c31495fc))
|
||||
|
||||
# [5.41.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.7...v5.41.0-dev.8) (2025-09-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube Music:** Add `Check watch history domain name resolution` ([#5979](https://github.com/ReVanced/revanced-patches/issues/5979)) ([8af70fe](https://github.com/ReVanced/revanced-patches/commit/8af70fe2d10c0f4da2d7e53bd00f5b3979775d5d))
|
||||
|
||||
# [5.41.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.6...v5.41.0-dev.7) (2025-09-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Tumblr:** Add `Disable Tumblr TV` patch ([#5959](https://github.com/ReVanced/revanced-patches/issues/5959)) ([212418b](https://github.com/ReVanced/revanced-patches/commit/212418b8db9a730ae9efa89ad2bef24952afbadd))
|
||||
|
||||
# [5.41.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.5...v5.41.0-dev.6) (2025-09-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Spoof app version:** Add spoof target `20.05.46` that fixes transcript functionality ([5823f0e](https://github.com/ReVanced/revanced-patches/commit/5823f0e982e87b4a35d30feeca8a7e16edfebc5f))
|
||||
|
||||
# [5.41.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.4...v5.41.0-dev.5) (2025-09-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Twitch - Settings:** Fix missing style resources ([#5970](https://github.com/ReVanced/revanced-patches/issues/5970)) ([8c22995](https://github.com/ReVanced/revanced-patches/commit/8c229954d7f232a7a472ca49f1b5e7cdc475bbcc))
|
||||
|
||||
# [5.41.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.3...v5.41.0-dev.4) (2025-09-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Instagram - Limit feed to followed profiles:** Preserve favorites feed ([#5963](https://github.com/ReVanced/revanced-patches/issues/5963)) ([ef51401](https://github.com/ReVanced/revanced-patches/commit/ef514017f46025d9aef6884424caeb0670514e7a))
|
||||
|
||||
# [5.41.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.2...v5.41.0-dev.3) (2025-09-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Loop video:** Add player button to change loop video state ([#5961](https://github.com/ReVanced/revanced-patches/issues/5961)) ([dfb5407](https://github.com/ReVanced/revanced-patches/commit/dfb5407e67222e80e23c8935e04b6dbf1a43d757))
|
||||
|
||||
# [5.41.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.41.0-dev.1...v5.41.0-dev.2) (2025-09-21)
|
||||
|
||||
|
||||
|
||||
@@ -10,9 +10,17 @@ public class LimitFeedToFollowedProfiles {
|
||||
* Injection point.
|
||||
*/
|
||||
public static Map<String, String> setFollowingHeader(Map<String, String> requestHeaderMap) {
|
||||
String paginationHeaderName = "pagination_source";
|
||||
|
||||
// Patch the header only if it's trying to fetch the default feed
|
||||
String currentHeader = requestHeaderMap.get(paginationHeaderName);
|
||||
if (currentHeader != null && !currentHeader.equals("feed_recs")) {
|
||||
return requestHeaderMap;
|
||||
}
|
||||
|
||||
// Create new map as original is unmodifiable.
|
||||
Map<String, String> patchedRequestHeaderMap = new HashMap<>(requestHeaderMap);
|
||||
patchedRequestHeaderMap.put("pagination_source", "following");
|
||||
patchedRequestHeaderMap.put(paginationHeaderName, "following");
|
||||
return patchedRequestHeaderMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package app.revanced.extension.instagram.hide.navigation;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class HideNavigationButtonsPatch {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
* @param navigationButtonsList the list of navigation buttons, as an (obfuscated) Enum type
|
||||
* @param buttonNameToRemove the name of the button we want to remove
|
||||
* @param enumNameField the field in the nav button enum class which contains the name of the button
|
||||
* @return the patched list of navigation buttons
|
||||
*/
|
||||
public static List<Object> removeNavigationButtonByName(
|
||||
List<Object> navigationButtonsList,
|
||||
String buttonNameToRemove,
|
||||
String enumNameField
|
||||
)
|
||||
throws IllegalAccessException, NoSuchFieldException {
|
||||
for (Object button : navigationButtonsList) {
|
||||
Field f = button.getClass().getDeclaredField(enumNameField);
|
||||
String currentButtonEnumName = (String) f.get(button);
|
||||
|
||||
if (buttonNameToRemove.equals(currentButtonEnumName)) {
|
||||
navigationButtonsList.remove(button);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return navigationButtonsList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package app.revanced.extension.instagram.misc.links;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class OpenLinksExternallyPatch {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean openExternally(String url) {
|
||||
try {
|
||||
// The "url" parameter to this function will be of the form.
|
||||
// https://l.instagram.com/?u=<actual url>&e=<tracking id>
|
||||
String actualUrl = Uri.parse(url).getQueryParameter("u");
|
||||
if (actualUrl != null) {
|
||||
Utils.openLink(actualUrl);
|
||||
return true;
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "openExternally failure", ex);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package app.revanced.extension.music.patches.theme;
|
||||
|
||||
import app.revanced.extension.shared.theme.BaseThemePatch;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ThemePatch extends BaseThemePatch {
|
||||
|
||||
// Color constants used in relation with litho components.
|
||||
private static final int[] DARK_VALUES = {
|
||||
0xFF212121, // Comments box background.
|
||||
0xFF030303, // Button container background in album.
|
||||
0xFF000000, // Button container background in playlist.
|
||||
};
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
* <p>
|
||||
* Change the color of Litho components.
|
||||
* If the color of the component matches one of the values, return the background color.
|
||||
*
|
||||
* @param originalValue The original color value.
|
||||
* @return The new or original color value.
|
||||
*/
|
||||
public static int getValue(int originalValue) {
|
||||
return processColorValue(originalValue, DARK_VALUES, null);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -696,6 +697,18 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void openLink(String url) {
|
||||
try {
|
||||
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(url));
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
Logger.printInfo(() -> "Opening link with external browser: " + intent);
|
||||
getContext().startActivity(intent);
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "openLink failure", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public enum NetworkType {
|
||||
NONE,
|
||||
MOBILE,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
package app.revanced.extension.shared.patches;
|
||||
|
||||
import static app.revanced.extension.shared.StringRef.str;
|
||||
|
||||
@@ -13,8 +13,8 @@ import java.net.UnknownHostException;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.settings.BaseSettings;
|
||||
import app.revanced.extension.shared.ui.CustomDialog;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class CheckWatchHistoryDomainNameResolutionPatch {
|
||||
@@ -46,10 +46,10 @@ public class CheckWatchHistoryDomainNameResolutionPatch {
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
* Checks if s.youtube.com is blacklisted and playback history will fail to work.
|
||||
* Checks if YouTube watch history endpoint cannot be reached.
|
||||
*/
|
||||
public static void checkDnsResolver(Activity context) {
|
||||
if (!Utils.isNetworkConnected() || !Settings.CHECK_WATCH_HISTORY_DOMAIN_NAME.get()) return;
|
||||
if (!Utils.isNetworkConnected() || !BaseSettings.CHECK_WATCH_HISTORY_DOMAIN_NAME.get()) return;
|
||||
|
||||
Utils.runOnBackgroundThread(() -> {
|
||||
try {
|
||||
@@ -61,14 +61,12 @@ public class CheckWatchHistoryDomainNameResolutionPatch {
|
||||
// Prevent this false positive by verify youtube.com resolves.
|
||||
// If youtube.com does not resolve, then it's not a watch history domain resolving error
|
||||
// because the entire app will not work since no domains are resolving.
|
||||
if (domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)
|
||||
|| !domainResolvesToValidIP("youtube.com")) {
|
||||
if (!domainResolvesToValidIP("youtube.com")
|
||||
|| domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Utils.runOnMainThread(() -> {
|
||||
try {
|
||||
// Create the custom dialog.
|
||||
Pair<Dialog, LinearLayout> dialogPair = CustomDialog.create(
|
||||
context,
|
||||
str("revanced_check_watch_history_domain_name_dialog_title"), // Title.
|
||||
@@ -76,19 +74,13 @@ public class CheckWatchHistoryDomainNameResolutionPatch {
|
||||
null, // No EditText.
|
||||
null, // OK button text.
|
||||
() -> {}, // OK button action (just dismiss).
|
||||
() -> {}, // Cancel button action (just dismiss).
|
||||
null, // No cancel button.
|
||||
str("revanced_check_watch_history_domain_name_dialog_ignore"), // Neutral button text.
|
||||
() -> Settings.CHECK_WATCH_HISTORY_DOMAIN_NAME.save(false), // Neutral button action (Ignore).
|
||||
() -> BaseSettings.CHECK_WATCH_HISTORY_DOMAIN_NAME.save(false), // Neutral button action (Ignore).
|
||||
true // Dismiss dialog on Neutral button click.
|
||||
);
|
||||
|
||||
// Show the dialog.
|
||||
Dialog dialog = dialogPair.first;
|
||||
|
||||
Utils.showDialog(context, dialog, false, null);
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "checkDnsResolver dialog creation failure", ex);
|
||||
}
|
||||
Utils.showDialog(context, dialogPair.first, false, null);
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "checkDnsResolver failure", ex);
|
||||
@@ -28,10 +28,16 @@ public class BaseSettings {
|
||||
public static final BooleanSetting SETTINGS_SEARCH_HISTORY = new BooleanSetting("revanced_settings_search_history", TRUE, true);
|
||||
public static final StringSetting SETTINGS_SEARCH_ENTRIES = new StringSetting("revanced_settings_search_entries", "");
|
||||
|
||||
//
|
||||
// Settings shared by YouTube and YouTube Music.
|
||||
//
|
||||
|
||||
public static final BooleanSetting SPOOF_VIDEO_STREAMS = new BooleanSetting("revanced_spoof_video_streams", TRUE, true, "revanced_spoof_video_streams_user_dialog_message");
|
||||
public static final EnumSetting<AppLanguage> SPOOF_VIDEO_STREAMS_LANGUAGE = new EnumSetting<>("revanced_spoof_video_streams_language", AppLanguage.DEFAULT, new AudioStreamLanguageOverrideAvailability());
|
||||
public static final BooleanSetting SPOOF_STREAMING_DATA_STATS_FOR_NERDS = new BooleanSetting("revanced_spoof_streaming_data_stats_for_nerds", TRUE, parent(SPOOF_VIDEO_STREAMS));
|
||||
|
||||
public static final BooleanSetting SANITIZE_SHARED_LINKS = new BooleanSetting("revanced_sanitize_sharing_links", TRUE);
|
||||
public static final BooleanSetting REPLACE_MUSIC_LINKS_WITH_YOUTUBE = new BooleanSetting("revanced_replace_music_with_youtube", FALSE);
|
||||
|
||||
public static final BooleanSetting CHECK_WATCH_HISTORY_DOMAIN_NAME = new BooleanSetting("revanced_check_watch_history_domain_name", TRUE, false, false);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
|
||||
* Set by subclasses if Strings cannot be added as a resource.
|
||||
*/
|
||||
@Nullable
|
||||
protected static String restartDialogButtonText, restartDialogTitle, confirmDialogTitle, restartDialogMessage;
|
||||
protected static CharSequence restartDialogTitle, restartDialogMessage, restartDialogButtonText, confirmDialogTitle;
|
||||
|
||||
private final SharedPreferences.OnSharedPreferenceChangeListener listener = (sharedPreferences, str) -> {
|
||||
try {
|
||||
@@ -125,10 +125,13 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
|
||||
|
||||
showingUserDialogMessage = true;
|
||||
|
||||
CharSequence message = BulletPointPreference.formatIntoBulletPoints(
|
||||
Objects.requireNonNull(setting.userDialogMessage).toString());
|
||||
|
||||
Pair<Dialog, LinearLayout> dialogPair = CustomDialog.create(
|
||||
context,
|
||||
confirmDialogTitle, // Title.
|
||||
Objects.requireNonNull(setting.userDialogMessage).toString(), // No message.
|
||||
message,
|
||||
null, // No EditText.
|
||||
null, // OK button text.
|
||||
() -> {
|
||||
@@ -152,6 +155,7 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
|
||||
);
|
||||
|
||||
dialogPair.first.setOnDismissListener(d -> showingUserDialogMessage = false);
|
||||
dialogPair.first.setCancelable(false);
|
||||
|
||||
// Show the dialog.
|
||||
dialogPair.first.show();
|
||||
|
||||
@@ -15,7 +15,15 @@ import android.util.AttributeSet;
|
||||
@SuppressWarnings({"unused", "deprecation"})
|
||||
public class BulletPointPreference extends Preference {
|
||||
|
||||
public static SpannedString formatIntoBulletPoints(CharSequence source) {
|
||||
/**
|
||||
* Replaces bullet points with styled spans.
|
||||
*/
|
||||
public static CharSequence formatIntoBulletPoints(CharSequence source) {
|
||||
final char bulletPoint = '•';
|
||||
if (TextUtils.indexOf(source, bulletPoint) < 0) {
|
||||
return source; // Nothing to do.
|
||||
}
|
||||
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(source);
|
||||
|
||||
int lineStart = 0;
|
||||
@@ -26,7 +34,7 @@ public class BulletPointPreference extends Preference {
|
||||
if (lineEnd < 0) lineEnd = length;
|
||||
|
||||
// Apply BulletSpan only if the line starts with the '•' character.
|
||||
if (lineEnd > lineStart && builder.charAt(lineStart) == '•') {
|
||||
if (lineEnd > lineStart && builder.charAt(lineStart) == bulletPoint) {
|
||||
int deleteEnd = lineStart + 1; // remove the bullet itself
|
||||
|
||||
// If there's a single space right after the bullet, remove that too.
|
||||
|
||||
@@ -5,12 +5,15 @@ import static app.revanced.extension.shared.Utils.getResourceIdentifierOrThrow;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.os.Build;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -23,6 +26,7 @@ import android.widget.SearchView;
|
||||
import android.widget.Toolbar;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -118,6 +122,14 @@ public abstract class BaseSearchViewController {
|
||||
searchView.setBackground(createBackgroundDrawable());
|
||||
searchView.setQueryHint(str("revanced_settings_search_hint"));
|
||||
|
||||
// Set text size.
|
||||
searchEditText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||
|
||||
// Set cursor color.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
setCursorColor(searchEditText);
|
||||
}
|
||||
|
||||
// Configure RTL support based on app language.
|
||||
AppLanguage appLanguage = BaseSettings.REVANCED_LANGUAGE.get();
|
||||
if (Utils.isRightToLeftLocale(appLanguage.getLocale())) {
|
||||
@@ -126,6 +138,24 @@ public abstract class BaseSearchViewController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the cursor color (for Android 10+ devices).
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
private void setCursorColor(EditText editText) {
|
||||
// Get the cursor color based on the current theme.
|
||||
final int cursorColor = Utils.isDarkModeEnabled() ? Color.WHITE : Color.BLACK;
|
||||
|
||||
// Create cursor drawable.
|
||||
GradientDrawable cursorDrawable = new GradientDrawable();
|
||||
cursorDrawable.setShape(GradientDrawable.RECTANGLE);
|
||||
cursorDrawable.setSize(Utils.dipToPixels(2), -1); // Width: 2dp, Height: match text height.
|
||||
cursorDrawable.setColor(cursorColor);
|
||||
|
||||
// Set cursor drawable.
|
||||
editText.setTextCursorDrawable(cursorDrawable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the overlay container for displaying search results and history.
|
||||
*/
|
||||
|
||||
@@ -42,11 +42,8 @@ final class PlayerRoutes {
|
||||
JSONObject context = new JSONObject();
|
||||
|
||||
AppLanguage language = SpoofVideoStreamsPatch.getLanguageOverride();
|
||||
if (language == null || clientType == ANDROID_VR_1_43_32) {
|
||||
if (language == null) {
|
||||
// Force original audio has not overrode the language.
|
||||
// Or if YT has fallen over to the last unauthenticated client (VR 1.43), then
|
||||
// always use the app language because forcing an audio stream of specific languages
|
||||
// can sometimes fail so it's better to try and load something rather than nothing.
|
||||
language = BaseSettings.SPOOF_VIDEO_STREAMS_LANGUAGE.get();
|
||||
}
|
||||
//noinspection ExtractMethodRecommender
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package app.revanced.extension.shared.theme;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.extension.shared.Utils;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public abstract class BaseThemePatch {
|
||||
// Background colors.
|
||||
protected static final int BLACK_COLOR = Utils.getResourceColor("yt_black1");
|
||||
protected static final int WHITE_COLOR = Utils.getResourceColor("yt_white1");
|
||||
|
||||
/**
|
||||
* Check if a value matches any of the provided values.
|
||||
*
|
||||
* @param value The value to check.
|
||||
* @param of The array of values to compare against.
|
||||
* @return True if the value matches any of the provided values.
|
||||
*/
|
||||
protected static boolean anyEquals(int value, int... of) {
|
||||
for (int v : of) {
|
||||
if (value == v) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to process color values for Litho components.
|
||||
*
|
||||
* @param originalValue The original color value.
|
||||
* @param darkValues Array of dark mode color values to match.
|
||||
* @param lightValues Array of light mode color values to match.
|
||||
* @return The new or original color value.
|
||||
*/
|
||||
protected static int processColorValue(int originalValue, int[] darkValues, @Nullable int[] lightValues) {
|
||||
if (Utils.isDarkModeEnabled()) {
|
||||
if (anyEquals(originalValue, darkValues)) {
|
||||
return BLACK_COLOR;
|
||||
}
|
||||
} else if (lightValues != null && anyEquals(originalValue, lightValues)) {
|
||||
return WHITE_COLOR;
|
||||
}
|
||||
|
||||
return originalValue;
|
||||
}
|
||||
}
|
||||
@@ -58,10 +58,10 @@ public class CustomDialog {
|
||||
* @param dismissDialogOnNeutralClick If the dialog should be dismissed when the Neutral button is clicked.
|
||||
* @return The Dialog and its main LinearLayout container.
|
||||
*/
|
||||
public static Pair<Dialog, LinearLayout> create(Context context, String title, CharSequence message,
|
||||
@Nullable EditText editText, String okButtonText,
|
||||
public static Pair<Dialog, LinearLayout> create(Context context, CharSequence title, CharSequence message,
|
||||
@Nullable EditText editText, CharSequence okButtonText,
|
||||
Runnable onOkClick, Runnable onCancelClick,
|
||||
@Nullable String neutralButtonText,
|
||||
@Nullable CharSequence neutralButtonText,
|
||||
@Nullable Runnable onNeutralClick,
|
||||
boolean dismissDialogOnNeutralClick) {
|
||||
Logger.printDebug(() -> "Creating custom dialog with title: " + title);
|
||||
@@ -85,9 +85,9 @@ public class CustomDialog {
|
||||
* @param onNeutralClick Action to perform when the Neutral button is clicked, or null if no Neutral button is needed.
|
||||
* @param dismissDialogOnNeutralClick If the dialog should be dismissed when the Neutral button is clicked.
|
||||
*/
|
||||
private CustomDialog(Context context, String title, CharSequence message, @Nullable EditText editText,
|
||||
String okButtonText, Runnable onOkClick, Runnable onCancelClick,
|
||||
@Nullable String neutralButtonText, @Nullable Runnable onNeutralClick,
|
||||
private CustomDialog(Context context, CharSequence title, CharSequence message, @Nullable EditText editText,
|
||||
CharSequence okButtonText, Runnable onOkClick, Runnable onCancelClick,
|
||||
@Nullable CharSequence neutralButtonText, @Nullable Runnable onNeutralClick,
|
||||
boolean dismissDialogOnNeutralClick) {
|
||||
this.context = context;
|
||||
this.dialog = new Dialog(context);
|
||||
@@ -139,7 +139,7 @@ public class CustomDialog {
|
||||
*
|
||||
* @param title The title text to display.
|
||||
*/
|
||||
private void addTitle(String title) {
|
||||
private void addTitle(CharSequence title) {
|
||||
if (TextUtils.isEmpty(title)) return;
|
||||
|
||||
TextView titleView = new TextView(context);
|
||||
@@ -232,8 +232,8 @@ public class CustomDialog {
|
||||
* @param onNeutralClick Action for the Neutral button click, or null if no Neutral button.
|
||||
* @param dismissDialogOnNeutralClick If the dialog should dismiss on Neutral button click.
|
||||
*/
|
||||
private void addButtons(String okButtonText, Runnable onOkClick, Runnable onCancelClick,
|
||||
@Nullable String neutralButtonText, @Nullable Runnable onNeutralClick,
|
||||
private void addButtons(CharSequence okButtonText, Runnable onOkClick, Runnable onCancelClick,
|
||||
@Nullable CharSequence neutralButtonText, @Nullable Runnable onNeutralClick,
|
||||
boolean dismissDialogOnNeutralClick) {
|
||||
// Button container.
|
||||
LinearLayout buttonContainer = new LinearLayout(context);
|
||||
@@ -280,7 +280,7 @@ public class CustomDialog {
|
||||
* @param dismissDialog If the dialog should dismiss when the button is clicked.
|
||||
* @return The created Button.
|
||||
*/
|
||||
private Button createButton(String text, Runnable onClick, boolean isOkButton, boolean dismissDialog) {
|
||||
private Button createButton(CharSequence text, Runnable onClick, boolean isOkButton, boolean dismissDialog) {
|
||||
Button button = new Button(context, null, 0);
|
||||
button.setText(text);
|
||||
button.setTextSize(14);
|
||||
|
||||
@@ -2,12 +2,15 @@ package app.revanced.extension.tiktok.settings.preference;
|
||||
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.settings.Setting;
|
||||
import app.revanced.extension.shared.settings.preference.AbstractPreferenceFragment;
|
||||
import app.revanced.extension.tiktok.settings.preference.categories.DownloadsPreferenceCategory;
|
||||
import app.revanced.extension.tiktok.settings.preference.categories.FeedFilterPreferenceCategory;
|
||||
import app.revanced.extension.tiktok.settings.preference.categories.ExtensionPreferenceCategory;
|
||||
import app.revanced.extension.tiktok.settings.preference.categories.FeedFilterPreferenceCategory;
|
||||
import app.revanced.extension.tiktok.settings.preference.categories.SimSpoofPreferenceCategory;
|
||||
|
||||
/**
|
||||
@@ -37,10 +40,14 @@ public class TikTokPreferenceFragment extends AbstractPreferenceFragment {
|
||||
|
||||
// Currently no resources can be compiled for TikTok (fails with aapt error).
|
||||
// So all TikTok Strings are hard coded in the extension.
|
||||
restartDialogTitle = "Refresh and restart";
|
||||
restartDialogTitle = "Restart required";
|
||||
restartDialogMessage = "Restart the app for this change to take effect.";
|
||||
restartDialogButtonText = "Restart";
|
||||
confirmDialogTitle = "Do you wish to proceed?";
|
||||
|
||||
// App does not use dark mode.
|
||||
Utils.setIsDarkModeEnabled(false);
|
||||
|
||||
PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(context);
|
||||
setPreferenceScreen(preferenceScreen);
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
// Do not remove. Necessary for the extension plugin to be applied to the project.
|
||||
dependencies {
|
||||
compileOnly(project(":extensions:shared:library"))
|
||||
}
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
package app.revanced.twitter.patches.links;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class ChangeLinkSharingDomainPatch {
|
||||
private static final String DOMAIN_NAME = "https://fxtwitter.com";
|
||||
private static final String LINK_FORMAT = "%s/%s/status/%s";
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static String formatResourceLink(Object... formatArgs) {
|
||||
String username = (String) formatArgs[0];
|
||||
String tweetId = (String) formatArgs[1];
|
||||
return String.format(LINK_FORMAT, DOMAIN_NAME, username, tweetId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static String formatLink(long tweetId, String username) {
|
||||
return String.format(LINK_FORMAT, DOMAIN_NAME, username, tweetId);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,18 @@ package app.revanced.twitter.patches.links;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated(forRemoval = true)
|
||||
public final class OpenLinksWithAppChooserPatch {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static void openWithChooser(final Context context, final Intent intent) {
|
||||
Log.d("ReVanced", "Opening intent with chooser: " + intent);
|
||||
Logger.printInfo(() -> "Opening intent with chooser: " + intent);
|
||||
|
||||
intent.setAction("android.intent.action.VIEW");
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class AutoRepeatPatch {
|
||||
//Used by app.revanced.patches.youtube.layout.autorepeat.patch.AutoRepeatPatch
|
||||
public static boolean shouldAutoRepeat() {
|
||||
return Settings.AUTO_REPEAT.get();
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import android.view.Display;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class DisableHdrPatch {
|
||||
public class DisableVideoCodecsPatch {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
@@ -15,5 +15,12 @@ public class DisableHdrPatch {
|
||||
? new int[0]
|
||||
: capabilities.getSupportedHdrTypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean allowVP9() {
|
||||
return !Settings.FORCE_AVC_CODEC.get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ public class ForceOriginalAudioPatch {
|
||||
*/
|
||||
public static void setPreferredLanguage() {
|
||||
if (Settings.FORCE_ORIGINAL_AUDIO.get()
|
||||
&& SpoofVideoStreamsPatch.spoofingToClientWithNoMultiAudioStreams()) {
|
||||
&& SpoofVideoStreamsPatch.spoofingToClientWithNoMultiAudioStreams()
|
||||
&& !Settings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get().useAuth) {
|
||||
// If client spoofing does not use authentication and lacks multi-audio streams,
|
||||
// then can use any language code for the request and if that requested language is
|
||||
// not available YT uses the original audio language. Authenticated requests ignore
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class HideEndScreenCardsPatch {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static void hideEndScreenCardView(View view) {
|
||||
Utils.hideViewUnderCondition(Settings.HIDE_ENDSCREEN_CARDS, view);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean hideEndScreenCards() {
|
||||
return Settings.HIDE_ENDSCREEN_CARDS.get();
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class HideEndscreenCardsPatch {
|
||||
//Used by app.revanced.patches.youtube.layout.hideendscreencards.bytecode.patch.HideEndscreenCardsPatch
|
||||
public static void hideEndscreen(View view) {
|
||||
if (!Settings.HIDE_ENDSCREEN_CARDS.get()) return;
|
||||
view.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class LoopVideoPatch {
|
||||
/**
|
||||
* Injection point
|
||||
*/
|
||||
public static boolean shouldLoopVideo() {
|
||||
return Settings.LOOP_VIDEO.get();
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.settings.Setting;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
@SuppressWarnings({"unused", "SpellCheckingInspection"})
|
||||
public final class MiniplayerPatch {
|
||||
|
||||
/**
|
||||
@@ -129,7 +129,7 @@ public final class MiniplayerPatch {
|
||||
(CURRENT_TYPE.isModern() && Settings.MINIPLAYER_DOUBLE_TAP_ACTION.get());
|
||||
|
||||
private static final boolean DRAG_AND_DROP_ENABLED =
|
||||
CURRENT_TYPE.isModern() && Settings.MINIPLAYER_DRAG_AND_DROP.get();
|
||||
CURRENT_TYPE.isModern() && !Settings.MINIPLAYER_DISABLE_DRAG_AND_DROP.get();
|
||||
|
||||
private static final boolean HIDE_OVERLAY_BUTTONS_ENABLED =
|
||||
Settings.MINIPLAYER_HIDE_OVERLAY_BUTTONS.get()
|
||||
@@ -145,10 +145,10 @@ public final class MiniplayerPatch {
|
||||
&& (VersionCheckPatch.IS_19_34_OR_GREATER || Settings.MINIPLAYER_HIDE_REWIND_FORWARD.get());
|
||||
|
||||
private static final boolean MINIPLAYER_ROUNDED_CORNERS_ENABLED =
|
||||
CURRENT_TYPE.isModern() && Settings.MINIPLAYER_ROUNDED_CORNERS.get();
|
||||
CURRENT_TYPE.isModern() && !Settings.MINIPLAYER_DISABLE_ROUNDED_CORNERS.get();
|
||||
|
||||
private static final boolean MINIPLAYER_HORIZONTAL_DRAG_ENABLED =
|
||||
DRAG_AND_DROP_ENABLED && Settings.MINIPLAYER_HORIZONTAL_DRAG.get();
|
||||
DRAG_AND_DROP_ENABLED && !Settings.MINIPLAYER_DISABLE_HORIZONTAL_DRAG.get();
|
||||
|
||||
/**
|
||||
* Remove a broken and always present subtitle text that is only
|
||||
@@ -173,14 +173,14 @@ public final class MiniplayerPatch {
|
||||
public static final class MiniplayerHorizontalDragAvailability implements Setting.Availability {
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return Settings.MINIPLAYER_TYPE.get().isModern() && Settings.MINIPLAYER_DRAG_AND_DROP.get();
|
||||
return Settings.MINIPLAYER_TYPE.get().isModern() && !Settings.MINIPLAYER_DISABLE_DRAG_AND_DROP.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Setting<?>> getParentSettings() {
|
||||
return List.of(
|
||||
Settings.MINIPLAYER_TYPE,
|
||||
Settings.MINIPLAYER_DRAG_AND_DROP
|
||||
Settings.MINIPLAYER_DISABLE_DRAG_AND_DROP
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public final class MiniplayerPatch {
|
||||
return type == MODERN_4
|
||||
|| (!IS_19_20_OR_GREATER && (type == MODERN_1 || type == MODERN_3))
|
||||
|| (!IS_19_26_OR_GREATER && type == MODERN_1
|
||||
&& !Settings.MINIPLAYER_DOUBLE_TAP_ACTION.get() && !Settings.MINIPLAYER_DRAG_AND_DROP.get())
|
||||
&& !Settings.MINIPLAYER_DOUBLE_TAP_ACTION.get() && Settings.MINIPLAYER_DISABLE_DRAG_AND_DROP.get())
|
||||
|| (IS_19_29_OR_GREATER && type == MODERN_3);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public final class MiniplayerPatch {
|
||||
return List.of(
|
||||
Settings.MINIPLAYER_TYPE,
|
||||
Settings.MINIPLAYER_DOUBLE_TAP_ACTION,
|
||||
Settings.MINIPLAYER_DRAG_AND_DROP
|
||||
Settings.MINIPLAYER_DISABLE_DRAG_AND_DROP
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,11 @@ import app.revanced.extension.youtube.shared.PlayerType;
|
||||
@SuppressWarnings("unused")
|
||||
final class CommentsFilter extends Filter {
|
||||
|
||||
private static final String COMMENT_COMPOSER_PATH = "comment_composer.eml";
|
||||
|
||||
private final StringFilterGroup chipBar;
|
||||
private final ByteArrayFilterGroup aiCommentsSummary;
|
||||
private final StringFilterGroup emojiAndTimestampButtons;
|
||||
|
||||
public CommentsFilter() {
|
||||
var chatSummary = new StringFilterGroup(
|
||||
@@ -52,6 +55,11 @@ final class CommentsFilter extends Filter {
|
||||
"composer_short_creation_button.eml"
|
||||
);
|
||||
|
||||
emojiAndTimestampButtons = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_EMOJI_AND_TIMESTAMP_BUTTONS,
|
||||
"|CellType|ContainerType|ContainerType|ContainerType|ContainerType|ContainerType|"
|
||||
);
|
||||
|
||||
var previewComment = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_PREVIEW_COMMENT,
|
||||
"|carousel_item",
|
||||
@@ -64,11 +72,6 @@ final class CommentsFilter extends Filter {
|
||||
"super_thanks_button.eml"
|
||||
);
|
||||
|
||||
StringFilterGroup timestampButton = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_TIMESTAMP_BUTTON,
|
||||
"composer_timestamp_button.eml"
|
||||
);
|
||||
|
||||
addPathCallbacks(
|
||||
channelGuidelines,
|
||||
chatSummary,
|
||||
@@ -77,9 +80,9 @@ final class CommentsFilter extends Filter {
|
||||
comments,
|
||||
communityGuidelines,
|
||||
createAShort,
|
||||
emojiAndTimestampButtons,
|
||||
previewComment,
|
||||
thanksButton,
|
||||
timestampButton
|
||||
thanksButton
|
||||
|
||||
);
|
||||
}
|
||||
@@ -93,6 +96,10 @@ final class CommentsFilter extends Filter {
|
||||
&& aiCommentsSummary.check(buffer).isFiltered();
|
||||
}
|
||||
|
||||
if (matchedGroup == emojiAndTimestampButtons) {
|
||||
return path.startsWith(COMMENT_COMPOSER_PATH);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package app.revanced.extension.youtube.patches.components;
|
||||
import static app.revanced.extension.youtube.shared.NavigationBar.NavigationButton;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -500,4 +503,62 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
// This check is important as the shelf layout is used for the library tab playlists.
|
||||
return NavigationButton.getSelectedNavigationButton() != NavigationButton.LIBRARY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static SpannableString modifyFeedSubtitleSpan(SpannableString original, float truncationDimension) {
|
||||
try {
|
||||
final boolean hideViewCount = Settings.HIDE_VIEW_COUNT.get();
|
||||
final boolean hideUploadTime = Settings.HIDE_UPLOAD_TIME.get();
|
||||
if (!hideViewCount && !hideUploadTime) {
|
||||
return original;
|
||||
}
|
||||
|
||||
// Applies only for these specific dimensions.
|
||||
if (truncationDimension == 16f || truncationDimension == 42f) {
|
||||
String delimiter = " · ";
|
||||
final int delimiterLength = delimiter.length();
|
||||
|
||||
// Index includes the starting delimiter.
|
||||
final int viewCountStartIndex = TextUtils.indexOf(original, delimiter);
|
||||
if (viewCountStartIndex < 0) {
|
||||
return original;
|
||||
}
|
||||
|
||||
final int uploadTimeStartIndex = TextUtils.indexOf(original, delimiter,
|
||||
viewCountStartIndex + delimiterLength);
|
||||
if (uploadTimeStartIndex < 0) {
|
||||
return original;
|
||||
}
|
||||
|
||||
// Ensure there is exactly 2 delimiters.
|
||||
if (TextUtils.indexOf(original, delimiter,
|
||||
uploadTimeStartIndex + delimiterLength) >= 0) {
|
||||
return original;
|
||||
}
|
||||
|
||||
// Make a mutable copy that keeps existing span styling.
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(original);
|
||||
|
||||
// Remove the sections.
|
||||
if (hideUploadTime) {
|
||||
builder.delete(uploadTimeStartIndex, original.length());
|
||||
}
|
||||
|
||||
if (hideViewCount) {
|
||||
builder.delete(viewCountStartIndex, uploadTimeStartIndex);
|
||||
}
|
||||
|
||||
SpannableString replacement = new SpannableString(builder);
|
||||
Logger.printDebug(() -> "Replacing feed subtitle span: " + original + " with: " + replacement);
|
||||
|
||||
return replacement;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "modifyFeedSubtitleSpan failure", ex);
|
||||
}
|
||||
|
||||
return original;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,13 @@ public final class ShortsFilter extends Filter {
|
||||
"reel_dislike_button.eml"
|
||||
);
|
||||
|
||||
StringFilterGroup previewComment = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_PREVIEW_COMMENT,
|
||||
// Preview comment that can popup while a Short is playing.
|
||||
// Uses no bundled icons, and instead the users profile photo is shown.
|
||||
"participation_bar.eml"
|
||||
);
|
||||
|
||||
joinButton = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_JOIN_BUTTON,
|
||||
"sponsor_button"
|
||||
@@ -213,7 +220,7 @@ public final class ShortsFilter extends Filter {
|
||||
|
||||
addPathCallbacks(
|
||||
shortsCompactFeedVideo, joinButton, subscribeButton, paidPromotionButton,
|
||||
shortsActionBar, suggestedAction, pausedOverlayButtons, channelBar,
|
||||
shortsActionBar, suggestedAction, pausedOverlayButtons, channelBar, previewComment,
|
||||
fullVideoLinkLabel, videoTitle, useSoundButton, reelSoundMetadata, soundButton, infoPanel,
|
||||
stickers, likeFountain, likeButton, dislikeButton
|
||||
);
|
||||
@@ -243,12 +250,6 @@ public final class ShortsFilter extends Filter {
|
||||
// Suggested actions.
|
||||
//
|
||||
suggestedActionsBuffer.addAll(
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_PREVIEW_COMMENT,
|
||||
// Preview comment that can popup while a Short is playing.
|
||||
// Uses no bundled icons, and instead the users profile photo is shown.
|
||||
"shorts-comments-panel"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SHOP_BUTTON,
|
||||
"yt_outline_bag_"
|
||||
|
||||
@@ -18,7 +18,22 @@ public class SpoofVideoStreamsPatch {
|
||||
* Injection point.
|
||||
*/
|
||||
public static void setClientOrderToUse() {
|
||||
List<ClientType> availableClients = List.of(
|
||||
final boolean forceAVC = Settings.FORCE_AVC_CODEC.get();
|
||||
|
||||
// VR 1.61 uses VP9/AV1, and cannot force AVC.
|
||||
ClientType client = Settings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get();
|
||||
if (forceAVC && client == ANDROID_VR_1_61_48) {
|
||||
client = ANDROID_VR_1_43_32; // Use VR 1.43 instead.
|
||||
}
|
||||
|
||||
List<ClientType> availableClients = forceAVC
|
||||
? List.of(
|
||||
ANDROID_VR_1_43_32,
|
||||
VISIONOS,
|
||||
ANDROID_CREATOR,
|
||||
ANDROID_VR_1_61_48,
|
||||
IPADOS)
|
||||
: List.of(
|
||||
ANDROID_VR_1_61_48,
|
||||
VISIONOS,
|
||||
ANDROID_CREATOR,
|
||||
@@ -27,6 +42,6 @@ public class SpoofVideoStreamsPatch {
|
||||
);
|
||||
|
||||
app.revanced.extension.shared.spoof.SpoofVideoStreamsPatch.setClientsToUse(
|
||||
availableClients, Settings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get());
|
||||
availableClients, client);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
package app.revanced.extension.youtube.patches.theme;
|
||||
|
||||
import static app.revanced.extension.youtube.patches.theme.ThemePatch.SplashScreenAnimationStyle.styleFromOrdinal;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.theme.BaseThemePatch;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ThemePatch {
|
||||
|
||||
public class ThemePatch extends BaseThemePatch {
|
||||
public enum SplashScreenAnimationStyle {
|
||||
DEFAULT(0),
|
||||
FPS_60_ONE_SECOND(1),
|
||||
@@ -43,57 +40,39 @@ public class ThemePatch {
|
||||
}
|
||||
}
|
||||
|
||||
// color constants used in relation with litho components
|
||||
// Color constants used in relation with litho components.
|
||||
private static final int[] WHITE_VALUES = {
|
||||
-1, // comments chip background
|
||||
-394759, // music related results panel background
|
||||
-83886081, // video chapters list background
|
||||
0xFFFFFFFF, // Comments chip background.
|
||||
0xFFF9F9F9, // Music related results panel background.
|
||||
0xFAFFFFFF, // Video chapters list background.
|
||||
};
|
||||
|
||||
private static final int[] DARK_VALUES = {
|
||||
-14145496, // explore drawer background
|
||||
-14606047, // comments chip background
|
||||
-15198184, // music related results panel background
|
||||
-15790321, // comments chip background (new layout)
|
||||
-98492127 // video chapters list background
|
||||
0xFF282828, // Explore drawer background.
|
||||
0xFF212121, // Comments chip background.
|
||||
0xFF181818, // Music related results panel background.
|
||||
0xFF0F0F0F, // Comments chip background (new layout).
|
||||
0xFA212121, // Video chapters list background.
|
||||
};
|
||||
|
||||
// Background colors.
|
||||
private static final int WHITE_COLOR = Utils.getResourceColor("yt_white1");
|
||||
private static final int BLACK_COLOR = Utils.getResourceColor("yt_black1");
|
||||
|
||||
private static final boolean GRADIENT_LOADING_SCREEN_ENABLED = Settings.GRADIENT_LOADING_SCREEN.get();
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
* <p>
|
||||
* Change the color of Litho components.
|
||||
* If the color of the component matches one of the values, return the background color .
|
||||
* If the color of the component matches one of the values, return the background color.
|
||||
*
|
||||
* @param originalValue The original color value.
|
||||
* @return The new or original color value
|
||||
* @return The new or original color value.
|
||||
*/
|
||||
public static int getValue(int originalValue) {
|
||||
if (Utils.isDarkModeEnabled()) {
|
||||
if (anyEquals(originalValue, DARK_VALUES)) return BLACK_COLOR;
|
||||
} else {
|
||||
if (anyEquals(originalValue, WHITE_VALUES)) return WHITE_COLOR;
|
||||
}
|
||||
|
||||
return originalValue;
|
||||
}
|
||||
|
||||
private static boolean anyEquals(int value, int... of) {
|
||||
for (int v : of) if (value == v) return true;
|
||||
|
||||
return false;
|
||||
return processColorValue(originalValue, DARK_VALUES, WHITE_VALUES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean gradientLoadingScreenEnabled(boolean original) {
|
||||
return GRADIENT_LOADING_SCREEN_ENABLED;
|
||||
return Settings.GRADIENT_LOADING_SCREEN.get();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,7 +87,7 @@ public class ThemePatch {
|
||||
final int replacement = style.style;
|
||||
if (original != replacement) {
|
||||
Logger.printDebug(() -> "Overriding splash screen style from: "
|
||||
+ styleFromOrdinal(original) + " to: " + style);
|
||||
+ SplashScreenAnimationStyle.styleFromOrdinal(original) + " to: " + style);
|
||||
}
|
||||
|
||||
return replacement;
|
||||
|
||||
@@ -11,6 +11,10 @@ import static app.revanced.extension.youtube.patches.ChangeHeaderPatch.HeaderLog
|
||||
import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.ChangeStartPageTypeAvailability;
|
||||
import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.StartPage;
|
||||
import static app.revanced.extension.youtube.patches.ExitFullscreenPatch.FullscreenMode;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerAnyModernAvailability;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHideOverlayButtonsAvailability;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHideRewindOrOverlayOpacityAvailability;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHideSubtextsAvailability;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHorizontalDragAvailability;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.MINIMAL;
|
||||
@@ -48,6 +52,9 @@ import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationPr
|
||||
|
||||
public class Settings extends BaseSettings {
|
||||
// Video
|
||||
public static final BooleanSetting ADVANCED_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_advanced_video_quality_menu", TRUE);
|
||||
public static final BooleanSetting DISABLE_HDR_VIDEO = new BooleanSetting("revanced_disable_hdr_video", FALSE);
|
||||
public static final BooleanSetting FORCE_AVC_CODEC = new BooleanSetting("revanced_force_avc_codec", FALSE, true, "revanced_force_avc_codec_user_dialog_message");
|
||||
public static final IntegerSetting VIDEO_QUALITY_DEFAULT_WIFI = new IntegerSetting("revanced_video_quality_default_wifi", -2);
|
||||
public static final IntegerSetting VIDEO_QUALITY_DEFAULT_MOBILE = new IntegerSetting("revanced_video_quality_default_mobile", -2);
|
||||
public static final BooleanSetting REMEMBER_VIDEO_QUALITY_LAST_SELECTED = new BooleanSetting("revanced_remember_video_quality_last_selected", FALSE);
|
||||
@@ -56,8 +63,6 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting REMEMBER_SHORTS_QUALITY_LAST_SELECTED = new BooleanSetting("revanced_remember_shorts_quality_last_selected", FALSE);
|
||||
public static final BooleanSetting REMEMBER_VIDEO_QUALITY_LAST_SELECTED_TOAST = new BooleanSetting("revanced_remember_video_quality_last_selected_toast", TRUE, false,
|
||||
parentsAny(REMEMBER_VIDEO_QUALITY_LAST_SELECTED, REMEMBER_SHORTS_QUALITY_LAST_SELECTED));
|
||||
public static final BooleanSetting ADVANCED_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_advanced_video_quality_menu", TRUE);
|
||||
public static final BooleanSetting DISABLE_HDR_VIDEO = new BooleanSetting("revanced_disable_hdr_video", FALSE);
|
||||
|
||||
// Speed
|
||||
public static final FloatSetting SPEED_TAP_AND_HOLD = new FloatSetting("revanced_speed_tap_and_hold", 2.0f, true);
|
||||
@@ -111,7 +116,9 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_SHOW_MORE_BUTTON = new BooleanSetting("revanced_hide_show_more_button", TRUE, true);
|
||||
public static final BooleanSetting HIDE_SURVEYS = new BooleanSetting("revanced_hide_surveys", TRUE);
|
||||
public static final BooleanSetting HIDE_TICKET_SHELF = new BooleanSetting("revanced_hide_ticket_shelf", FALSE);
|
||||
public static final BooleanSetting HIDE_UPLOAD_TIME = new BooleanSetting("revanced_hide_upload_time", FALSE, "revanced_hide_upload_time_user_dialog_message");
|
||||
public static final BooleanSetting HIDE_VIDEO_RECOMMENDATION_LABELS = new BooleanSetting("revanced_hide_video_recommendation_labels", TRUE);
|
||||
public static final BooleanSetting HIDE_VIEW_COUNT = new BooleanSetting("revanced_hide_view_count", FALSE, "revanced_hide_view_count_user_dialog_message");
|
||||
|
||||
// Alternative thumbnails
|
||||
public static final EnumSetting<ThumbnailOption> ALT_THUMBNAIL_HOME = new EnumSetting<>("revanced_alt_thumbnail_home", ThumbnailOption.ORIGINAL);
|
||||
@@ -174,15 +181,15 @@ public class Settings extends BaseSettings {
|
||||
|
||||
// Miniplayer
|
||||
public static final EnumSetting<MiniplayerType> MINIPLAYER_TYPE = new EnumSetting<>("revanced_miniplayer_type", MiniplayerType.DEFAULT, true);
|
||||
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, new MiniplayerPatch.MiniplayerAnyModernAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_DRAG_AND_DROP = new BooleanSetting("revanced_miniplayer_drag_and_drop", TRUE, true, new MiniplayerPatch.MiniplayerAnyModernAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HORIZONTAL_DRAG = new BooleanSetting("revanced_miniplayer_horizontal_drag", FALSE, true, new MiniplayerHorizontalDragAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HIDE_OVERLAY_BUTTONS = new BooleanSetting("revanced_miniplayer_hide_overlay_buttons", FALSE, true, new MiniplayerPatch.MiniplayerHideOverlayButtonsAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, new MiniplayerPatch.MiniplayerHideSubtextsAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_DISABLE_DRAG_AND_DROP = new BooleanSetting("revanced_miniplayer_disable_drag_and_drop", FALSE, true, new MiniplayerAnyModernAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_DISABLE_HORIZONTAL_DRAG = new BooleanSetting("revanced_miniplayer_disable_horizontal_drag", FALSE, true, new MiniplayerHorizontalDragAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_DISABLE_ROUNDED_CORNERS = new BooleanSetting("revanced_miniplayer_disable_rounded_corners", FALSE, true, new MiniplayerAnyModernAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, new MiniplayerAnyModernAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HIDE_OVERLAY_BUTTONS = new BooleanSetting("revanced_miniplayer_hide_overlay_buttons", FALSE, true, new MiniplayerHideOverlayButtonsAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, new MiniplayerHideSubtextsAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_HIDE_REWIND_FORWARD = new BooleanSetting("revanced_miniplayer_hide_rewind_forward", TRUE, true, new MiniplayerPatch.MiniplayerHideRewindOrOverlayOpacityAvailability());
|
||||
public static final BooleanSetting MINIPLAYER_ROUNDED_CORNERS = new BooleanSetting("revanced_miniplayer_rounded_corners", TRUE, true, new MiniplayerPatch.MiniplayerAnyModernAvailability());
|
||||
public static final IntegerSetting MINIPLAYER_WIDTH_DIP = new IntegerSetting("revanced_miniplayer_width_dip", 192, true, new MiniplayerPatch.MiniplayerAnyModernAvailability());
|
||||
public static final IntegerSetting MINIPLAYER_OPACITY = new IntegerSetting("revanced_miniplayer_opacity", 100, true, new MiniplayerPatch.MiniplayerHideRewindOrOverlayOpacityAvailability());
|
||||
public static final IntegerSetting MINIPLAYER_WIDTH_DIP = new IntegerSetting("revanced_miniplayer_width_dip", 192, true, new MiniplayerAnyModernAvailability());
|
||||
public static final IntegerSetting MINIPLAYER_OPACITY = new IntegerSetting("revanced_miniplayer_opacity", 100, true, new MiniplayerHideRewindOrOverlayOpacityAvailability());
|
||||
|
||||
// External downloader
|
||||
public static final BooleanSetting EXTERNAL_DOWNLOADER = new BooleanSetting("revanced_external_downloader", FALSE);
|
||||
@@ -198,9 +205,9 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_COMMENTS_COMMUNITY_GUIDELINES = new BooleanSetting("revanced_hide_comments_community_guidelines", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_CREATE_A_SHORT_BUTTON = new BooleanSetting("revanced_hide_comments_create_a_short_button", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_comments_preview_comment", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_EMOJI_AND_TIMESTAMP_BUTTONS = new BooleanSetting("revanced_hide_comments_emoji_and_timestamp_buttons", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_BUTTON = new BooleanSetting("revanced_hide_comments_timestamp_button", FALSE);
|
||||
|
||||
// Description
|
||||
public static final BooleanSetting HIDE_AI_GENERATED_VIDEO_SUMMARY_SECTION = new BooleanSetting("revanced_hide_ai_generated_video_summary_section", FALSE);
|
||||
@@ -341,9 +348,9 @@ public class Settings extends BaseSettings {
|
||||
// Miscellaneous
|
||||
public static final BooleanSetting ANNOUNCEMENTS = new BooleanSetting("revanced_announcements", TRUE);
|
||||
public static final IntegerSetting ANNOUNCEMENT_LAST_ID = new IntegerSetting("revanced_announcement_last_id", -1, false, false);
|
||||
public static final BooleanSetting AUTO_REPEAT = new BooleanSetting("revanced_auto_repeat", FALSE);
|
||||
public static final BooleanSetting LOOP_VIDEO = new BooleanSetting("revanced_loop_video", FALSE);
|
||||
public static final BooleanSetting LOOP_VIDEO_BUTTON = new BooleanSetting("revanced_loop_video_button", FALSE);
|
||||
public static final BooleanSetting BYPASS_URL_REDIRECTS = new BooleanSetting("revanced_bypass_url_redirects", TRUE);
|
||||
public static final BooleanSetting CHECK_WATCH_HISTORY_DOMAIN_NAME = new BooleanSetting("revanced_check_watch_history_domain_name", TRUE, false, false);
|
||||
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_CHAPTERS = new BooleanSetting("revanced_disable_haptic_feedback_chapters", FALSE);
|
||||
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_PRECISE_SEEKING = new BooleanSetting("revanced_disable_haptic_feedback_precise_seeking", FALSE);
|
||||
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_SEEK_UNDO = new BooleanSetting("revanced_disable_haptic_feedback_seek_undo", FALSE);
|
||||
@@ -444,6 +451,7 @@ public class Settings extends BaseSettings {
|
||||
public static final StringSetting SB_CATEGORY_UNSUBMITTED_COLOR = new StringSetting("sb_unsubmitted_color", "#FFFFFFFF", false, false);
|
||||
|
||||
// Deprecated migrations
|
||||
private static final BooleanSetting DEPRECATED_AUTO_REPEAT = new BooleanSetting("revanced_auto_repeat", FALSE);
|
||||
private static final BooleanSetting DEPRECATED_HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true);
|
||||
private static final BooleanSetting DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_video_quality_menu_footer", FALSE);
|
||||
private static final IntegerSetting DEPRECATED_SWIPE_OVERLAY_BACKGROUND_ALPHA = new IntegerSetting("revanced_swipe_overlay_background_alpha", 127);
|
||||
@@ -452,20 +460,21 @@ public class Settings extends BaseSettings {
|
||||
private static final BooleanSetting DEPRECATED_RESTORE_OLD_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_restore_old_video_quality_menu", TRUE);
|
||||
private static final BooleanSetting DEPRECATED_AUTO_CAPTIONS = new BooleanSetting("revanced_auto_captions", FALSE);
|
||||
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_SPONSOR_OPACITY = new FloatSetting("sb_sponsor_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_SELF_PROMO_OPACITY = new FloatSetting("sb_selfpromo_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_INTERACTION_OPACITY = new FloatSetting("sb_interaction_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_HIGHLIGHT_OPACITY = new FloatSetting("sb_highlight_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_HOOK_OPACITY = new FloatSetting("sb_hook_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_INTRO_OPACITY = new FloatSetting("sb_intro_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_OUTRO_OPACITY = new FloatSetting("sb_outro_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_PREVIEW_OPACITY = new FloatSetting("sb_preview_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_FILLER_OPACITY = new FloatSetting("sb_filler_opacity", 0.8f, false, false);
|
||||
public static final FloatSetting DEPRECATED_SB_CATEGORY_MUSIC_OFFTOPIC_OPACITY = new FloatSetting("sb_music_offtopic_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_SPONSOR_OPACITY = new FloatSetting("sb_sponsor_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_SELF_PROMO_OPACITY = new FloatSetting("sb_selfpromo_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_INTERACTION_OPACITY = new FloatSetting("sb_interaction_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_HIGHLIGHT_OPACITY = new FloatSetting("sb_highlight_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_HOOK_OPACITY = new FloatSetting("sb_hook_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_INTRO_OPACITY = new FloatSetting("sb_intro_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_OUTRO_OPACITY = new FloatSetting("sb_outro_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_PREVIEW_OPACITY = new FloatSetting("sb_preview_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_FILLER_OPACITY = new FloatSetting("sb_filler_opacity", 0.8f, false, false);
|
||||
private static final FloatSetting DEPRECATED_SB_CATEGORY_MUSIC_OFFTOPIC_OPACITY = new FloatSetting("sb_music_offtopic_opacity", 0.8f, false, false);
|
||||
|
||||
static {
|
||||
// region Migration
|
||||
|
||||
migrateOldSettingToNew(DEPRECATED_AUTO_REPEAT, LOOP_VIDEO);
|
||||
migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_BUTTONS, HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS);
|
||||
migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER, HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER);
|
||||
migrateOldSettingToNew(DEPRECATED_DISABLE_SUGGESTED_VIDEO_END_SCREEN, HIDE_END_SCREEN_SUGGESTED_VIDEO);
|
||||
|
||||
@@ -152,7 +152,7 @@ public class YouTubeActivityHook extends BaseActivityHook {
|
||||
* @return if the original activity finish method should be allowed to run.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public static boolean handleFinish() {
|
||||
public static boolean handleBackPress() {
|
||||
return YouTubeSearchViewController.handleFinish(searchViewController);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class SponsorBlockUtils {
|
||||
SegmentCategory[] categories = SegmentCategory.categoriesWithoutHighlights();
|
||||
CharSequence[] titles = new CharSequence[categories.length];
|
||||
for (int i = 0, length = categories.length; i < length; i++) {
|
||||
titles[i] = categories[i].getTitle().toString();
|
||||
titles[i] = categories[i].getTitleWithColorDot();
|
||||
}
|
||||
|
||||
newUserCreatedSegmentCategory = null;
|
||||
@@ -302,7 +302,7 @@ public class SponsorBlockUtils {
|
||||
|
||||
SpannableStringBuilder spannableBuilder = new SpannableStringBuilder();
|
||||
|
||||
spannableBuilder.append(segment.category.getTitle().toString());
|
||||
spannableBuilder.append(segment.category.getTitleWithColorDot());
|
||||
spannableBuilder.append('\n');
|
||||
|
||||
String startTime = formatSegmentTime(segment.start);
|
||||
@@ -336,8 +336,8 @@ public class SponsorBlockUtils {
|
||||
Utils.verifyOnMainThread();
|
||||
final SegmentCategory[] values = SegmentCategory.categoriesWithoutHighlights();
|
||||
CharSequence[] titles = new CharSequence[values.length];
|
||||
for (int i = 0, length = values.length; i < length; i++) {
|
||||
titles[i] = values[i].getTitle().toString();
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
titles[i] = values[i].getTitleWithColorDot();
|
||||
}
|
||||
|
||||
new AlertDialog.Builder(context)
|
||||
|
||||
@@ -5,8 +5,12 @@ import static app.revanced.extension.youtube.settings.Settings.*;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.RelativeSizeSpan;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -83,6 +87,8 @@ public enum SegmentCategory {
|
||||
MUSIC_OFFTOPIC,
|
||||
};
|
||||
|
||||
public static final String COLOR_DOT_STRING = "⬤";
|
||||
|
||||
public static final float CATEGORY_DEFAULT_OPACITY = 0.7f;
|
||||
|
||||
private static final Map<String, SegmentCategory> mValuesMap = new HashMap<>(2 * categoriesWithoutUnsubmitted.length);
|
||||
@@ -324,6 +330,32 @@ public enum SegmentCategory {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link SpannableString} that starts with a colored dot followed by the provided text.
|
||||
*/
|
||||
private static SpannableString getCategoryColorDotSpan(String text, @ColorInt int color) {
|
||||
SpannableString dotSpan = new SpannableString(COLOR_DOT_STRING + text);
|
||||
dotSpan.setSpan(new ForegroundColorSpan(color), 0, 1,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
dotSpan.setSpan(new RelativeSizeSpan(1.5f), 0, 1,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
return dotSpan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the category title with a colored dot.
|
||||
*/
|
||||
public SpannableString getTitleWithColorDot(@ColorInt int categoryColor) {
|
||||
return getCategoryColorDotSpan(" " + title, categoryColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the category title with a colored dot.
|
||||
*/
|
||||
public SpannableString getTitleWithColorDot() {
|
||||
return getTitleWithColorDot(color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the skip button text based on segment position.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package app.revanced.extension.youtube.videoplayer;
|
||||
|
||||
import static app.revanced.extension.shared.StringRef.str;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class LoopVideoButton {
|
||||
@Nullable
|
||||
private static PlayerControlButton instance;
|
||||
|
||||
private static final int LOOP_VIDEO_ON = Utils.getResourceIdentifierOrThrow(
|
||||
"revanced_loop_video_button_on", "drawable");
|
||||
private static final int LOOP_VIDEO_OFF = Utils.getResourceIdentifierOrThrow(
|
||||
"revanced_loop_video_button_off", "drawable");
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static void initializeButton(View controlsView) {
|
||||
try {
|
||||
instance = new PlayerControlButton(
|
||||
controlsView,
|
||||
"revanced_loop_video_button",
|
||||
null,
|
||||
Settings.LOOP_VIDEO_BUTTON::get,
|
||||
v -> updateButtonAppearance(),
|
||||
null
|
||||
);
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "initializeButton failure", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* injection point.
|
||||
*/
|
||||
public static void setVisibilityNegatedImmediate() {
|
||||
if (instance != null) instance.setVisibilityNegatedImmediate();
|
||||
}
|
||||
|
||||
/**
|
||||
* injection point.
|
||||
*/
|
||||
public static void setVisibilityImmediate(boolean visible) {
|
||||
if (instance != null) instance.setVisibilityImmediate(visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* injection point.
|
||||
*/
|
||||
public static void setVisibility(boolean visible, boolean animated) {
|
||||
if (instance != null) instance.setVisibility(visible, animated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the button's appearance.
|
||||
*/
|
||||
private static void updateButtonAppearance() {
|
||||
if (instance == null) return;
|
||||
|
||||
try {
|
||||
Utils.verifyOnMainThread();
|
||||
|
||||
final boolean currentState = Settings.LOOP_VIDEO.get();
|
||||
final boolean newState = !currentState;
|
||||
Settings.LOOP_VIDEO.save(newState);
|
||||
|
||||
instance.setIcon(newState
|
||||
? LOOP_VIDEO_ON
|
||||
: LOOP_VIDEO_OFF);
|
||||
Utils.showToastShort(str(newState
|
||||
? "revanced_loop_video_button_toast_on"
|
||||
: "revanced_loop_video_button_toast_off"));
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "updateButtonAppearance failure", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
||||
org.gradle.parallel = true
|
||||
android.useAndroidX = true
|
||||
kotlin.code.style = official
|
||||
version = 5.41.0-dev.2
|
||||
version = 5.42.0-dev.7
|
||||
|
||||
@@ -284,6 +284,10 @@ public final class app/revanced/patches/instagram/misc/extension/SharedExtension
|
||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/instagram/misc/links/OpenLinksExternallyPatchKt {
|
||||
public static final fun getOpenLinksExternallyPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/instagram/misc/signature/SignatureCheckPatchKt {
|
||||
public static final fun getSignatureCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -372,6 +376,10 @@ public final class app/revanced/patches/music/interaction/permanentshuffle/Perma
|
||||
public static final fun getPermanentShufflePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/layout/branding/CustomBrandingPatchKt {
|
||||
public static final fun getCustomBrandingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/layout/castbutton/HideCastButtonKt {
|
||||
public static final fun getHideCastButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -388,6 +396,10 @@ public final class app/revanced/patches/music/layout/premium/HideGetPremiumPatch
|
||||
public static final fun getHideGetPremiumPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/layout/theme/ThemePatchKt {
|
||||
public static final fun getThemePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/layout/upgradebutton/HideUpgradeButtonPatchKt {
|
||||
public static final fun getHideUpgradeButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
public static final fun getRemoveUpgradeButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
@@ -405,6 +417,10 @@ public final class app/revanced/patches/music/misc/debugging/EnableDebuggingPatc
|
||||
public static final fun getEnableDebuggingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/misc/dns/CheckWatchHistoryDomainNameResolutionPatchKt {
|
||||
public static final fun getCheckWatchHistoryDomainNameResolutionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/music/misc/extension/SharedExtensionPatchKt {
|
||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -729,6 +745,11 @@ public final class app/revanced/patches/serviceportalbund/detection/root/RootDet
|
||||
public static final fun getRootDetectionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/shared/layout/theme/LithoColorHookPatchKt {
|
||||
public static final fun getLithoColorHookPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
public static final fun getLithoColorOverrideHook ()Lkotlin/jvm/functions/Function2;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatchKt {
|
||||
public static final fun checkEnvironmentPatch (Lapp/revanced/patcher/Fingerprint;Lapp/revanced/patcher/patch/Patch;[Ljava/lang/String;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -1169,6 +1190,10 @@ public final class app/revanced/patches/tumblr/annoyances/popups/DisableGiftMess
|
||||
public static final fun getDisableGiftMessagePopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/tumblr/annoyances/tv/DisableTumblrTvPatchKt {
|
||||
public static final fun getDisableTumblrTvPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/tumblr/featureflags/OverrideFeatureFlagsPatchKt {
|
||||
public static final fun getOverrideFeatureFlagsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -1289,6 +1314,10 @@ public final class app/revanced/patches/viber/ads/HideAdsPatchKt {
|
||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/viber/misc/navbar/HideNavigationButtonsKt {
|
||||
public static final fun getHideNavigationButtonsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/vsco/misc/pro/UnlockProPatchKt {
|
||||
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
@@ -1390,8 +1419,8 @@ public final class app/revanced/patches/youtube/layout/formfactor/ChangeFormFact
|
||||
public static final fun getChangeFormFactorPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatchKt {
|
||||
public static final fun getHideEndscreenCardsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
public final class app/revanced/patches/youtube/layout/hide/endscreencards/HideEndScreenCardsPatchKt {
|
||||
public static final fun getHideEndScreenCardsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatchKt {
|
||||
@@ -1610,6 +1639,10 @@ public final class app/revanced/patches/youtube/misc/litho/filter/LithoFilterPat
|
||||
public static final fun getLithoFilterPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/misc/loopvideo/LoopVideoPatchKt {
|
||||
public static final fun getLoopVideoPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/misc/navigation/NavigationBarHookPatchKt {
|
||||
public static field hookNavigationButtonCreated Lkotlin/jvm/functions/Function1;
|
||||
public static final fun getHookNavigationButtonCreated ()Lkotlin/jvm/functions/Function1;
|
||||
@@ -1715,6 +1748,10 @@ public final class app/revanced/patches/youtube/video/audio/ForceOriginalAudioPa
|
||||
public static final fun getForceOriginalAudioPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/video/codecs/DisableVideoCodecsPatchKt {
|
||||
public static final fun getDisableVideoCodecsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/youtube/video/hdr/DisableHdrPatchKt {
|
||||
public static final fun getDisableHdrPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
@@ -2,28 +2,22 @@
|
||||
package app.revanced.patches.instagram.hide.navigation
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val tabCreateButtonsLoopStartFingerprint = fingerprint {
|
||||
returns("V")
|
||||
strings("InstagramMainActivity.createTabButtons")
|
||||
opcodes(
|
||||
//Loop Start
|
||||
Opcode.IF_GE, // Check if index is finished (index, size)
|
||||
//Injection
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
)
|
||||
internal val initializeNavigationButtonsListFingerprint = fingerprint {
|
||||
strings("Nav3")
|
||||
parameters("Lcom/instagram/common/session/UserSession;", "Z")
|
||||
returns("Ljava/util/List;")
|
||||
}
|
||||
|
||||
internal val tabCreateButtonsLoopEndFingerprint = fingerprint {
|
||||
returns("V")
|
||||
strings("InstagramMainActivity.createTabButtons")
|
||||
opcodes(
|
||||
Opcode.IPUT_OBJECT,
|
||||
// Injection Jump
|
||||
Opcode.ADD_INT_LIT8, //Increase Index
|
||||
Opcode.GOTO // Jump to loopStart
|
||||
// LoopEnd
|
||||
)
|
||||
private val navigationButtonsEnumClassDef = fingerprint {
|
||||
strings("FEED", "fragment_feed", "SEARCH", "fragment_search")
|
||||
}
|
||||
|
||||
context(BytecodePatchContext)
|
||||
internal val navigationButtonsEnumInitFingerprint get() = fingerprint {
|
||||
custom { method, classDef ->
|
||||
method.name == "<init>"
|
||||
&& classDef == navigationButtonsEnumClassDef.classDef
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
package app.revanced.patches.instagram.hide.navigation
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.booleanOption
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.util.addInstructionsAtControlFlowLabel
|
||||
import app.revanced.util.findFreeRegister
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
import java.util.logging.Logger
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/instagram/hide/navigation/HideNavigationButtonsPatch;"
|
||||
|
||||
@Suppress("unused")
|
||||
val hideNavigationButtonsPatch = bytecodePatch(
|
||||
name = "Hide navigation buttons",
|
||||
description = "Hides navigation bar buttons, such as the Reels and Create button.",
|
||||
use = false
|
||||
) {
|
||||
compatibleWith("com.instagram.android"("397.1.0.52.81"))
|
||||
compatibleWith("com.instagram.android")
|
||||
|
||||
dependsOn(sharedExtensionPatch)
|
||||
|
||||
val hideReels by booleanOption(
|
||||
key = "hideReels",
|
||||
@@ -38,43 +48,46 @@ val hideNavigationButtonsPatch = bytecodePatch(
|
||||
)
|
||||
}
|
||||
|
||||
tabCreateButtonsLoopStartFingerprint.method.apply {
|
||||
// Check the current loop index, and skip over adding the
|
||||
// navigation button view if the index matches a given button.
|
||||
val enumNameField: String
|
||||
|
||||
val startIndex = tabCreateButtonsLoopStartFingerprint.patternMatch!!.startIndex
|
||||
val endIndex = tabCreateButtonsLoopEndFingerprint.patternMatch!!.endIndex
|
||||
val insertIndex = startIndex + 1
|
||||
val loopIndexRegister = getInstruction<TwoRegisterInstruction>(startIndex).registerA
|
||||
val freeRegister = findFreeRegister(insertIndex, loopIndexRegister)
|
||||
val instruction = getInstruction(endIndex - 1)
|
||||
// Get the field name which contains the name of the enum for the navigation button ("fragment_clips", "fragment_share", ...)
|
||||
with(navigationButtonsEnumInitFingerprint.method) {
|
||||
enumNameField = indexOfFirstInstructionOrThrow {
|
||||
opcode == Opcode.IPUT_OBJECT &&
|
||||
(this as TwoRegisterInstruction).registerA == 2 // The p2 register
|
||||
}.let {
|
||||
getInstruction(it).getReference<FieldReference>()!!.name
|
||||
}
|
||||
}
|
||||
|
||||
val instructions = buildString {
|
||||
if (hideCreate!!) {
|
||||
appendLine(
|
||||
initializeNavigationButtonsListFingerprint.method.apply {
|
||||
val returnIndex = indexOfFirstInstructionOrThrow(Opcode.RETURN_OBJECT)
|
||||
val buttonsListRegister = getInstruction<OneRegisterInstruction>(returnIndex).registerA
|
||||
val freeRegister = findFreeRegister(returnIndex)
|
||||
val freeRegister2 = findFreeRegister(returnIndex, freeRegister)
|
||||
|
||||
fun instructionsRemoveButtonByName(buttonEnumName: String): String {
|
||||
return """
|
||||
const-string v$freeRegister, "$buttonEnumName"
|
||||
const-string v$freeRegister2, "$enumNameField"
|
||||
invoke-static { v$buttonsListRegister, v$freeRegister, v$freeRegister2 }, $EXTENSION_CLASS_DESCRIPTOR->removeNavigationButtonByName(Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
|
||||
move-result-object v$buttonsListRegister
|
||||
"""
|
||||
const v$freeRegister, 0x2
|
||||
if-eq v$freeRegister, v$loopIndexRegister, :skipAddView
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
if (hideReels!!) {
|
||||
appendLine(
|
||||
"""
|
||||
const v$freeRegister, 0x3
|
||||
if-eq v$freeRegister, v$loopIndexRegister, :skipAddView
|
||||
"""
|
||||
addInstructionsAtControlFlowLabel(
|
||||
returnIndex,
|
||||
instructionsRemoveButtonByName("fragment_clips")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
instructions,
|
||||
ExternalLabel("skipAddView", instruction)
|
||||
if (hideCreate!!) {
|
||||
addInstructionsAtControlFlowLabel(
|
||||
returnIndex,
|
||||
instructionsRemoveButtonByName("fragment_share")
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.instagram.misc.links
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal const val TARGET_STRING = "Tracking.ARG_CLICK_SOURCE"
|
||||
|
||||
internal val inAppBrowserFunctionFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
strings("TrackingInfo.ARG_MODULE_NAME", TARGET_STRING)
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.instagram.misc.links
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/misc/links/OpenLinksExternallyPatch;"
|
||||
|
||||
@Suppress("unused")
|
||||
val openLinksExternallyPatch = bytecodePatch(
|
||||
name = "Open links externally",
|
||||
description = "Changes links to always open in your external browser, instead of the in-app browser.",
|
||||
use = false,
|
||||
) {
|
||||
|
||||
dependsOn(sharedExtensionPatch)
|
||||
|
||||
compatibleWith("com.instagram.android")
|
||||
|
||||
execute {
|
||||
inAppBrowserFunctionFingerprint.let {
|
||||
val stringMatchIndex = it.stringMatches?.first { match -> match.string == TARGET_STRING }!!.index
|
||||
|
||||
it.method.apply {
|
||||
val urlResultObjIndex = indexOfFirstInstructionOrThrow(
|
||||
stringMatchIndex, Opcode.MOVE_OBJECT_FROM16
|
||||
)
|
||||
|
||||
// Register that contains the url after moving from a higher register.
|
||||
val urlRegister = getInstruction<TwoRegisterInstruction>(urlResultObjIndex).registerA
|
||||
|
||||
addInstructions(
|
||||
urlResultObjIndex + 1,
|
||||
"""
|
||||
invoke-static { v$urlRegister }, $EXTENSION_CLASS_DESCRIPTOR->openExternally(Ljava/lang/String;)Z
|
||||
move-result v$urlRegister
|
||||
return v$urlRegister
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package app.revanced.patches.music.layout.branding
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.layout.branding.baseCustomBrandingPatch
|
||||
import app.revanced.patches.shared.misc.mapping.get
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.indexOfFirstInstructionReversed
|
||||
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
private val disableSplashAnimationPatch = bytecodePatch {
|
||||
|
||||
dependsOn(resourceMappingPatch)
|
||||
|
||||
execute {
|
||||
// The existing YT animation usually only shows for a fraction of a second,
|
||||
// and the existing animation does not match the new splash screen
|
||||
// causing the original YT Music logo to momentarily flash on screen as the animation starts.
|
||||
//
|
||||
// Could replace the lottie animation file with our own custom animation (app_launch.json),
|
||||
// but the animation is not always the same size as the launch screen and it's still
|
||||
// barely shown. Instead turn off the animation entirely (app will also launch a little faster).
|
||||
cairoSplashAnimationConfigFingerprint.method.apply {
|
||||
val mainActivityLaunchAnimation = resourceMappings["layout", "main_activity_launch_animation"]
|
||||
val literalIndex = indexOfFirstLiteralInstructionOrThrow(
|
||||
mainActivityLaunchAnimation
|
||||
)
|
||||
val insertIndex = indexOfFirstInstructionReversed(literalIndex) {
|
||||
this.opcode == Opcode.INVOKE_VIRTUAL &&
|
||||
getReference<MethodReference>()?.name == "setContentView"
|
||||
} + 1
|
||||
val jumpIndex = indexOfFirstInstructionOrThrow(insertIndex) {
|
||||
opcode == Opcode.INVOKE_VIRTUAL &&
|
||||
getReference<MethodReference>()?.parameterTypes?.firstOrNull() == "Ljava/lang/Runnable;"
|
||||
} + 1
|
||||
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
"goto :skip_animation",
|
||||
ExternalLabel("skip_animation", getInstruction(jumpIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const val APP_NAME = "YT Music ReVanced"
|
||||
|
||||
@Suppress("unused")
|
||||
val customBrandingPatch = baseCustomBrandingPatch(
|
||||
defaultAppName = APP_NAME,
|
||||
appNameValues = mapOf(
|
||||
"YT Music ReVanced" to APP_NAME,
|
||||
"Music ReVanced" to "Music ReVanced",
|
||||
"Music" to "Music",
|
||||
"YT Music" to "YT Music",
|
||||
),
|
||||
resourceFolder = "custom-branding/music",
|
||||
iconResourceFileNames = arrayOf(
|
||||
"adaptiveproduct_youtube_music_2024_q4_background_color_108",
|
||||
"adaptiveproduct_youtube_music_2024_q4_foreground_color_108",
|
||||
"ic_launcher_release",
|
||||
),
|
||||
|
||||
block = {
|
||||
dependsOn(disableSplashAnimationPatch)
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.apps.youtube.music"(
|
||||
"7.29.52",
|
||||
"8.10.52"
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.patches.music.layout.branding
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
|
||||
internal val cairoSplashAnimationConfigFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Landroid/os/Bundle;")
|
||||
custom { method, classDef ->
|
||||
method.name == "onCreate" && method.definingClass == YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,9 @@ import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.music.misc.settings.PreferenceScreen
|
||||
import app.revanced.patches.music.misc.settings.settingsPatch
|
||||
import app.revanced.patches.shared.misc.mapping.get
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
||||
@@ -29,6 +32,7 @@ val hideCastButton = bytecodePatch(
|
||||
sharedExtensionPatch,
|
||||
settingsPatch,
|
||||
addResourcesPatch,
|
||||
resourceMappingPatch
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
@@ -39,6 +43,8 @@ val hideCastButton = bytecodePatch(
|
||||
)
|
||||
|
||||
execute {
|
||||
playerOverlayChip = resourceMappings["id", "player_overlay_chip"]
|
||||
|
||||
addResources("music", "layout.castbutton.hideCastButton")
|
||||
|
||||
PreferenceScreen.GENERAL.addPreferences(
|
||||
@@ -59,7 +65,7 @@ val hideCastButton = bytecodePatch(
|
||||
|
||||
playerOverlayChipFingerprint.method.apply {
|
||||
val resourceIndex = indexOfFirstLiteralInstructionOrThrow(playerOverlayChip)
|
||||
val targetIndex = indexOfFirstInstructionOrThrow(resourceIndex, Opcode.MOVE_RESULT)
|
||||
val targetIndex = indexOfFirstInstructionOrThrow(resourceIndex, Opcode.MOVE_RESULT_OBJECT)
|
||||
val targetRegister = getInstruction<OneRegisterInstruction>(targetIndex).registerA
|
||||
|
||||
addInstruction(
|
||||
|
||||
@@ -4,6 +4,7 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
@@ -35,7 +36,23 @@ val navigationBarPatch = bytecodePatch(
|
||||
resourceMappingPatch,
|
||||
sharedExtensionPatch,
|
||||
settingsPatch,
|
||||
addResourcesPatch
|
||||
addResourcesPatch,
|
||||
resourcePatch {
|
||||
execute {
|
||||
// Ensure the first ImageView has 'layout_weight' to stay properly sized
|
||||
// when the TextView is hidden.
|
||||
document("res/layout/image_with_text_tab.xml").use { document ->
|
||||
val imageView = document.getElementsByTagName("ImageView").item(0)
|
||||
imageView?.let {
|
||||
if (it.attributes.getNamedItem("android:layout_weight") == null) {
|
||||
val attr = document.createAttribute("android:layout_weight")
|
||||
attr.value = "0.5"
|
||||
it.attributes.setNamedItem(attr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
@@ -46,10 +63,7 @@ val navigationBarPatch = bytecodePatch(
|
||||
)
|
||||
|
||||
execute {
|
||||
text1 = resourceMappings[
|
||||
"id",
|
||||
"text1",
|
||||
]
|
||||
text1 = resourceMappings["id", "text1"]
|
||||
|
||||
addResources("music", "layout.navigationbar.navigationBarPatch")
|
||||
|
||||
@@ -71,9 +85,7 @@ val navigationBarPatch = bytecodePatch(
|
||||
)
|
||||
|
||||
tabLayoutTextFingerprint.method.apply {
|
||||
/**
|
||||
* Hide navigation labels.
|
||||
*/
|
||||
// Hide navigation labels.
|
||||
val constIndex = indexOfFirstLiteralInstructionOrThrow(text1)
|
||||
val targetIndex = indexOfFirstInstructionOrThrow(constIndex, Opcode.CHECK_CAST)
|
||||
val targetParameter = getInstruction<ReferenceInstruction>(targetIndex).reference
|
||||
@@ -87,9 +99,7 @@ val navigationBarPatch = bytecodePatch(
|
||||
"invoke-static { v$targetRegister }, $EXTENSION_CLASS_DESCRIPTOR->hideNavigationLabel(Landroid/widget/TextView;)V"
|
||||
)
|
||||
|
||||
/**
|
||||
* Set navigation enum and hide navigation buttons.
|
||||
*/
|
||||
// Set navigation enum and hide navigation buttons.
|
||||
val enumIndex = tabLayoutTextFingerprint.patternMatch!!.startIndex + 3
|
||||
val enumRegister = getInstruction<OneRegisterInstruction>(enumIndex).registerA
|
||||
val insertEnumIndex = indexOfFirstInstructionOrThrow(Opcode.AND_INT_LIT8) - 2
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package app.revanced.patches.music.layout.theme
|
||||
|
||||
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.shared.layout.theme.THEME_DEFAULT_DARK_COLOR_NAMES
|
||||
import app.revanced.patches.shared.layout.theme.baseThemePatch
|
||||
import app.revanced.patches.shared.layout.theme.baseThemeResourcePatch
|
||||
import app.revanced.patches.shared.layout.theme.darkThemeBackgroundColorOption
|
||||
import app.revanced.patches.shared.misc.settings.overrideThemeColors
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/theme/ThemePatch;"
|
||||
|
||||
@Suppress("unused")
|
||||
val themePatch = baseThemePatch(
|
||||
extensionClassDescriptor = EXTENSION_CLASS_DESCRIPTOR,
|
||||
|
||||
block = {
|
||||
dependsOn(
|
||||
sharedExtensionPatch,
|
||||
baseThemeResourcePatch(
|
||||
darkColorNames = THEME_DEFAULT_DARK_COLOR_NAMES + setOf(
|
||||
"yt_black_pure",
|
||||
"yt_black_pure_opacity80",
|
||||
"ytm_color_grey_12",
|
||||
"material_grey_800"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.apps.youtube.music"(
|
||||
"7.29.52",
|
||||
"8.10.52"
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
executeBlock = {
|
||||
overrideThemeColors(
|
||||
null,
|
||||
darkThemeBackgroundColorOption.value!!
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.patches.music.misc.dns
|
||||
|
||||
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.music.shared.mainActivityOnCreateFingerprint
|
||||
import app.revanced.patches.shared.misc.dns.checkWatchHistoryDomainNameResolutionPatch
|
||||
|
||||
val checkWatchHistoryDomainNameResolutionPatch = checkWatchHistoryDomainNameResolutionPatch(
|
||||
block = {
|
||||
dependsOn(
|
||||
sharedExtensionPatch
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.apps.youtube.music"(
|
||||
"7.29.52",
|
||||
"8.10.52"
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
mainActivityFingerprint = mainActivityOnCreateFingerprint
|
||||
)
|
||||
@@ -1,9 +1,10 @@
|
||||
package app.revanced.patches.music.misc.extension
|
||||
|
||||
import app.revanced.patches.music.misc.extension.hooks.applicationInitHook
|
||||
import app.revanced.patches.music.misc.extension.hooks.applicationInitOnCreateHook
|
||||
import app.revanced.patches.shared.misc.extension.sharedExtensionPatch
|
||||
|
||||
val sharedExtensionPatch = sharedExtensionPatch(
|
||||
"music",
|
||||
applicationInitHook,
|
||||
applicationInitHook, applicationInitOnCreateHook
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.music.misc.extension.hooks
|
||||
|
||||
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||
|
||||
internal val applicationInitHook = extensionHook {
|
||||
@@ -8,3 +9,11 @@ internal val applicationInitHook = extensionHook {
|
||||
strings("activity")
|
||||
custom { method, _ -> method.name == "onCreate" }
|
||||
}
|
||||
|
||||
internal val applicationInitOnCreateHook = extensionHook {
|
||||
returns("V")
|
||||
parameters("Landroid/os/Bundle;")
|
||||
custom { method, classDef ->
|
||||
method.name == "onCreate" && classDef.type == YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package app.revanced.patches.music.misc.fileprovider
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.all.misc.packagename.setOrGetFallbackPackageName
|
||||
import app.revanced.patches.music.utils.fix.fileprovider.fileProviderResolverFingerprint
|
||||
|
||||
internal fun fileProviderPatch(
|
||||
youtubePackageName: String,
|
||||
musicPackageName: String
|
||||
) = bytecodePatch(
|
||||
description = "Fixes broken YouTube Music file provider that prevents sharing with specific apps such as Instagram."
|
||||
) {
|
||||
finalize {
|
||||
// Must do modification last, so change package name value is correctly set.
|
||||
val musicChangedPackageName = setOrGetFallbackPackageName(musicPackageName)
|
||||
|
||||
// For some reason, if the app gets "android.support.FILE_PROVIDER_PATHS",
|
||||
// the package name of YouTube is used, not the package name of the YT Music.
|
||||
//
|
||||
// There is no issue in the stock YT Music, but this is an issue in the GmsCore Build.
|
||||
// https://github.com/ReVanced/revanced-patches/issues/55
|
||||
//
|
||||
// To solve this issue, replace the package name of YouTube with YT Music's package name.
|
||||
fileProviderResolverFingerprint.method.addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
const-string v0, "com.google.android.youtube.fileprovider"
|
||||
invoke-static { p1, v0 }, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
||||
move-result v0
|
||||
if-nez v0, :fix
|
||||
const-string v0, "$youtubePackageName.fileprovider"
|
||||
invoke-static { p1, v0 }, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
||||
move-result v0
|
||||
if-nez v0, :fix
|
||||
goto :ignore
|
||||
:fix
|
||||
const-string p1, "$musicChangedPackageName.fileprovider"
|
||||
:ignore
|
||||
nop
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package app.revanced.patches.music.utils.fix.fileprovider
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val fileProviderResolverFingerprint = fingerprint {
|
||||
returns("L")
|
||||
strings(
|
||||
"android.support.FILE_PROVIDER_PATHS",
|
||||
"Name must not be empty"
|
||||
)
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import app.revanced.patches.music.misc.gms.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.music.misc.settings.PreferenceScreen
|
||||
import app.revanced.patches.music.misc.settings.settingsPatch
|
||||
import app.revanced.patches.music.misc.spoof.spoofVideoStreamsPatch
|
||||
import app.revanced.patches.music.misc.fileprovider.fileProviderPatch
|
||||
import app.revanced.patches.shared.castContextFetchFingerprint
|
||||
import app.revanced.patches.shared.misc.gms.gmsCoreSupportPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.IntentPreference
|
||||
@@ -28,7 +29,12 @@ val gmsCoreSupportPatch = gmsCoreSupportPatch(
|
||||
) {
|
||||
dependsOn(spoofVideoStreamsPatch)
|
||||
|
||||
compatibleWith(MUSIC_PACKAGE_NAME)
|
||||
compatibleWith(
|
||||
MUSIC_PACKAGE_NAME(
|
||||
"7.29.52",
|
||||
"8.10.52"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun gmsCoreSupportResourcePatch(
|
||||
@@ -55,6 +61,10 @@ private fun gmsCoreSupportResourcePatch(
|
||||
) {
|
||||
dependsOn(
|
||||
addResourcesPatch,
|
||||
settingsPatch
|
||||
settingsPatch,
|
||||
fileProviderPatch(
|
||||
MUSIC_PACKAGE_NAME,
|
||||
REVANCED_MUSIC_PACKAGE_NAME
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import app.revanced.patches.all.misc.packagename.setOrGetFallbackPackageName
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.music.misc.gms.Constants.MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.BasePreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.BasePreferenceScreen
|
||||
@@ -42,6 +43,8 @@ private val settingsResourcePatch = resourcePatch {
|
||||
|
||||
execute {
|
||||
|
||||
// Set the style for the ReVanced settings to follow the style of the music settings,
|
||||
// namely: action bar height, menu item padding and remove horizontal dividers.
|
||||
val targetResource = "values/styles.xml"
|
||||
inputStreamFromBundledResource(
|
||||
"settings/music",
|
||||
@@ -53,7 +56,7 @@ private val settingsResourcePatch = resourcePatch {
|
||||
).close()
|
||||
}
|
||||
|
||||
// Remove horizontal divider from the settings Preferences.
|
||||
// Remove horizontal dividers from the music settings.
|
||||
val styleFile = get("res/values/styles.xml")
|
||||
styleFile.writeText(
|
||||
styleFile.readText()
|
||||
@@ -106,7 +109,8 @@ val settingsPatch = bytecodePatch(
|
||||
modifyActivityForSettingsInjection(
|
||||
googleApiActivityFingerprint.classDef,
|
||||
googleApiActivityFingerprint.method,
|
||||
GOOGLE_API_ACTIVITY_HOOK_CLASS_DESCRIPTOR
|
||||
GOOGLE_API_ACTIVITY_HOOK_CLASS_DESCRIPTOR,
|
||||
true
|
||||
)
|
||||
}
|
||||
|
||||
@@ -123,7 +127,7 @@ fun newIntent(settingsName: String) = IntentPreference.Intent(
|
||||
targetClass = "com.google.android.gms.common.api.GoogleApiActivity"
|
||||
) {
|
||||
// The package name change has to be reflected in the intent.
|
||||
setOrGetFallbackPackageName("com.google.android.apps.youtube.music")
|
||||
setOrGetFallbackPackageName(MUSIC_PACKAGE_NAME)
|
||||
}
|
||||
|
||||
object PreferenceScreen : BasePreferenceScreen() {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.music.shared
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal const val YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE = "Lcom/google/android/apps/youtube/music/activities/MusicActivity;"
|
||||
|
||||
internal val mainActivityOnCreateFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Landroid/os/Bundle;")
|
||||
custom { method, classDef ->
|
||||
method.name == "onCreate" && classDef.type == YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package app.revanced.patches.shared.layout.branding
|
||||
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.ResourcePatchBuilder
|
||||
import app.revanced.patcher.patch.ResourcePatchContext
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.Utils.trimIndentMultiline
|
||||
import app.revanced.util.copyResources
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
import java.util.logging.Logger
|
||||
|
||||
private const val REVANCED_ICON = "ReVanced*Logo" // Can never be a valid path.
|
||||
|
||||
internal val mipmapDirectories = arrayOf(
|
||||
"xxxhdpi",
|
||||
"xxhdpi",
|
||||
"xhdpi",
|
||||
"hdpi",
|
||||
"mdpi",
|
||||
).map { "mipmap-$it" }.toTypedArray()
|
||||
|
||||
private fun formatResourceFileList(resourceNames: Array<String>) = resourceNames.joinToString("\n") { "- $it" }
|
||||
|
||||
/**
|
||||
* Attempts to fix unescaped and invalid characters not allowed for an Android app name.
|
||||
*/
|
||||
private fun escapeAppName(name: String): String? {
|
||||
// Remove ASCII control characters.
|
||||
val cleanedName = name.filter { it.code >= 32 }
|
||||
|
||||
// Replace invalid XML characters with escaped equivalents.
|
||||
val escapedName = cleanedName
|
||||
.replace("&", "&") // Must be first to avoid double-escaping.
|
||||
.replace("<", "<")
|
||||
.replace(">", ">")
|
||||
.replace(Regex("(?<!&)\""), """)
|
||||
|
||||
// Trim empty spacing.
|
||||
val trimmed = escapedName.trim()
|
||||
|
||||
return trimmed.ifBlank { null }
|
||||
}
|
||||
|
||||
/**
|
||||
* Shared custom branding patch for YouTube and YT Music.
|
||||
*/
|
||||
internal fun baseCustomBrandingPatch(
|
||||
defaultAppName: String,
|
||||
appNameValues: Map<String, String>,
|
||||
resourceFolder: String,
|
||||
iconResourceFileNames: Array<String>,
|
||||
block: ResourcePatchBuilder.() -> Unit = {},
|
||||
executeBlock: ResourcePatchContext.() -> Unit = {}
|
||||
): ResourcePatch = resourcePatch(
|
||||
name = "Custom branding",
|
||||
description = "Applies a custom app name and icon. Defaults to \"$defaultAppName\" and the ReVanced logo.",
|
||||
use = false,
|
||||
) {
|
||||
val iconResourceFileNamesPng = iconResourceFileNames.map { "$it.png" }.toTypedArray<String>()
|
||||
|
||||
val appName by stringOption(
|
||||
key = "appName",
|
||||
default = defaultAppName,
|
||||
values = appNameValues,
|
||||
title = "App name",
|
||||
description = "The name of the app.",
|
||||
)
|
||||
|
||||
val iconPath by stringOption(
|
||||
key = "iconPath",
|
||||
default = REVANCED_ICON,
|
||||
values = mapOf("ReVanced Logo" to REVANCED_ICON),
|
||||
title = "App icon",
|
||||
description = """
|
||||
The icon to apply to the app.
|
||||
|
||||
If a path to a folder is provided, the folder must contain the following folders:
|
||||
|
||||
${formatResourceFileList(mipmapDirectories)}
|
||||
|
||||
Each of these folders must contain the following files:
|
||||
|
||||
${formatResourceFileList(iconResourceFileNamesPng)}
|
||||
""".trimIndentMultiline(),
|
||||
)
|
||||
|
||||
block()
|
||||
|
||||
execute {
|
||||
// Change the app icon and launch screen.
|
||||
val iconResourceGroups = mipmapDirectories.map { directory ->
|
||||
ResourceGroup(
|
||||
directory,
|
||||
*iconResourceFileNamesPng,
|
||||
)
|
||||
}
|
||||
|
||||
val iconPathTrimmed = iconPath!!.trim()
|
||||
if (iconPathTrimmed == REVANCED_ICON) {
|
||||
iconResourceGroups.forEach {
|
||||
copyResources(resourceFolder, it)
|
||||
}
|
||||
} else {
|
||||
val filePath = File(iconPathTrimmed)
|
||||
val resourceDirectory = get("res")
|
||||
|
||||
iconResourceGroups.forEach { group ->
|
||||
val fromDirectory = filePath.resolve(group.resourceDirectoryName)
|
||||
val toDirectory = resourceDirectory.resolve(group.resourceDirectoryName)
|
||||
|
||||
group.resources.forEach { iconFileName ->
|
||||
Files.write(
|
||||
toDirectory.resolve(iconFileName).toPath(),
|
||||
fromDirectory.resolve(iconFileName).readBytes(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Change the app name.
|
||||
escapeAppName(appName!!)?.let { escapedAppName ->
|
||||
val newValue = "android:label=\"$escapedAppName\""
|
||||
|
||||
val manifest = get("AndroidManifest.xml")
|
||||
val original = manifest.readText()
|
||||
val replacement = original
|
||||
// YouTube
|
||||
.replace("android:label=\"@string/application_name\"", newValue)
|
||||
// YT Music
|
||||
.replace("android:label=\"@string/app_launcher_name\"", newValue)
|
||||
|
||||
if (original == replacement) {
|
||||
Logger.getLogger(this::class.java.name).warning(
|
||||
"Could not replace manifest app name"
|
||||
)
|
||||
}
|
||||
|
||||
manifest.writeText(replacement)
|
||||
}
|
||||
|
||||
executeBlock() // Must be after the main code to rename the new icons for YouTube 19.34+.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package app.revanced.patches.shared.layout.theme
|
||||
|
||||
import app.revanced.patcher.patch.BytecodePatchBuilder
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.util.childElementsSequence
|
||||
import java.util.Locale
|
||||
|
||||
internal const val THEME_COLOR_OPTION_DESCRIPTION = "Can be a hex color (#RRGGBB) or a color resource reference."
|
||||
|
||||
internal val THEME_DEFAULT_DARK_COLOR_NAMES = setOf(
|
||||
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98",
|
||||
"yt_black2", "yt_black3", "yt_black4", "yt_status_bar_background_dark",
|
||||
"material_grey_850"
|
||||
)
|
||||
|
||||
internal val THEME_DEFAULT_LIGHT_COLOR_NAMES = setOf(
|
||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98",
|
||||
"yt_white2", "yt_white3", "yt_white4"
|
||||
)
|
||||
|
||||
/**
|
||||
* @param colorString #AARRGGBB #RRGGBB, or an Android color resource name.
|
||||
*/
|
||||
internal fun validateColorName(colorString: String): Boolean {
|
||||
if (colorString.startsWith("#")) {
|
||||
// #RRGGBB or #AARRGGBB
|
||||
val hex = colorString.substring(1).uppercase(Locale.US)
|
||||
|
||||
if (hex.length == 8) {
|
||||
// Transparent colors will crash the app.
|
||||
if (hex[0] != 'F' || hex[1] != 'F') {
|
||||
return false
|
||||
}
|
||||
} else if (hex.length != 6) {
|
||||
return false
|
||||
}
|
||||
|
||||
return hex.all { it.isDigit() || it in 'A'..'F' }
|
||||
}
|
||||
|
||||
if (colorString.startsWith("@android:color/")) {
|
||||
// Cannot easily validate Android built-in colors, so assume it's a correct color.
|
||||
return true
|
||||
}
|
||||
|
||||
// Allow any color name, because if it's invalid it will
|
||||
// throw an exception during resource compilation.
|
||||
return colorString.startsWith("@color/")
|
||||
}
|
||||
|
||||
/**
|
||||
* Dark theme color option for YouTube and YT Music Theme patches.
|
||||
*/
|
||||
internal val darkThemeBackgroundColorOption = stringOption(
|
||||
key = "darkThemeBackgroundColor",
|
||||
default = "@android:color/black",
|
||||
values = mapOf(
|
||||
"Pure black" to "@android:color/black",
|
||||
"Material You" to "@android:color/system_neutral1_900",
|
||||
"Classic (old YouTube)" to "#212121",
|
||||
"Catppuccin (Mocha)" to "#181825",
|
||||
"Dark pink" to "#290025",
|
||||
"Dark blue" to "#001029",
|
||||
"Dark green" to "#002905",
|
||||
"Dark yellow" to "#282900",
|
||||
"Dark orange" to "#291800",
|
||||
"Dark red" to "#290000",
|
||||
),
|
||||
title = "Dark theme background color",
|
||||
description = THEME_COLOR_OPTION_DESCRIPTION
|
||||
)
|
||||
|
||||
/**
|
||||
* Shared theme patch for YouTube and YT Music.
|
||||
*/
|
||||
internal fun baseThemePatch(
|
||||
extensionClassDescriptor: String,
|
||||
block: BytecodePatchBuilder.() -> Unit = {},
|
||||
executeBlock: BytecodePatchContext.() -> Unit = {}
|
||||
) = bytecodePatch(
|
||||
name = "Theme",
|
||||
description = "Adds options for theming and applies a custom background theme " +
|
||||
"(dark background theme defaults to pure black).",
|
||||
) {
|
||||
darkThemeBackgroundColorOption()
|
||||
|
||||
block()
|
||||
|
||||
dependsOn(lithoColorHookPatch)
|
||||
|
||||
execute {
|
||||
executeBlock()
|
||||
|
||||
lithoColorOverrideHook(extensionClassDescriptor, "getValue")
|
||||
}
|
||||
}
|
||||
|
||||
internal fun baseThemeResourcePatch(
|
||||
darkColorNames: Set<String> = THEME_DEFAULT_DARK_COLOR_NAMES,
|
||||
lightColorNames: Set<String> = THEME_DEFAULT_LIGHT_COLOR_NAMES,
|
||||
lightColorReplacement: (() -> String)? = null
|
||||
) = resourcePatch {
|
||||
|
||||
execute {
|
||||
// After patch option validators are fixed https://github.com/ReVanced/revanced-patcher/issues/372
|
||||
// This should changed to a patch option validator.
|
||||
val darkColor by darkThemeBackgroundColorOption
|
||||
if (!validateColorName(darkColor!!)) {
|
||||
throw PatchException("Invalid dark theme color: $darkColor")
|
||||
}
|
||||
|
||||
val lightColor = lightColorReplacement?.invoke()
|
||||
if (lightColor != null && !validateColorName(lightColor)) {
|
||||
throw PatchException("Invalid light theme color: $lightColor")
|
||||
}
|
||||
|
||||
document("res/values/colors.xml").use { document ->
|
||||
val resourcesNode = document.getElementsByTagName("resources").item(0)
|
||||
|
||||
resourcesNode.childElementsSequence().forEach { node ->
|
||||
val name = node.getAttribute("name")
|
||||
when {
|
||||
name in darkColorNames -> node.textContent = darkColor
|
||||
lightColor != null && name in lightColorNames -> node.textContent = lightColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package app.revanced.patches.shared.layout.theme
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val lithoOnBoundsChangeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/graphics/Rect;")
|
||||
opcodes(
|
||||
Opcode.IGET,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID,
|
||||
)
|
||||
custom { method, _ ->
|
||||
method.name == "onBoundsChange"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package app.revanced.patches.shared.layout.theme
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
|
||||
lateinit var lithoColorOverrideHook: (targetMethodClass: String, targetMethodName: String) -> Unit
|
||||
private set
|
||||
|
||||
val lithoColorHookPatch = bytecodePatch(
|
||||
description = "Adds a hook to set color of Litho components.",
|
||||
) {
|
||||
|
||||
execute {
|
||||
var insertionIndex = lithoOnBoundsChangeFingerprint.patternMatch!!.endIndex - 1
|
||||
|
||||
lithoColorOverrideHook = { targetMethodClass, targetMethodName ->
|
||||
lithoOnBoundsChangeFingerprint.method.addInstructions(
|
||||
insertionIndex,
|
||||
"""
|
||||
invoke-static { p1 }, $targetMethodClass->$targetMethodName(I)I
|
||||
move-result p1
|
||||
"""
|
||||
)
|
||||
insertionIndex += 2
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package app.revanced.patches.shared.misc.dns
|
||||
|
||||
import app.revanced.patcher.Fingerprint
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatchBuilder
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch;"
|
||||
|
||||
/**
|
||||
* Patch shared with YouTube and YT Music.
|
||||
*/
|
||||
internal fun checkWatchHistoryDomainNameResolutionPatch(
|
||||
block: BytecodePatchBuilder.() -> Unit = {},
|
||||
executeBlock: BytecodePatchContext.() -> Unit = {},
|
||||
mainActivityFingerprint: Fingerprint
|
||||
) = bytecodePatch(
|
||||
name = "Check watch history domain name resolution",
|
||||
description = "Checks if the device DNS server is preventing user watch history from being saved.",
|
||||
) {
|
||||
block()
|
||||
|
||||
execute {
|
||||
executeBlock()
|
||||
|
||||
addResources("shared", "misc.dns.checkWatchHistoryDomainNameResolutionPatch")
|
||||
|
||||
mainActivityFingerprint.method.addInstruction(
|
||||
0,
|
||||
"invoke-static/range { p0 .. p0 }, $EXTENSION_CLASS_DESCRIPTOR->checkDnsResolver(Landroid/app/Activity;)V",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ internal fun sanitizeSharingLinksPatch(
|
||||
replaceMusicLinksWithYouTube: Boolean = false
|
||||
) = bytecodePatch(
|
||||
name = "Sanitize sharing links",
|
||||
description = "Adds an option to remove the tracking parameter from links you share.",
|
||||
description = "Adds an option to remove the tracking query parameter from shared links.",
|
||||
) {
|
||||
block()
|
||||
|
||||
|
||||
@@ -18,32 +18,34 @@ import app.revanced.util.returnEarly
|
||||
import org.w3c.dom.Node
|
||||
|
||||
// TODO: Delete this on next major version bump.
|
||||
@Deprecated("Use non deprecated settings patch function")
|
||||
@Deprecated("Use non deprecated settings patch function",
|
||||
ReplaceWith("settingsPatch(listOf(rootPreference), preferences)")
|
||||
)
|
||||
fun settingsPatch (
|
||||
rootPreference: Pair<IntentPreference, String>,
|
||||
preferences: Set<BasePreference>,
|
||||
) = settingsPatch(listOf(rootPreference), preferences)
|
||||
|
||||
private var themeForegroundColor : String? = null
|
||||
private var themeBackgroundColor : String? = null
|
||||
private var lightThemeColor : String? = null
|
||||
private var darkThemeColor : String? = null
|
||||
|
||||
/**
|
||||
* Sets the default theme colors used in various ReVanced specific settings menus.
|
||||
* By default these colors are white and black, but instead can be set to the
|
||||
* same color the target app uses for it's own settings.
|
||||
*/
|
||||
fun overrideThemeColors(foregroundColor: String, backgroundColor: String) {
|
||||
themeForegroundColor = foregroundColor
|
||||
themeBackgroundColor = backgroundColor
|
||||
fun overrideThemeColors(lightThemeColorString: String?, darkThemeColorString: String) {
|
||||
lightThemeColor = lightThemeColorString
|
||||
darkThemeColor = darkThemeColorString
|
||||
}
|
||||
|
||||
private val settingsColorPatch = bytecodePatch {
|
||||
finalize {
|
||||
if (themeForegroundColor != null) {
|
||||
themeLightColorResourceNameFingerprint.method.returnEarly(themeForegroundColor!!)
|
||||
if (lightThemeColor != null) {
|
||||
themeLightColorResourceNameFingerprint.method.returnEarly(lightThemeColor!!)
|
||||
}
|
||||
if (themeBackgroundColor != null) {
|
||||
themeDarkColorResourceNameFingerprint.method.returnEarly(themeBackgroundColor!!)
|
||||
if (darkThemeColor != null) {
|
||||
themeDarkColorResourceNameFingerprint.method.returnEarly(darkThemeColor!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,8 +71,8 @@ fun settingsPatch (
|
||||
ResourceGroup("drawable",
|
||||
// CustomListPreference resources.
|
||||
"revanced_ic_dialog_alert.xml",
|
||||
// Search resources.
|
||||
"revanced_settings_arrow_time.xml",
|
||||
"revanced_settings_cursor.xml",
|
||||
"revanced_settings_custom_checkmark.xml",
|
||||
"revanced_settings_search_icon.xml",
|
||||
"revanced_settings_search_remove.xml",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package app.revanced.patches.tumblr.annoyances.tv
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.tumblr.featureflags.addFeatureFlagOverride
|
||||
import app.revanced.patches.tumblr.featureflags.overrideFeatureFlagsPatch
|
||||
|
||||
@Suppress("unused")
|
||||
val disableTumblrTvPatch = bytecodePatch(
|
||||
name = "Disable Tumblr TV",
|
||||
description = "Removes the Tumblr TV navigation button from the bottom navigation bar.",
|
||||
) {
|
||||
dependsOn(overrideFeatureFlagsPatch)
|
||||
|
||||
compatibleWith("com.tumblr")
|
||||
|
||||
execute {
|
||||
addFeatureFlagOverride("tumblrTvMobileNav", "false")
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,8 @@ val dynamicColorPatch = resourcePatch(
|
||||
) {
|
||||
compatibleWith(
|
||||
"com.twitter.android"(
|
||||
"10.86.0-release.0",
|
||||
"10.60.0-release.0",
|
||||
"10.48.0-release.0"
|
||||
"10.86.0-release.0",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitter.misc.extension
|
||||
|
||||
import app.revanced.patches.shared.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.twitter.misc.extension.hooks.applicationInitHook
|
||||
|
||||
val sharedExtensionPatch = sharedExtensionPatch("twitter")
|
||||
val sharedExtensionPatch = sharedExtensionPatch("twitter", applicationInitHook)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package app.revanced.patches.twitter.misc.extension.hooks
|
||||
|
||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||
|
||||
internal val applicationInitHook =
|
||||
extensionHook {
|
||||
custom { method, classDef ->
|
||||
classDef.type == "Lcom/twitter/app/TwitterApplication;" && method.name == "onCreate"
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,8 @@ fun hookPatch(
|
||||
|
||||
compatibleWith(
|
||||
"com.twitter.android"(
|
||||
// Only v10.85 uses Pairip and requires additional changes to work.
|
||||
"10.86.0-release.0",
|
||||
// Confirmed to not show reply ads. Slightly newer versions may also work.
|
||||
"10.60.0-release.0",
|
||||
"10.48.0-release.0"
|
||||
"10.86.0-release.0",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
||||
|
||||
compatibleWith(
|
||||
"com.twitter.android"(
|
||||
"10.86.0-release.0",
|
||||
"10.60.0-release.0",
|
||||
"10.48.0-release.0"
|
||||
"10.86.0-release.0",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -54,27 +53,27 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
||||
)
|
||||
|
||||
execute {
|
||||
val replacementIndex =
|
||||
linkSharingDomainFingerprint.stringMatches!!.first().index
|
||||
val domainRegister =
|
||||
linkSharingDomainFingerprint.method.getInstruction<OneRegisterInstruction>(replacementIndex).registerA
|
||||
linkSharingDomainFingerprint.let {
|
||||
val replacementIndex = it.stringMatches!!.first().index
|
||||
val domainRegister = it.method.getInstruction<OneRegisterInstruction>(
|
||||
replacementIndex
|
||||
).registerA
|
||||
|
||||
linkSharingDomainFingerprint.method.replaceInstruction(
|
||||
it.method.replaceInstruction(
|
||||
replacementIndex,
|
||||
"const-string v$domainRegister, \"https://$domainName\"",
|
||||
)
|
||||
}
|
||||
|
||||
// Replace the domain name when copying a link with "Copy link" button.
|
||||
linkBuilderFingerprint.method.apply {
|
||||
addInstructions(
|
||||
linkBuilderFingerprint.method.addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static { p0, p1, p2 }, $EXTENSION_CLASS_DESCRIPTOR->formatLink(JLjava/lang/String;)Ljava/lang/String;
|
||||
move-result-object p0
|
||||
return-object p0
|
||||
""",
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
// Used in the Share via... dialog.
|
||||
linkResourceGetterFingerprint.method.apply {
|
||||
|
||||
@@ -4,12 +4,12 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
|
||||
|
||||
@Deprecated("Patch is obsolete and no longer needed with the highest supported app target. " +
|
||||
"This patch will soon be deleted.")
|
||||
@Suppress("unused")
|
||||
val openLinksWithAppChooserPatch = bytecodePatch(
|
||||
name = "Open links with app chooser",
|
||||
description = "Instead of opening links directly, open them with an app chooser. " +
|
||||
"As a result you can select a browser to open the link with.",
|
||||
use = false,
|
||||
) {
|
||||
dependsOn(sharedExtensionPatch)
|
||||
|
||||
|
||||
@@ -10,9 +10,8 @@ val sanitizeSharingLinksPatch = bytecodePatch(
|
||||
) {
|
||||
compatibleWith(
|
||||
"com.twitter.android"(
|
||||
"10.86.0-release.0",
|
||||
"10.60.0-release.0",
|
||||
"10.48.0-release.0"
|
||||
"10.86.0-release.0",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package app.revanced.patches.viber.misc.navbar
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val tabIdClassFingerprint = fingerprint {
|
||||
strings("shouldShowTabId")
|
||||
}
|
||||
|
||||
context(BytecodePatchContext)
|
||||
internal val shouldShowTabIdMethodFingerprint get() = fingerprint {
|
||||
parameters("I", "I")
|
||||
returns("Z")
|
||||
custom { methodDef, classDef ->
|
||||
classDef == tabIdClassFingerprint.classDef
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package app.revanced.patches.viber.misc.navbar
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.patch.booleanOption
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import java.util.logging.Logger
|
||||
import kotlin.collections.joinToString
|
||||
|
||||
|
||||
private const val instructionsFooter = """
|
||||
# If we reach this, it means that this tab has been disabled by user
|
||||
const/4 v0, 0
|
||||
return v0 # return false as "This tab is not enabled"
|
||||
|
||||
# Proceed with default execution
|
||||
:continue
|
||||
nop
|
||||
"""
|
||||
|
||||
@Suppress("unused")
|
||||
val hideNavigationButtonsPatch = bytecodePatch(
|
||||
name = "Hide navigation buttons",
|
||||
description = "Permanently hides navigation bar buttons, such as Explore and Marketplace.",
|
||||
use = false
|
||||
) {
|
||||
compatibleWith("com.viber.voip")
|
||||
|
||||
val hideOptions = AllowedNavigationItems.entries.associateWith {
|
||||
booleanOption(
|
||||
key = it.key,
|
||||
default = it.defaultHideOption,
|
||||
title = it.title,
|
||||
description = it.description,
|
||||
)
|
||||
}
|
||||
|
||||
execute {
|
||||
// Items that won't be forcefully hidden.
|
||||
val allowedItems = hideOptions.filter { (option, enabled) -> enabled.value != true }
|
||||
|
||||
if (allowedItems.size == AllowedNavigationItems.entries.size) {
|
||||
return@execute Logger.getLogger(this::class.java.name).warning(
|
||||
"No hide navigation buttons options are enabled. No changes made."
|
||||
)
|
||||
}
|
||||
|
||||
val injectionInstructions = allowedItems
|
||||
.map { it.key.buildAllowInstruction() }
|
||||
.joinToString("\n") + instructionsFooter
|
||||
|
||||
shouldShowTabIdMethodFingerprint
|
||||
.method
|
||||
.addInstructionsWithLabels(0, injectionInstructions)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigation items taken from source code.
|
||||
* They appear in code like new NavigationItem(0, R.string.bottom_tab_chats, R.drawable.ic_tab_chats).
|
||||
*/
|
||||
private enum class AllowedNavigationItems(
|
||||
val defaultHideOption: Boolean,
|
||||
private val itemName: String,
|
||||
private vararg val ids: Int
|
||||
) {
|
||||
CHATS(false, "Chats", 0),
|
||||
CALLS(false, "Calls", 1, 7),
|
||||
EXPLORE(true, "Explore", 2),
|
||||
MORE(false, "More", 3),
|
||||
PAY(true, "Pay", 5),
|
||||
CAMERA(true, "Camera", 6),
|
||||
MARKETPLACE(true, "Marketplace", 8);
|
||||
|
||||
val key = "hide$itemName"
|
||||
val title = "Hide $itemName"
|
||||
val description = "Permanently hides the $itemName button."
|
||||
|
||||
fun buildAllowInstruction(): String =
|
||||
ids.joinToString("\n") { id ->
|
||||
"""
|
||||
const/4 v0, $id # If tabId == $id ($itemName), don't hide it
|
||||
if-eq p1, v0, :continue
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,6 @@ val hideAdsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -26,7 +26,6 @@ val hideGetPremiumPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -24,7 +24,6 @@ val videoAdsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -54,7 +54,6 @@ val copyVideoUrlPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -25,7 +25,6 @@ val removeViewerDiscretionDialogPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -75,7 +75,6 @@ val downloadsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -21,7 +21,6 @@ val seekbarPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -89,7 +89,6 @@ val swipeControlsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -25,7 +25,6 @@ val autoCaptionsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -1,123 +1,51 @@
|
||||
package app.revanced.patches.youtube.layout.branding
|
||||
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_34_or_greater
|
||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.Utils.trimIndentMultiline
|
||||
import app.revanced.util.copyResources
|
||||
import java.io.File
|
||||
import app.revanced.patches.shared.layout.branding.baseCustomBrandingPatch
|
||||
import app.revanced.patches.shared.layout.branding.mipmapDirectories
|
||||
import java.nio.file.Files
|
||||
|
||||
private const val REVANCED_ICON = "ReVanced*Logo" // Can never be a valid path.
|
||||
private const val APP_NAME = "YouTube ReVanced"
|
||||
|
||||
private val iconResourceFileNames = arrayOf(
|
||||
"adaptiveproduct_youtube_background_color_108",
|
||||
"adaptiveproduct_youtube_foreground_color_108",
|
||||
"ic_launcher",
|
||||
"ic_launcher_round",
|
||||
).map { "$it.png" }.toTypedArray()
|
||||
|
||||
private val iconResourceFileNamesNew = mapOf(
|
||||
private val youtubeIconResourceFileNames_19_34 = mapOf(
|
||||
"adaptiveproduct_youtube_foreground_color_108" to "adaptiveproduct_youtube_2024_q4_foreground_color_108",
|
||||
"adaptiveproduct_youtube_background_color_108" to "adaptiveproduct_youtube_2024_q4_background_color_108",
|
||||
)
|
||||
|
||||
private val mipmapDirectories = arrayOf(
|
||||
"xxxhdpi",
|
||||
"xxhdpi",
|
||||
"xhdpi",
|
||||
"hdpi",
|
||||
"mdpi",
|
||||
).map { "mipmap-$it" }
|
||||
|
||||
@Suppress("unused")
|
||||
val customBrandingPatch = resourcePatch(
|
||||
name = "Custom branding",
|
||||
description = "Applies a custom app name and icon. Defaults to \"YouTube ReVanced\" and the ReVanced logo.",
|
||||
use = false,
|
||||
) {
|
||||
dependsOn(versionCheckPatch)
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
val appName by stringOption(
|
||||
key = "appName",
|
||||
default = APP_NAME,
|
||||
values = mapOf(
|
||||
val customBrandingPatch = baseCustomBrandingPatch(
|
||||
defaultAppName = APP_NAME,
|
||||
appNameValues = mapOf(
|
||||
"YouTube ReVanced" to APP_NAME,
|
||||
"YT ReVanced" to "YT ReVanced",
|
||||
"YT" to "YT",
|
||||
"YouTube" to "YouTube",
|
||||
),
|
||||
title = "App name",
|
||||
description = "The name of the app.",
|
||||
resourceFolder = "custom-branding/youtube",
|
||||
iconResourceFileNames = arrayOf(
|
||||
"adaptiveproduct_youtube_background_color_108",
|
||||
"adaptiveproduct_youtube_foreground_color_108",
|
||||
"ic_launcher",
|
||||
"ic_launcher_round",
|
||||
),
|
||||
|
||||
block = {
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
|
||||
val icon by stringOption(
|
||||
key = "iconPath",
|
||||
default = REVANCED_ICON,
|
||||
values = mapOf("ReVanced Logo" to REVANCED_ICON),
|
||||
title = "App icon",
|
||||
description = """
|
||||
The icon to apply to the app.
|
||||
|
||||
If a path to a folder is provided, the folder must contain the following folders:
|
||||
|
||||
${mipmapDirectories.joinToString("\n") { "- $it" }}
|
||||
|
||||
Each of these folders must contain the following files:
|
||||
|
||||
${iconResourceFileNames.joinToString("\n") { "- $it" }}
|
||||
""".trimIndentMultiline(),
|
||||
)
|
||||
},
|
||||
|
||||
execute {
|
||||
icon?.let { icon ->
|
||||
// Change the app icon.
|
||||
mipmapDirectories.map { directory ->
|
||||
ResourceGroup(
|
||||
directory,
|
||||
*iconResourceFileNames,
|
||||
)
|
||||
}.let { resourceGroups ->
|
||||
if (icon != REVANCED_ICON) {
|
||||
val path = File(icon)
|
||||
val resourceDirectory = get("res")
|
||||
|
||||
resourceGroups.forEach { group ->
|
||||
val fromDirectory = path.resolve(group.resourceDirectoryName)
|
||||
val toDirectory = resourceDirectory.resolve(group.resourceDirectoryName)
|
||||
|
||||
group.resources.forEach { iconFileName ->
|
||||
Files.write(
|
||||
toDirectory.resolve(iconFileName).toPath(),
|
||||
fromDirectory.resolve(iconFileName).readBytes(),
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
resourceGroups.forEach { copyResources("custom-branding", it) }
|
||||
}
|
||||
}
|
||||
|
||||
if (is_19_34_or_greater) {
|
||||
executeBlock = {
|
||||
val resourceDirectory = get("res")
|
||||
|
||||
mipmapDirectories.forEach { directory ->
|
||||
val targetDirectory = resourceDirectory.resolve(directory)
|
||||
|
||||
iconResourceFileNamesNew.forEach { (old, new) ->
|
||||
youtubeIconResourceFileNames_19_34.forEach { (old, new) ->
|
||||
val oldFile = targetDirectory.resolve("$old.png")
|
||||
val newFile = targetDirectory.resolve("$new.png")
|
||||
|
||||
@@ -125,18 +53,4 @@ val customBrandingPatch = resourcePatch(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
appName?.let { name ->
|
||||
// Change the app name.
|
||||
val manifest = get("AndroidManifest.xml")
|
||||
manifest.writeText(
|
||||
manifest.readText()
|
||||
.replace(
|
||||
"android:label=\"@string/application_name",
|
||||
"android:label=\"$name",
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -94,7 +94,6 @@ val changeHeaderPatch = resourcePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -23,7 +23,6 @@ val hideButtonsPatch = resourcePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -41,7 +41,6 @@ val navigationButtonsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -59,7 +59,6 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -34,7 +34,6 @@ val changeFormFactorPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.containsLiteralInstruction
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
|
||||
internal val layoutCircleFingerprint = fingerprint {
|
||||
returns("Landroid/view/View;")
|
||||
@@ -38,3 +43,19 @@ internal val layoutVideoFingerprint = fingerprint {
|
||||
)
|
||||
literal { layoutVideo }
|
||||
}
|
||||
|
||||
internal val showEndscreenCardsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
custom { method, classDef ->
|
||||
classDef.methods.count() == 5
|
||||
&& method.containsLiteralInstruction(0)
|
||||
&& method.containsLiteralInstruction(5)
|
||||
&& method.containsLiteralInstruction(8)
|
||||
&& method.indexOfFirstInstruction {
|
||||
val reference = getReference<FieldReference>()
|
||||
reference?.type == "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
@@ -11,6 +12,8 @@ import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_43_or_greater
|
||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@@ -22,7 +25,7 @@ internal var layoutIcon = -1L
|
||||
internal var layoutVideo = -1L
|
||||
private set
|
||||
|
||||
private val hideEndscreenCardsResourcePatch = resourcePatch {
|
||||
private val hideEndScreenCardsResourcePatch = resourcePatch {
|
||||
dependsOn(
|
||||
settingsPatch,
|
||||
resourceMappingPatch,
|
||||
@@ -30,7 +33,7 @@ private val hideEndscreenCardsResourcePatch = resourcePatch {
|
||||
)
|
||||
|
||||
execute {
|
||||
addResources("youtube", "layout.hide.endscreencards.hideEndscreenCardsResourcePatch")
|
||||
addResources("youtube", "layout.hide.endscreencards.hideEndScreenCardsResourcePatch")
|
||||
|
||||
PreferenceScreen.PLAYER.addPreferences(
|
||||
SwitchPreference("revanced_hide_endscreen_cards"),
|
||||
@@ -45,22 +48,22 @@ private val hideEndscreenCardsResourcePatch = resourcePatch {
|
||||
}
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/youtube/patches/HideEndscreenCardsPatch;"
|
||||
"Lapp/revanced/extension/youtube/patches/HideEndScreenCardsPatch;"
|
||||
|
||||
@Suppress("unused")
|
||||
val hideEndscreenCardsPatch = bytecodePatch(
|
||||
val hideEndScreenCardsPatch = bytecodePatch(
|
||||
name = "Hide end screen cards",
|
||||
description = "Adds an option to hide suggested video cards at the end of videos.",
|
||||
) {
|
||||
dependsOn(
|
||||
sharedExtensionPatch,
|
||||
hideEndscreenCardsResourcePatch,
|
||||
hideEndScreenCardsResourcePatch,
|
||||
versionCheckPatch
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
@@ -79,9 +82,24 @@ val hideEndscreenCardsPatch = bytecodePatch(
|
||||
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"invoke-static { v$viewRegister }, $EXTENSION_CLASS_DESCRIPTOR->hideEndscreen(Landroid/view/View;)V",
|
||||
"invoke-static { v$viewRegister }, " +
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->hideEndScreenCardView(Landroid/view/View;)V",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (is_19_43_or_greater) {
|
||||
showEndscreenCardsFingerprint.method.addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, $EXTENSION_CLASS_DESCRIPTOR->hideEndScreenCards()Z
|
||||
move-result v0
|
||||
if-eqz v0, :show
|
||||
return-void
|
||||
:show
|
||||
nop
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,6 @@ val hideEndScreenSuggestedVideoPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -30,7 +30,6 @@ val disableFullscreenAmbientModePatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -147,3 +147,17 @@ internal val showFloatingMicrophoneButtonFingerprint = fingerprint {
|
||||
)
|
||||
literal { fabButtonId }
|
||||
}
|
||||
|
||||
internal val hideViewCountFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/CharSequence;")
|
||||
|
||||
opcodes(
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.RETURN_OBJECT,
|
||||
)
|
||||
strings(
|
||||
"Has attachmentRuns but drawableRequester is missing.",
|
||||
)
|
||||
}
|
||||
@@ -36,6 +36,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
import app.revanced.util.indexOfFirstInstructionReversedOrThrow
|
||||
|
||||
var expandButtonDownId = -1L
|
||||
private set
|
||||
@@ -127,7 +128,6 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
@@ -162,9 +162,9 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
SwitchPreference("revanced_hide_comments_section"),
|
||||
SwitchPreference("revanced_hide_comments_community_guidelines"),
|
||||
SwitchPreference("revanced_hide_comments_create_a_short_button"),
|
||||
SwitchPreference("revanced_hide_comments_emoji_and_timestamp_buttons"),
|
||||
SwitchPreference("revanced_hide_comments_preview_comment"),
|
||||
SwitchPreference("revanced_hide_comments_thanks_button"),
|
||||
SwitchPreference("revanced_hide_comments_timestamp_button"),
|
||||
),
|
||||
sorting = PreferenceScreenPreference.Sorting.UNSORTED,
|
||||
),
|
||||
@@ -240,6 +240,8 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
SwitchPreference("revanced_hide_surveys"),
|
||||
SwitchPreference("revanced_hide_ticket_shelf"),
|
||||
SwitchPreference("revanced_hide_video_recommendation_labels"),
|
||||
SwitchPreference("revanced_hide_view_count"),
|
||||
SwitchPreference("revanced_hide_upload_time"),
|
||||
SwitchPreference("revanced_hide_doodles"),
|
||||
)
|
||||
|
||||
@@ -398,6 +400,39 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region hide view count
|
||||
|
||||
hideViewCountFingerprint.method.apply {
|
||||
val startIndex = hideViewCountFingerprint.patternMatch!!.startIndex
|
||||
var returnStringRegister = getInstruction<OneRegisterInstruction>(startIndex).registerA
|
||||
|
||||
// Find the instruction where the text dimension is retrieved.
|
||||
val applyDimensionIndex = indexOfFirstInstructionReversedOrThrow {
|
||||
val reference = getReference<MethodReference>()
|
||||
opcode == Opcode.INVOKE_STATIC &&
|
||||
reference?.definingClass == "Landroid/util/TypedValue;" &&
|
||||
reference.returnType == "F" &&
|
||||
reference.name == "applyDimension" &&
|
||||
reference.parameterTypes == listOf("I", "F", "Landroid/util/DisplayMetrics;")
|
||||
}
|
||||
|
||||
// A float value is passed which is used to determine subtitle text size.
|
||||
val floatDimensionRegister = getInstruction<OneRegisterInstruction>(
|
||||
applyDimensionIndex + 1
|
||||
).registerA
|
||||
|
||||
addInstructions(
|
||||
applyDimensionIndex - 1,
|
||||
"""
|
||||
invoke-static { v$returnStringRegister, v$floatDimensionRegister }, $LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR->modifyFeedSubtitleSpan(Landroid/text/SpannableString;F)Landroid/text/SpannableString;
|
||||
move-result-object v$returnStringRegister
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region hide filter bar
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,7 +58,6 @@ val hideInfoCardsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
@@ -25,7 +25,6 @@ val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"20.07.39",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user