mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-08 18:33:57 +01:00
Compare commits
46 Commits
v5.0.0-dev
...
v5.1.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a625309d1f | ||
|
|
a7fc08a491 | ||
|
|
97b129e088 | ||
|
|
8c6c8e0442 | ||
|
|
16c090d2c0 | ||
|
|
ed35a2a4a9 | ||
|
|
c3701c4b6e | ||
|
|
e0dc821c50 | ||
|
|
b9efb05271 | ||
|
|
2e3b3dca4b | ||
|
|
19eaee09d0 | ||
|
|
78f3fd6aa4 | ||
|
|
71ed37beb1 | ||
|
|
5aae234c43 | ||
|
|
17b5b2e384 | ||
|
|
462b61c2e9 | ||
|
|
f23b7fffc8 | ||
|
|
69c504ca2f | ||
|
|
fc4b0d7c39 | ||
|
|
02e66b3d43 | ||
|
|
a75c15b950 | ||
|
|
e4417455c9 | ||
|
|
5253f4bfa4 | ||
|
|
273bedc74c | ||
|
|
68ec011003 | ||
|
|
f3d1103287 | ||
|
|
50a3541e98 | ||
|
|
c6069a7ff6 | ||
|
|
b10b624b4b | ||
|
|
3e1b5cbaf5 | ||
|
|
ef37b78b45 | ||
|
|
d881d8bc44 | ||
|
|
0cb993d6ea | ||
|
|
3793b2103c | ||
|
|
658370f035 | ||
|
|
3059aca69d | ||
|
|
2094a23ccc | ||
|
|
53b6b1ff41 | ||
|
|
5657a7d8c8 | ||
|
|
08ce458e28 | ||
|
|
b5e4022fbb | ||
|
|
6e75ffd5f1 | ||
|
|
75d661fcdc | ||
|
|
4d1de6bc50 | ||
|
|
327ebd3649 | ||
|
|
34e98a54e0 |
186
CHANGELOG.md
186
CHANGELOG.md
@@ -1,3 +1,189 @@
|
|||||||
|
# [5.1.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.1.0-dev.1...v5.1.0-dev.2) (2024-11-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - SponsorBlock:** Fix create new segment crash on tablet custom roms ([#3946](https://github.com/ReVanced/revanced-patches/issues/3946)) ([a0da377](https://github.com/ReVanced/revanced-patches/commit/a0da377ba8f90ba39e905ed9730b3e819633bd50))
|
||||||
|
|
||||||
|
# [5.1.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.5...v5.1.0-dev.1) (2024-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Support version `19.45.38` ([#3938](https://github.com/ReVanced/revanced-patches/issues/3938)) ([7c4e3fe](https://github.com/ReVanced/revanced-patches/commit/7c4e3fe97e8cbbb8cf16a2fb95f64223ca2bd7ef))
|
||||||
|
|
||||||
|
## [5.0.3-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.4...v5.0.3-dev.5) (2024-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide Shorts components:** Do not hide Shorts action buttons on app first launch ([#3933](https://github.com/ReVanced/revanced-patches/issues/3933)) ([0d78815](https://github.com/ReVanced/revanced-patches/commit/0d78815e33bf2ae216e519f067fb773df0f2084e))
|
||||||
|
|
||||||
|
## [5.0.3-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.3...v5.0.3-dev.4) (2024-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof app version:** Adjust legacy spoof targets ([#3934](https://github.com/ReVanced/revanced-patches/issues/3934)) ([f5794c1](https://github.com/ReVanced/revanced-patches/commit/f5794c1f896c331d76fdfc299e31a2773f2209ca))
|
||||||
|
|
||||||
|
## [5.0.3-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.2...v5.0.3-dev.3) (2024-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Playback speed:** Add 'Auto' speed. Always override speed if default is set to 1.0x ([#3914](https://github.com/ReVanced/revanced-patches/issues/3914)) ([497739e](https://github.com/ReVanced/revanced-patches/commit/497739e8ce6933c1f1ea46edffc102e56b985623))
|
||||||
|
|
||||||
|
## [5.0.3-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.1...v5.0.3-dev.2) (2024-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof app version:** Remove broken spoof targets when patching 19.25+ ([#3915](https://github.com/ReVanced/revanced-patches/issues/3915)) ([9e18eca](https://github.com/ReVanced/revanced-patches/commit/9e18ecab1877dd33a3ad0fe216e6b91a8daaf1f8))
|
||||||
|
|
||||||
|
## [5.0.3-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.0.2...v5.0.3-dev.1) (2024-11-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Change header:** Apply header changes to A/B layout ([#3907](https://github.com/ReVanced/revanced-patches/issues/3907)) ([6ccf114](https://github.com/ReVanced/revanced-patches/commit/6ccf11426ec9e9cd9c8e89a2443f0d0645cc78b1))
|
||||||
|
|
||||||
|
## [5.0.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.1...v5.0.2) (2024-11-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync for Reddit - Fix /s/ links:** Fix patch by using correct fingerprints ([a0ad07e](https://github.com/ReVanced/revanced-patches/commit/a0ad07ef3170dbe1d91ebd40f11d97b63d1c63d0))
|
||||||
|
* **Sync for Reddit - Spoof client:** Fix patch by using correct fingerprints ([5776de3](https://github.com/ReVanced/revanced-patches/commit/5776de3cfbfa62360267eb6026525d2da8c45654))
|
||||||
|
* **YouTube - Player controls:** Show player control buttons with A/B layout ([#3901](https://github.com/ReVanced/revanced-patches/issues/3901)) ([bb526bc](https://github.com/ReVanced/revanced-patches/commit/bb526bc00a384eb808f46267e5802c8e5beaa7d5))
|
||||||
|
|
||||||
|
## [5.0.2-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.2-dev.1...v5.0.2-dev.2) (2024-11-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Player controls:** Show player control buttons with A/B layout ([#3901](https://github.com/ReVanced/revanced-patches/issues/3901)) ([bb526bc](https://github.com/ReVanced/revanced-patches/commit/bb526bc00a384eb808f46267e5802c8e5beaa7d5))
|
||||||
|
|
||||||
|
## [5.0.2-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.0.1...v5.0.2-dev.1) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync for Reddit - Fix /s/ links:** Fix patch by using correct fingerprints ([a0ad07e](https://github.com/ReVanced/revanced-patches/commit/a0ad07ef3170dbe1d91ebd40f11d97b63d1c63d0))
|
||||||
|
* **Sync for Reddit - Spoof client:** Fix patch by using correct fingerprints ([5776de3](https://github.com/ReVanced/revanced-patches/commit/5776de3cfbfa62360267eb6026525d2da8c45654))
|
||||||
|
|
||||||
|
## [5.0.1](https://github.com/ReVanced/revanced-patches/compare/v5.0.0...v5.0.1) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync:** Fix patches by not throwing unnecessarily ([2ee1316](https://github.com/ReVanced/revanced-patches/commit/2ee13160d51dba3c5806594b2387f806e5946b9a))
|
||||||
|
* **Tiktok - Settings:** Fix the patch by depending on the correct settings patch ([0c75929](https://github.com/ReVanced/revanced-patches/commit/0c75929a83729841197b482d28f7f7f5f9cec332))
|
||||||
|
* **Twitter:** Fix patches by depending on patch that merges required extension ([c330e9d](https://github.com/ReVanced/revanced-patches/commit/c330e9d67d3e8c8c3535fa43e52c9f06e33ff0bf))
|
||||||
|
* **Twitter:** Fix patches by matching fingerprint using correct class ([6ae0d12](https://github.com/ReVanced/revanced-patches/commit/6ae0d124e1f27faecd20e4008951b08353572d98))
|
||||||
|
* **YouTube - Playback speed:** Remember playback speed when using non 1.0x default speed ([05b9f87](https://github.com/ReVanced/revanced-patches/commit/05b9f8709895dae67e8cc12e8b7bdb87ff401997)), closes [#3810](https://github.com/ReVanced/revanced-patches/issues/3810)
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* Check for extension without a class proxy ([a6a74e2](https://github.com/ReVanced/revanced-patches/commit/a6a74e289db1fe04db230d1e864cb9e752f9a01d))
|
||||||
|
|
||||||
|
## [5.0.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.0.1-dev.3...v5.0.1-dev.4) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Twitter:** Fix patches by depending on patch that merges required extension ([c330e9d](https://github.com/ReVanced/revanced-patches/commit/c330e9d67d3e8c8c3535fa43e52c9f06e33ff0bf))
|
||||||
|
|
||||||
|
## [5.0.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.0.1-dev.2...v5.0.1-dev.3) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Playback speed:** Remember playback speed when using non 1.0x default speed ([05b9f87](https://github.com/ReVanced/revanced-patches/commit/05b9f8709895dae67e8cc12e8b7bdb87ff401997)), closes [#3810](https://github.com/ReVanced/revanced-patches/issues/3810)
|
||||||
|
|
||||||
|
## [5.0.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.1-dev.1...v5.0.1-dev.2) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Twitter:** Fix patches by matching fingerprint using correct class ([6ae0d12](https://github.com/ReVanced/revanced-patches/commit/6ae0d124e1f27faecd20e4008951b08353572d98))
|
||||||
|
|
||||||
|
## [5.0.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.0.0...v5.0.1-dev.1) (2024-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync:** Fix patches by not throwing unnecessarily ([2ee1316](https://github.com/ReVanced/revanced-patches/commit/2ee13160d51dba3c5806594b2387f806e5946b9a))
|
||||||
|
* **Tiktok - Settings:** Fix the patch by depending on the correct settings patch ([0c75929](https://github.com/ReVanced/revanced-patches/commit/0c75929a83729841197b482d28f7f7f5f9cec332))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* Check for extension without a class proxy ([a6a74e2](https://github.com/ReVanced/revanced-patches/commit/a6a74e289db1fe04db230d1e864cb9e752f9a01d))
|
||||||
|
|
||||||
|
# [5.0.0](https://github.com/ReVanced/revanced-patches/compare/v4.17.0...v5.0.0) (2024-11-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add missing dependency to patch ([97f5240](https://github.com/ReVanced/revanced-patches/commit/97f5240d53b9978fb3745170fe03619c7c90274a))
|
||||||
|
* **MyFitnessPal - Hide ads:** Constrain patch to last working version ([#3847](https://github.com/ReVanced/revanced-patches/issues/3847)) ([f9fa526](https://github.com/ReVanced/revanced-patches/commit/f9fa526b04c2848175c389d6bb911aa5a245b60f))
|
||||||
|
* **Twitter - Change link sharing domain:** Support latest app version ([#3786](https://github.com/ReVanced/revanced-patches/issues/3786)) ([b54592c](https://github.com/ReVanced/revanced-patches/commit/b54592cf9c5d859e1af2f02e8e6aaad7d47ab760))
|
||||||
|
* **YouTube - Copy video URL:** Support A/B player layout ([0f42574](https://github.com/ReVanced/revanced-patches/commit/0f42574b7f4b1c9a48df8550c7d710093f76ce8c))
|
||||||
|
* **YouTube - Custom branding:** Change icon correctly on 19.34+ ([#3866](https://github.com/ReVanced/revanced-patches/issues/3866)) ([2e47903](https://github.com/ReVanced/revanced-patches/commit/2e4790382546256e106a5842cd8c530f41b161e5))
|
||||||
|
* **YouTube - Hide ads:** Hide new types of ads ([454281a](https://github.com/ReVanced/revanced-patches/commit/454281ac2108648832b7f0203f5fb7e814887835))
|
||||||
|
* **YouTube - Hide layout components:** Move hide chips settings to Feed menu ([1ed677f](https://github.com/ReVanced/revanced-patches/commit/1ed677f7b8ba561b2bb173dcaf5d6123c22179c4))
|
||||||
|
* **YouTube - Hide layout components:** Remove obsolete 'Hide gray separator' ([a697701](https://github.com/ReVanced/revanced-patches/commit/a697701c5f1f9510b51e310b1ff212b609f38519))
|
||||||
|
* **YouTube - Playback speed:** Remember playback speed with new speed menu ([#3810](https://github.com/ReVanced/revanced-patches/issues/3810)) ([c3a5e14](https://github.com/ReVanced/revanced-patches/commit/c3a5e14a0a24973a0f9956845c9e0f99c1301d42))
|
||||||
|
* **YouTube - Playback speed:** Restore old playback speed menu ([#3817](https://github.com/ReVanced/revanced-patches/issues/3817)) ([806b210](https://github.com/ReVanced/revanced-patches/commit/806b21093e3251697f03cd8804e5d5cd26070716))
|
||||||
|
* **YouTube - Remember video quality:** Correctly set default quality when changing from a low quality video ([#3879](https://github.com/ReVanced/revanced-patches/issues/3879)) ([ddb73e8](https://github.com/ReVanced/revanced-patches/commit/ddb73e857d7c26fd27ea995a27f53f5660d3f71c))
|
||||||
|
* **YouTube - Remove background playback restrictions:** Enable for Shorts as well ([#3671](https://github.com/ReVanced/revanced-patches/issues/3671)) ([7db1a77](https://github.com/ReVanced/revanced-patches/commit/7db1a7751dc47c4e36096fbdc2b3761b0ae11ccb))
|
||||||
|
* **YouTube - Return YouTube Dislike:** Show Shorts dislikes with new A/B button icons ([084e0a5](https://github.com/ReVanced/revanced-patches/commit/084e0a527b1c75d1ef15dc706c429aa48d0ffe6b))
|
||||||
|
* **YouTube - Return YouTube Dislike:** Use latest separator height ([ae160a3](https://github.com/ReVanced/revanced-patches/commit/ae160a37985cc96c6de7e1a2fe5a1c83bc523046))
|
||||||
|
* **YouTube - Seekbar:** Use latest shade of YouTube red ([4b77648](https://github.com/ReVanced/revanced-patches/commit/4b77648607a84eb29f4cae9ddb42b87084be7cd0))
|
||||||
|
* **YouTube - Settings:** Use multiline preference title for localized languages ([#3821](https://github.com/ReVanced/revanced-patches/issues/3821)) ([ff85d49](https://github.com/ReVanced/revanced-patches/commit/ff85d490887de64eb6c6fd42e385a3e75969ff10))
|
||||||
|
* **YouTube - SponsorBlock:** Show correct segment behavior in settings UI after importing ([e3f25a0](https://github.com/ReVanced/revanced-patches/commit/e3f25a03cd314eeae786e7660a6beacb275a6a76))
|
||||||
|
* **YouTube - Spoof app version:** Remove obsolete 17.33.42 spoof target ([#3825](https://github.com/ReVanced/revanced-patches/issues/3825)) ([33aeba2](https://github.com/ReVanced/revanced-patches/commit/33aeba2a0895e9ecaba27ba4a3b22b86c9f1a51c))
|
||||||
|
* **YouTube:** Merge `Restore old seekbar thumbnails` into `Seekbar thumbnails` ([#3860](https://github.com/ReVanced/revanced-patches/issues/3860)) ([e377b1e](https://github.com/ReVanced/revanced-patches/commit/e377b1e6ad93dea8e5f3829cd3894f71851887a3))
|
||||||
|
|
||||||
|
|
||||||
|
### Build System
|
||||||
|
|
||||||
|
* Bump ReVanced Patcher ([eee1692](https://github.com/ReVanced/revanced-patches/commit/eee16922779f994f5752190a20a9016ea98ec4cb))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Hide player shopping shelf ([#3804](https://github.com/ReVanced/revanced-patches/issues/3804)) ([1952f3b](https://github.com/ReVanced/revanced-patches/commit/1952f3b3c4bca08ed0f6e5b1117e0a6c51f00ed2))
|
||||||
|
* **YouTube - Hide player flyout menu items:** Hide stable volume ([#3827](https://github.com/ReVanced/revanced-patches/issues/3827)) ([b91e932](https://github.com/ReVanced/revanced-patches/commit/b91e932e65c04b1c1aee9a2f3dc3a73772d9c225))
|
||||||
|
* **YouTube - Miniplayer:** Add horizontal drag gesture ([#3859](https://github.com/ReVanced/revanced-patches/issues/3859)) ([e32b19e](https://github.com/ReVanced/revanced-patches/commit/e32b19e170a5571b23547c3211b497089d0cd441))
|
||||||
|
* **YouTube - Player flyout menu:** Hide sleep timer ([#3637](https://github.com/ReVanced/revanced-patches/issues/3637)) ([7e1bdab](https://github.com/ReVanced/revanced-patches/commit/7e1bdab520dba65682f018f819c0b7d9783f94ca))
|
||||||
|
* **YouTube:** Add `Seekbar thumbnails` patch ([#3813](https://github.com/ReVanced/revanced-patches/issues/3813)) ([5988b75](https://github.com/ReVanced/revanced-patches/commit/5988b759752b944b6999b401faa394e2089e4003))
|
||||||
|
* **YouTube:** Add `Shorts autoplay` patch ([#3794](https://github.com/ReVanced/revanced-patches/issues/3794)) ([96b5aed](https://github.com/ReVanced/revanced-patches/commit/96b5aede482f7a69d6df17864a2e17568b0da880))
|
||||||
|
* **YouTube:** Hide player shopping shelf in playlists ([#3806](https://github.com/ReVanced/revanced-patches/issues/3806)) ([a553a13](https://github.com/ReVanced/revanced-patches/commit/a553a13c0326ef2fff7f785fed592d553a7963ce))
|
||||||
|
* **YouTube:** Merge multiple layout patches into `Hide Layout Components` ([#3799](https://github.com/ReVanced/revanced-patches/issues/3799)) ([bbcb57a](https://github.com/ReVanced/revanced-patches/commit/bbcb57a32dfc8f031886f98b1b9701285105c579))
|
||||||
|
* **YouTube:** Merge multiple player overlay patches into `Hide player overlay buttons` ([#3800](https://github.com/ReVanced/revanced-patches/issues/3800)) ([4ba0300](https://github.com/ReVanced/revanced-patches/commit/4ba0300590dd988bdcaa0761c4e606c1d7f86ce5))
|
||||||
|
* **YouTube:** Support version `19.43.41` ([#3854](https://github.com/ReVanced/revanced-patches/issues/3854)) ([85de5c7](https://github.com/ReVanced/revanced-patches/commit/85de5c7d96ce2d67f6386d1438e43620d31cc645))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* Various APIs have been changed or removed.
|
||||||
|
|
||||||
|
# [5.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.0.0-dev.3...v5.0.0-dev.4) (2024-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Remember video quality:** Correctly set default quality when changing from a low quality video ([#3879](https://github.com/ReVanced/revanced-patches/issues/3879)) ([ddb73e8](https://github.com/ReVanced/revanced-patches/commit/ddb73e857d7c26fd27ea995a27f53f5660d3f71c))
|
||||||
|
|
||||||
|
# [5.0.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.0.0-dev.2...v5.0.0-dev.3) (2024-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add missing dependency to patch ([97f5240](https://github.com/ReVanced/revanced-patches/commit/97f5240d53b9978fb3745170fe03619c7c90274a))
|
||||||
|
|
||||||
# [5.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.0-dev.1...v5.0.0-dev.2) (2024-11-09)
|
# [5.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.0-dev.1...v5.0.0-dev.2) (2024-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package app.revanced.extension.shared.checks;
|
package app.revanced.extension.shared.checks;
|
||||||
|
|
||||||
// Fields are set by the patch. Do not modify.
|
/**
|
||||||
// Fields are not final, because the compiler is inlining them.
|
* Fields are set by the patch. Do not modify.
|
||||||
|
* Fields are not final, because the compiler is inlining them.
|
||||||
|
*
|
||||||
|
* @noinspection CanBeFinal
|
||||||
|
*/
|
||||||
final class PatchInfo {
|
final class PatchInfo {
|
||||||
static long PATCH_TIME = 0L;
|
static long PATCH_TIME = 0L;
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
|
|||||||
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
|
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
|
||||||
|
|
||||||
public class ShowOnLockscreenPatch {
|
public class ShowOnLockscreenPatch {
|
||||||
/**
|
|
||||||
* @noinspection deprecation
|
|
||||||
*/
|
|
||||||
public static Window getWindow(AppCompatActivity activity, float brightness) {
|
public static Window getWindow(AppCompatActivity activity, float brightness) {
|
||||||
Window window = activity.getWindow();
|
Window window = activity.getWindow();
|
||||||
|
|
||||||
|
|||||||
@@ -53,4 +53,18 @@ public final class EnableDebuggingPatch {
|
|||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static String isStringFeatureFlagEnabled(String value, long flag, String defaultValue) {
|
||||||
|
if (BaseSettings.DEBUG.get() && !defaultValue.equals(value)) {
|
||||||
|
if (featureFlags.putIfAbsent(flag, true) == null) {
|
||||||
|
Logger.printDebug(() -> " string feature is enabled: " + flag
|
||||||
|
+ " value: " + value + (defaultValue.isEmpty() ? "" : " default: " + defaultValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import app.revanced.extension.shared.Logger;
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class PlayerControlsPatch {
|
public class PlayerControlsPatch {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
@@ -41,4 +42,11 @@ public class PlayerControlsPatch {
|
|||||||
public static void fullscreenButtonVisibilityChanged(boolean isVisible) {
|
public static void fullscreenButtonVisibilityChanged(boolean isVisible) {
|
||||||
// Code added during patching.
|
// Code added during patching.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static String getPlayerTopControlsLayoutResourceName(String original) {
|
||||||
|
return "default";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,13 +15,10 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
@@ -84,8 +81,8 @@ public final class AnnouncementsPatch {
|
|||||||
try {
|
try {
|
||||||
if (isLatestAlready()) return;
|
if (isLatestAlready()) return;
|
||||||
|
|
||||||
HttpURLConnection connection = AnnouncementsRoutes.getAnnouncementsConnectionFromRoute(
|
HttpURLConnection connection = AnnouncementsRoutes
|
||||||
GET_LATEST_ANNOUNCEMENTS, Locale.getDefault().toLanguageTag());
|
.getAnnouncementsConnectionFromRoute(GET_LATEST_ANNOUNCEMENTS);
|
||||||
|
|
||||||
Logger.printDebug(() -> "Get latest announcements route connection url: " + connection.getURL());
|
Logger.printDebug(() -> "Get latest announcements route connection url: " + connection.getURL());
|
||||||
|
|
||||||
@@ -98,11 +95,11 @@ public final class AnnouncementsPatch {
|
|||||||
LocalDateTime archivedAt = LocalDateTime.MAX;
|
LocalDateTime archivedAt = LocalDateTime.MAX;
|
||||||
Level level = Level.INFO;
|
Level level = Level.INFO;
|
||||||
try {
|
try {
|
||||||
final var announcement = new JSONObject(jsonString);
|
final var announcement = new JSONArray(jsonString).getJSONObject(0);
|
||||||
|
|
||||||
id = announcement.getInt("id");
|
id = announcement.getInt("id");
|
||||||
title = announcement.getString("title");
|
title = announcement.getString("title");
|
||||||
message = announcement.getJSONObject("content").getString("message");
|
message = announcement.getString("content");
|
||||||
if (!announcement.isNull("archived_at")) {
|
if (!announcement.isNull("archived_at")) {
|
||||||
archivedAt = LocalDateTime.parse(announcement.getString("archived_at"));
|
archivedAt = LocalDateTime.parse(announcement.getString("archived_at"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import java.net.HttpURLConnection;
|
|||||||
import static app.revanced.extension.youtube.requests.Route.Method.GET;
|
import static app.revanced.extension.youtube.requests.Route.Method.GET;
|
||||||
|
|
||||||
public class AnnouncementsRoutes {
|
public class AnnouncementsRoutes {
|
||||||
public static final Route GET_LATEST_ANNOUNCEMENTS = new Route(GET, "/announcements/latest?tag=youtube");
|
|
||||||
public static final Route GET_LATEST_ANNOUNCEMENT_IDS = new Route(GET, "/announcements/latest/id?tag=youtube");
|
|
||||||
private static final String ANNOUNCEMENTS_PROVIDER = "https://api.revanced.app/v4";
|
private static final String ANNOUNCEMENTS_PROVIDER = "https://api.revanced.app/v4";
|
||||||
|
public static final Route GET_LATEST_ANNOUNCEMENT_IDS = new Route(GET, "/announcements/latest/id?tag=youtube");
|
||||||
|
public static final Route GET_LATEST_ANNOUNCEMENTS = new Route(GET, "/announcements/latest?tag=youtube");
|
||||||
|
|
||||||
private AnnouncementsRoutes() {
|
private AnnouncementsRoutes() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
"cell_description_body"
|
"cell_description_body"
|
||||||
);
|
);
|
||||||
private static final ByteArrayFilterGroup mixPlaylists = new ByteArrayFilterGroup(
|
private static final ByteArrayFilterGroup mixPlaylists = new ByteArrayFilterGroup(
|
||||||
Settings.HIDE_MIX_PLAYLISTS,
|
null,
|
||||||
"&list="
|
"&list="
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -344,6 +344,10 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
*/
|
*/
|
||||||
public static boolean filterMixPlaylists(final Object conversionContext, @Nullable final byte[] bytes) {
|
public static boolean filterMixPlaylists(final Object conversionContext, @Nullable final byte[] bytes) {
|
||||||
try {
|
try {
|
||||||
|
if (!Settings.HIDE_MIX_PLAYLISTS.get()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
Logger.printDebug(() -> "bytes is null");
|
Logger.printDebug(() -> "bytes is null");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ import app.revanced.extension.youtube.shared.PlayerType;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public final class ShortsFilter extends Filter {
|
public final class ShortsFilter extends Filter {
|
||||||
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
||||||
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
private static final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For paid promotion label and subscribe button that appears in the channel bar.
|
* For paid promotion label and subscribe button that appears in the channel bar.
|
||||||
*/
|
*/
|
||||||
private final static String REEL_METAPANEL_PATH = "reel_metapanel.eml";
|
private static final String REEL_METAPANEL_PATH = "reel_metapanel.eml";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tags that appears when opening the Shorts player.
|
* Tags that appears when opening the Shorts player.
|
||||||
@@ -52,7 +52,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
private final StringFilterGroup suggestedAction;
|
private final StringFilterGroup suggestedAction;
|
||||||
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();
|
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();
|
||||||
|
|
||||||
private final StringFilterGroup actionBar;
|
private final StringFilterGroup actionButton;
|
||||||
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();
|
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();
|
||||||
|
|
||||||
public ShortsFilter() {
|
public ShortsFilter() {
|
||||||
@@ -156,9 +156,9 @@ public final class ShortsFilter extends Filter {
|
|||||||
"reel_player_disclosure.eml"
|
"reel_player_disclosure.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
actionBar = new StringFilterGroup(
|
actionButton = new StringFilterGroup(
|
||||||
null,
|
null,
|
||||||
"shorts_action_bar"
|
"shorts_video_action_button.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
suggestedAction = new StringFilterGroup(
|
suggestedAction = new StringFilterGroup(
|
||||||
@@ -167,7 +167,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
);
|
);
|
||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
shortsCompactFeedVideoPath, suggestedAction, actionBar, joinButton, subscribeButton,
|
shortsCompactFeedVideoPath, suggestedAction, actionButton, joinButton, subscribeButton,
|
||||||
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel, videoTitle,
|
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel, videoTitle,
|
||||||
reelSoundMetadata, soundButton, infoPanel, stickers, likeFountain
|
reelSoundMetadata, soundButton, infoPanel, stickers, likeFountain
|
||||||
);
|
);
|
||||||
@@ -287,7 +287,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Video action buttons (like, dislike, comment, share, remix) have the same path.
|
// Video action buttons (like, dislike, comment, share, remix) have the same path.
|
||||||
if (matchedGroup == actionBar) {
|
if (matchedGroup == actionButton) {
|
||||||
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
|
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
|
||||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
}
|
}
|
||||||
@@ -416,7 +416,6 @@ public final class ShortsFilter extends Filter {
|
|||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
public static void setNavigationBar(PivotBar view) {
|
public static void setNavigationBar(PivotBar view) {
|
||||||
Logger.printDebug(() -> "Setting navigation bar");
|
|
||||||
pivotBarRef = new WeakReference<>(view);
|
pivotBarRef = new WeakReference<>(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,19 +62,12 @@ public class RememberVideoQualityPatch {
|
|||||||
*/
|
*/
|
||||||
public static int setVideoQuality(Object[] qualities, final int originalQualityIndex, Object qInterface, String qIndexMethod) {
|
public static int setVideoQuality(Object[] qualities, final int originalQualityIndex, Object qInterface, String qIndexMethod) {
|
||||||
try {
|
try {
|
||||||
if (!(qualityNeedsUpdating || userChangedDefaultQuality) || qInterface == null) {
|
final int preferredQuality = Utils.getNetworkType() == NetworkType.MOBILE
|
||||||
return originalQualityIndex;
|
? mobileQualitySetting.get()
|
||||||
}
|
: wifiQualitySetting.get();
|
||||||
qualityNeedsUpdating = false;
|
|
||||||
|
|
||||||
final int preferredQuality;
|
|
||||||
if (Utils.getNetworkType() == NetworkType.MOBILE) {
|
|
||||||
preferredQuality = mobileQualitySetting.get();
|
|
||||||
} else {
|
|
||||||
preferredQuality = wifiQualitySetting.get();
|
|
||||||
}
|
|
||||||
if (!userChangedDefaultQuality && preferredQuality == AUTOMATIC_VIDEO_QUALITY_VALUE) {
|
if (!userChangedDefaultQuality && preferredQuality == AUTOMATIC_VIDEO_QUALITY_VALUE) {
|
||||||
return originalQualityIndex; // nothing to do
|
return originalQualityIndex; // Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoQualities == null || videoQualities.size() != qualities.length) {
|
if (videoQualities == null || videoQualities.size() != qualities.length) {
|
||||||
@@ -87,7 +80,11 @@ public class RememberVideoQualityPatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logger.printDebug(() -> "videoQualities: " + videoQualities);
|
|
||||||
|
// After changing videos the qualities can initially be for the prior video.
|
||||||
|
// So if the qualities have changed an update is needed.
|
||||||
|
qualityNeedsUpdating = true;
|
||||||
|
Logger.printDebug(() -> "VideoQualities: " + videoQualities);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userChangedDefaultQuality) {
|
if (userChangedDefaultQuality) {
|
||||||
@@ -98,7 +95,12 @@ public class RememberVideoQualityPatch {
|
|||||||
return userSelectedQualityIndex;
|
return userSelectedQualityIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find the highest quality that is equal to or less than the preferred
|
if (!qualityNeedsUpdating) {
|
||||||
|
return originalQualityIndex;
|
||||||
|
}
|
||||||
|
qualityNeedsUpdating = false;
|
||||||
|
|
||||||
|
// Find the highest quality that is equal to or less than the preferred.
|
||||||
int qualityToUse = videoQualities.get(0); // first element is automatic mode
|
int qualityToUse = videoQualities.get(0); // first element is automatic mode
|
||||||
int qualityIndexToUse = 0;
|
int qualityIndexToUse = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -112,20 +114,18 @@ public class RememberVideoQualityPatch {
|
|||||||
|
|
||||||
// If the desired quality index is equal to the original index,
|
// If the desired quality index is equal to the original index,
|
||||||
// then the video is already set to the desired default quality.
|
// then the video is already set to the desired default quality.
|
||||||
//
|
final int qualityToUseFinal = qualityToUse;
|
||||||
// The method could return here, but the UI video quality flyout will still
|
|
||||||
// show 'Auto' (ie: Auto (480p))
|
|
||||||
// It appears that "Auto" picks the resolution on video load,
|
|
||||||
// and it does not appear to change the resolution during playback.
|
|
||||||
//
|
|
||||||
// To prevent confusion, set the video index anyways (even if it matches the existing index)
|
|
||||||
// As that will force the UI picker to not display "Auto" which may confuse the user.
|
|
||||||
if (qualityIndexToUse == originalQualityIndex) {
|
if (qualityIndexToUse == originalQualityIndex) {
|
||||||
Logger.printDebug(() -> "Video is already preferred quality: " + preferredQuality);
|
// On first load of a new video, if the UI video quality flyout menu
|
||||||
|
// is not updated then it will still show 'Auto' (ie: Auto (480p)),
|
||||||
|
// even though it's already set to the desired resolution.
|
||||||
|
//
|
||||||
|
// To prevent confusion, set the video index anyways (even if it matches the existing index)
|
||||||
|
// as that will force the UI picker to not display "Auto".
|
||||||
|
Logger.printDebug(() -> "Video is already preferred quality: " + qualityToUseFinal);
|
||||||
} else {
|
} else {
|
||||||
final int qualityToUseLog = qualityToUse;
|
Logger.printDebug(() -> "Changing video quality from: "
|
||||||
Logger.printDebug(() -> "Quality changed from: "
|
+ videoQualities.get(originalQualityIndex) + " to: " + qualityToUseFinal);
|
||||||
+ videoQualities.get(originalQualityIndex) + " to: " + qualityToUseLog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Method m = qInterface.getClass().getMethod(qIndexMethod, Integer.TYPE);
|
Method m = qInterface.getClass().getMethod(qIndexMethod, Integer.TYPE);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.revanced.extension.youtube.patches.playback.speed;
|
package app.revanced.extension.youtube.patches.playback.speed;
|
||||||
|
|
||||||
|
import static app.revanced.extension.shared.StringRef.sf;
|
||||||
import static app.revanced.extension.shared.StringRef.str;
|
import static app.revanced.extension.shared.StringRef.str;
|
||||||
|
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
@@ -10,15 +11,18 @@ import android.view.ViewParent;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import app.revanced.extension.youtube.patches.components.PlaybackSpeedMenuFilterPatch;
|
import java.util.Arrays;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
|
import app.revanced.extension.youtube.patches.components.PlaybackSpeedMenuFilterPatch;
|
||||||
import java.util.Arrays;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class CustomPlaybackSpeedPatch {
|
public class CustomPlaybackSpeedPatch {
|
||||||
|
|
||||||
|
private static final float PLAYBACK_SPEED_AUTO = Settings.PLAYBACK_SPEED_DEFAULT.defaultValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum playback speed, exclusive value. Custom speeds must be less than this value.
|
* Maximum playback speed, exclusive value. Custom speeds must be less than this value.
|
||||||
*
|
*
|
||||||
@@ -26,7 +30,7 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
* and the UI selector starts flickering and acting weird.
|
* and the UI selector starts flickering and acting weird.
|
||||||
* Over 10x and the speeds show up out of order in the UI selector.
|
* Over 10x and the speeds show up out of order in the UI selector.
|
||||||
*/
|
*/
|
||||||
public static final float MAXIMUM_PLAYBACK_SPEED = 8;
|
public static final float PLAYBACK_SPEED_MAXIMUM = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom playback speeds.
|
* Custom playback speeds.
|
||||||
@@ -69,8 +73,8 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (speedFloat >= MAXIMUM_PLAYBACK_SPEED) {
|
if (speedFloat >= PLAYBACK_SPEED_MAXIMUM) {
|
||||||
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", MAXIMUM_PLAYBACK_SPEED));
|
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", PLAYBACK_SPEED_MAXIMUM));
|
||||||
loadCustomSpeeds();
|
loadCustomSpeeds();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -98,10 +102,15 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void initializeListPreference(ListPreference preference) {
|
public static void initializeListPreference(ListPreference preference) {
|
||||||
if (preferenceListEntries == null) {
|
if (preferenceListEntries == null) {
|
||||||
preferenceListEntries = new String[customPlaybackSpeeds.length];
|
final int numberOfEntries = customPlaybackSpeeds.length + 1;
|
||||||
preferenceListEntryValues = new String[customPlaybackSpeeds.length];
|
preferenceListEntries = new String[numberOfEntries];
|
||||||
|
preferenceListEntryValues = new String[numberOfEntries];
|
||||||
|
|
||||||
int i = 0;
|
// Auto speed (same behavior as unpatched).
|
||||||
|
preferenceListEntries[0] = sf("revanced_custom_playback_speeds_auto").toString();
|
||||||
|
preferenceListEntryValues[0] = String.valueOf(PLAYBACK_SPEED_AUTO);
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
for (float speed : customPlaybackSpeeds) {
|
for (float speed : customPlaybackSpeeds) {
|
||||||
String speedString = String.valueOf(speed);
|
String speedString = String.valueOf(speed);
|
||||||
preferenceListEntries[i] = speedString + "x";
|
preferenceListEntries[i] = speedString + "x";
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public final class RememberPlaybackSpeedPatch {
|
|||||||
// With the 0.05x menu, if the speed is set by integrations to higher than 2.0x
|
// With the 0.05x menu, if the speed is set by integrations to higher than 2.0x
|
||||||
// then the menu will allow increasing without bounds but the max speed is
|
// then the menu will allow increasing without bounds but the max speed is
|
||||||
// still capped to under 8.0x.
|
// still capped to under 8.0x.
|
||||||
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.MAXIMUM_PLAYBACK_SPEED - 0.05f);
|
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.PLAYBACK_SPEED_MAXIMUM - 0.05f);
|
||||||
|
|
||||||
// Prevent toast spamming if using the 0.05x adjustments.
|
// Prevent toast spamming if using the 0.05x adjustments.
|
||||||
// Show exactly one toast after the user stops interacting with the speed menu.
|
// Show exactly one toast after the user stops interacting with the speed menu.
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ public class ReturnYouTubeDislikeApi {
|
|||||||
*/
|
*/
|
||||||
private static void randomlyWaitIfLocallyDebugging() {
|
private static void randomlyWaitIfLocallyDebugging() {
|
||||||
final boolean DEBUG_RANDOMLY_DELAY_NETWORK_CALLS = false; // set true to debug UI
|
final boolean DEBUG_RANDOMLY_DELAY_NETWORK_CALLS = false; // set true to debug UI
|
||||||
|
//noinspection ConstantValue
|
||||||
if (DEBUG_RANDOMLY_DELAY_NETWORK_CALLS) {
|
if (DEBUG_RANDOMLY_DELAY_NETWORK_CALLS) {
|
||||||
final long amountOfTimeToWaste = (long) (Math.random()
|
final long amountOfTimeToWaste = (long) (Math.random()
|
||||||
* (API_GET_VOTES_TCP_TIMEOUT_MILLISECONDS + API_GET_VOTES_HTTP_TIMEOUT_MILLISECONDS));
|
* (API_GET_VOTES_TCP_TIMEOUT_MILLISECONDS + API_GET_VOTES_HTTP_TIMEOUT_MILLISECONDS));
|
||||||
@@ -187,6 +188,7 @@ public class ReturnYouTubeDislikeApi {
|
|||||||
*/
|
*/
|
||||||
private static boolean checkIfRateLimitWasHit(int httpResponseCode) {
|
private static boolean checkIfRateLimitWasHit(int httpResponseCode) {
|
||||||
final boolean DEBUG_RATE_LIMIT = false; // set to true, to verify rate limit works
|
final boolean DEBUG_RATE_LIMIT = false; // set to true, to verify rate limit works
|
||||||
|
//noinspection ConstantValue
|
||||||
if (DEBUG_RATE_LIMIT) {
|
if (DEBUG_RATE_LIMIT) {
|
||||||
final double RANDOM_RATE_LIMIT_PERCENTAGE = 0.2; // 20% chance of a triggering a rate limit
|
final double RANDOM_RATE_LIMIT_PERCENTAGE = 0.2; // 20% chance of a triggering a rate limit
|
||||||
if (Math.random() < RANDOM_RATE_LIMIT_PERCENTAGE) {
|
if (Math.random() < RANDOM_RATE_LIMIT_PERCENTAGE) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerH
|
|||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.*;
|
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.*;
|
||||||
import static app.revanced.extension.youtube.patches.SeekbarThumbnailsPatch.SeekbarThumbnailsHighQualityAvailability;
|
import static app.revanced.extension.youtube.patches.SeekbarThumbnailsPatch.SeekbarThumbnailsHighQualityAvailability;
|
||||||
|
import static app.revanced.extension.youtube.patches.VersionCheckPatch.IS_19_17_OR_GREATER;
|
||||||
import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.*;
|
import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.*;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
@@ -23,7 +24,6 @@ import app.revanced.extension.youtube.patches.spoof.SpoofAppVersionPatch;
|
|||||||
import app.revanced.extension.youtube.patches.spoof.SpoofVideoStreamsPatch;
|
import app.revanced.extension.youtube.patches.spoof.SpoofVideoStreamsPatch;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class Settings extends BaseSettings {
|
public class Settings extends BaseSettings {
|
||||||
// Video
|
// Video
|
||||||
public static final BooleanSetting RESTORE_OLD_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_restore_old_video_quality_menu", TRUE);
|
public static final BooleanSetting RESTORE_OLD_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_restore_old_video_quality_menu", TRUE);
|
||||||
@@ -33,7 +33,7 @@ public class Settings extends BaseSettings {
|
|||||||
// Speed
|
// Speed
|
||||||
public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED = new BooleanSetting("revanced_remember_playback_speed_last_selected", FALSE);
|
public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED = new BooleanSetting("revanced_remember_playback_speed_last_selected", FALSE);
|
||||||
public static final BooleanSetting CUSTOM_SPEED_MENU = new BooleanSetting("revanced_custom_speed_menu", TRUE);
|
public static final BooleanSetting CUSTOM_SPEED_MENU = new BooleanSetting("revanced_custom_speed_menu", TRUE);
|
||||||
public static final FloatSetting PLAYBACK_SPEED_DEFAULT = new FloatSetting("revanced_playback_speed_default", 1.0f);
|
public static final FloatSetting PLAYBACK_SPEED_DEFAULT = new FloatSetting("revanced_playback_speed_default", -2.0f);
|
||||||
public static final StringSetting CUSTOM_PLAYBACK_SPEEDS = new StringSetting("revanced_custom_playback_speeds",
|
public static final StringSetting CUSTOM_PLAYBACK_SPEEDS = new StringSetting("revanced_custom_playback_speeds",
|
||||||
"0.25\n0.5\n0.75\n0.9\n0.95\n1.0\n1.05\n1.1\n1.25\n1.5\n1.75\n2.0\n3.0\n4.0\n5.0", true);
|
"0.25\n0.5\n0.75\n0.9\n0.95\n1.0\n1.05\n1.1\n1.25\n1.5\n1.75\n2.0\n3.0\n4.0\n5.0", true);
|
||||||
|
|
||||||
@@ -128,8 +128,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_AUTOPLAY_BUTTON = new BooleanSetting("revanced_hide_autoplay_button", TRUE, true);
|
public static final BooleanSetting HIDE_AUTOPLAY_BUTTON = new BooleanSetting("revanced_hide_autoplay_button", TRUE, true);
|
||||||
public static final BooleanSetting HIDE_CAST_BUTTON = new BooleanSetting("revanced_hide_cast_button", TRUE, true);
|
public static final BooleanSetting HIDE_CAST_BUTTON = new BooleanSetting("revanced_hide_cast_button", TRUE, true);
|
||||||
public static final BooleanSetting HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS = new BooleanSetting("revanced_hide_player_previous_next_buttons", FALSE, true);
|
public static final BooleanSetting HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS = new BooleanSetting("revanced_hide_player_previous_next_buttons", FALSE, true);
|
||||||
@Deprecated
|
private static final BooleanSetting DEPRECATED_HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true);
|
||||||
public static final BooleanSetting HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true);
|
|
||||||
public static final BooleanSetting COPY_VIDEO_URL = new BooleanSetting("revanced_copy_video_url", FALSE);
|
public static final BooleanSetting COPY_VIDEO_URL = new BooleanSetting("revanced_copy_video_url", FALSE);
|
||||||
public static final BooleanSetting COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_copy_video_url_timestamp", TRUE);
|
public static final BooleanSetting COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_copy_video_url_timestamp", TRUE);
|
||||||
public static final BooleanSetting PLAYBACK_SPEED_DIALOG_BUTTON = new BooleanSetting("revanced_playback_speed_dialog_button", FALSE);
|
public static final BooleanSetting PLAYBACK_SPEED_DIALOG_BUTTON = new BooleanSetting("revanced_playback_speed_dialog_button", FALSE);
|
||||||
@@ -192,14 +191,13 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_SLEEP_TIMER = new BooleanSetting("revanced_hide_player_flyout_sleep_timer", FALSE);
|
public static final BooleanSetting HIDE_PLAYER_FLYOUT_SLEEP_TIMER = new BooleanSetting("revanced_hide_player_flyout_sleep_timer", FALSE);
|
||||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_STABLE_VOLUME = new BooleanSetting("revanced_hide_player_flyout_stable_volume", FALSE);
|
public static final BooleanSetting HIDE_PLAYER_FLYOUT_STABLE_VOLUME = new BooleanSetting("revanced_hide_player_flyout_stable_volume", FALSE);
|
||||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_WATCH_IN_VR = new BooleanSetting("revanced_hide_player_flyout_watch_in_vr", TRUE);
|
public static final BooleanSetting HIDE_PLAYER_FLYOUT_WATCH_IN_VR = new BooleanSetting("revanced_hide_player_flyout_watch_in_vr", TRUE);
|
||||||
@Deprecated
|
|
||||||
private static final BooleanSetting DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_video_quality_menu_footer", FALSE);
|
private static final BooleanSetting DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_video_quality_menu_footer", FALSE);
|
||||||
public static final BooleanSetting HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_player_flyout_video_quality_footer", FALSE);
|
public static final BooleanSetting HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_player_flyout_video_quality_footer", FALSE);
|
||||||
|
|
||||||
// General layout
|
// General layout
|
||||||
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
||||||
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
||||||
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", "17.41.37", true, parent(SPOOF_APP_VERSION));
|
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", IS_19_17_OR_GREATER ? "18.38.44" : "17.33.42", true, parent(SPOOF_APP_VERSION));
|
||||||
public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
||||||
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
||||||
public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
|
public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
|
||||||
@@ -235,7 +233,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_SHORTS_UPCOMING_BUTTON = new BooleanSetting("revanced_hide_shorts_upcoming_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_UPCOMING_BUTTON = new BooleanSetting("revanced_hide_shorts_upcoming_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", FALSE);
|
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_STICKERS = new BooleanSetting("revanced_hide_shorts_stickers", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_STICKERS = new BooleanSetting("revanced_hide_shorts_stickers", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_SUPER_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_super_thanks_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_SUPER_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_super_thanks_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_LIKE_FOUNTAIN = new BooleanSetting("revanced_hide_shorts_like_fountain", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_LIKE_FOUNTAIN = new BooleanSetting("revanced_hide_shorts_like_fountain", TRUE);
|
||||||
@@ -378,12 +376,12 @@ public class Settings extends BaseSettings {
|
|||||||
migrateOldSettingToNew(DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING, SB_PRIVATE_USER_ID);
|
migrateOldSettingToNew(DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING, SB_PRIVATE_USER_ID);
|
||||||
|
|
||||||
// Old spoof versions that no longer work reliably.
|
// Old spoof versions that no longer work reliably.
|
||||||
if (SpoofAppVersionPatch.isSpoofingToLessThan("17.33.00")) {
|
if (SpoofAppVersionPatch.isSpoofingToLessThan(SPOOF_APP_VERSION_TARGET.defaultValue)) {
|
||||||
Logger.printInfo(() -> "Resetting spoof app version target");
|
Logger.printInfo(() -> "Resetting spoof app version target");
|
||||||
Settings.SPOOF_APP_VERSION_TARGET.resetToDefault();
|
SPOOF_APP_VERSION_TARGET.resetToDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
migrateOldSettingToNew(HIDE_PLAYER_BUTTONS, HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS);
|
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_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER, HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER);
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ enum class PlayerType {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private val nameToPlayerType = values().associateBy { it.name }
|
private val nameToPlayerType = PlayerType.entries.associateBy { it.name }
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setFromString(enumName: String) {
|
fun setFromString(enumName: String) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ enum class VideoState {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private val nameToVideoState = values().associateBy { it.name }
|
private val nameToVideoState = VideoState.entries.associateBy { it.name }
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setFromString(enumName: String) {
|
fun setFromString(enumName: String) {
|
||||||
|
|||||||
@@ -382,7 +382,6 @@ public class SponsorBlockUtils {
|
|||||||
return statsNumberFormatter.format(viewCount);
|
return statsNumberFormatter.format(viewCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("ConstantConditions")
|
|
||||||
private static long parseSegmentTime(@NonNull String time) {
|
private static long parseSegmentTime(@NonNull String time) {
|
||||||
Matcher matcher = manualEditTimePattern.matcher(time);
|
Matcher matcher = manualEditTimePattern.matcher(time);
|
||||||
if (!matcher.matches()) {
|
if (!matcher.matches()) {
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ public class SBRequester {
|
|||||||
// Could benefit from:
|
// Could benefit from:
|
||||||
// 1) collection of YouTube videos with test segment times (verify client skip timing matches the video, verify seekbar draws correctly)
|
// 1) collection of YouTube videos with test segment times (verify client skip timing matches the video, verify seekbar draws correctly)
|
||||||
// 2) unit tests (verify everything else)
|
// 2) unit tests (verify everything else)
|
||||||
|
//noinspection ConstantValue
|
||||||
if (false) {
|
if (false) {
|
||||||
segments.clear();
|
segments.clear();
|
||||||
// Test auto-hide skip button:
|
// Test auto-hide skip button:
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package app.revanced.extension.youtube.sponsorblock.ui;
|
package app.revanced.extension.youtube.sponsorblock.ui;
|
||||||
|
|
||||||
import static app.revanced.extension.shared.Utils.getResourceIdentifier;
|
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
|||||||
@@ -107,12 +107,13 @@ public final class NewSegmentLayout extends FrameLayout {
|
|||||||
*/
|
*/
|
||||||
private void initializeButton(final Context context, final String resourceIdentifierName,
|
private void initializeButton(final Context context, final String resourceIdentifierName,
|
||||||
final ButtonOnClickHandlerFunction handler, final String debugMessage) {
|
final ButtonOnClickHandlerFunction handler, final String debugMessage) {
|
||||||
final ImageButton button = findViewById(getResourceIdentifier(context, resourceIdentifierName, "id"));
|
ImageButton button = findViewById(getResourceIdentifier(context, resourceIdentifierName, "id"));
|
||||||
|
|
||||||
// Add ripple effect
|
|
||||||
button.setBackgroundResource(rippleEffectId);
|
button.setBackgroundResource(rippleEffectId);
|
||||||
RippleDrawable rippleDrawable = (RippleDrawable) button.getBackground();
|
RippleDrawable rippleDrawable = new RippleDrawable(
|
||||||
rippleDrawable.setColor(rippleColorStateList);
|
rippleColorStateList, null, null
|
||||||
|
);
|
||||||
|
button.setBackground(rippleDrawable);
|
||||||
|
|
||||||
button.setOnClickListener((v) -> {
|
button.setOnClickListener((v) -> {
|
||||||
handler.apply();
|
handler.apply();
|
||||||
@@ -121,7 +122,7 @@ public final class NewSegmentLayout extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface ButtonOnClickHandlerFunction {
|
private interface ButtonOnClickHandlerFunction {
|
||||||
void apply();
|
void apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package app.revanced.extension.youtube.sponsorblock.ui;
|
package app.revanced.extension.youtube.sponsorblock.ui;
|
||||||
|
|
||||||
import static app.revanced.extension.shared.Utils.getResourceIdentifier;
|
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import android.os.Handler
|
|||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.HapticFeedbackConstants
|
import android.view.HapticFeedbackConstants
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import app.revanced.extension.shared.StringRef.str
|
import app.revanced.extension.shared.StringRef.str
|
||||||
@@ -59,8 +57,8 @@ class SwipeControlsOverlayLayout(
|
|||||||
val compoundIconPadding = 4.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP)
|
val compoundIconPadding = 4.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP)
|
||||||
feedbackTextView = TextView(context).apply {
|
feedbackTextView = TextView(context).apply {
|
||||||
layoutParams = LayoutParams(
|
layoutParams = LayoutParams(
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
LayoutParams.WRAP_CONTENT,
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
LayoutParams.WRAP_CONTENT,
|
||||||
).apply {
|
).apply {
|
||||||
addRule(CENTER_IN_PARENT, TRUE)
|
addRule(CENTER_IN_PARENT, TRUE)
|
||||||
setPadding(
|
setPadding(
|
||||||
@@ -91,7 +89,7 @@ class SwipeControlsOverlayLayout(
|
|||||||
|
|
||||||
private val feedbackHideHandler = Handler(Looper.getMainLooper())
|
private val feedbackHideHandler = Handler(Looper.getMainLooper())
|
||||||
private val feedbackHideCallback = Runnable {
|
private val feedbackHideCallback = Runnable {
|
||||||
feedbackTextView.visibility = View.GONE
|
feedbackTextView.visibility = GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 5.0.0-dev.2
|
version = 5.1.0-dev.2
|
||||||
|
|||||||
@@ -1444,10 +1444,12 @@ public final class app/revanced/util/BytecodeUtilsKt {
|
|||||||
public static final fun indexOfFirstInstructionOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
public static final fun indexOfFirstInstructionOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
||||||
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
||||||
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
|
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
|
||||||
|
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
||||||
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
||||||
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
|
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
|
||||||
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
||||||
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
|
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
|
||||||
|
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
||||||
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
|
||||||
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
|
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
|
||||||
public static synthetic fun indexOfFirstInstructionReversedOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
public static synthetic fun indexOfFirstInstructionReversedOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
package app.revanced.patches.facebook.ads.mainfeed
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint
|
import app.revanced.patcher.fingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||||
import baseModelMapperFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction31i
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction31i
|
||||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
||||||
import getSponsoredDataModelTemplateFingerprint
|
|
||||||
import getStoryVisibilityFingerprint
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val hideSponsoredStoriesPatch = bytecodePatch(
|
val hideSponsoredStoriesPatch = bytecodePatch(
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val enableCustomTabsPatch = bytecodePatch(
|
val enableCustomTabsPatch = bytecodePatch(
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val restoreHiddenBackUpWhileChargingTogglePatch = bytecodePatch(
|
val restoreHiddenBackUpWhileChargingTogglePatch = bytecodePatch(
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val removeDeviceRestrictionsPatch = bytecodePatch(
|
val removeDeviceRestrictionsPatch = bytecodePatch(
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val disableSwitchingEmojiToStickerPatch = bytecodePatch(
|
val disableSwitchingEmojiToStickerPatch = bytecodePatch(
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hideGetPremiumPatch = bytecodePatch(
|
val hideGetPremiumPatch = bytecodePatch(
|
||||||
name = "Hide 'Get Music Premium' label",
|
name = "Hide 'Get Music Premium' label",
|
||||||
description = "Hides the \"Get Music Premium\" label from the account menu and settings.",
|
description = "Hides the \"Get Music Premium\" label from the account menu and settings.",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val backgroundPlaybackPatch = bytecodePatch(
|
val backgroundPlaybackPatch = bytecodePatch(
|
||||||
name = "Remove background playback restrictions",
|
name = "Remove background playback restrictions",
|
||||||
description = "Removes restrictions on background playback, including playing kids videos in the background.",
|
description = "Removes restrictions on background playback, including playing kids videos in the background.",
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ val disablePiracyDetectionPatch = bytecodePatch(
|
|||||||
execute {
|
execute {
|
||||||
// Do not throw an error if the fingerprint is not resolved.
|
// Do not throw an error if the fingerprint is not resolved.
|
||||||
// This is fine because new versions of the target app do not need this patch.
|
// This is fine because new versions of the target app do not need this patch.
|
||||||
piracyDetectionFingerprint.method.addInstruction(0, "return-void")
|
piracyDetectionFingerprint.methodOrNull?.addInstruction(0, "return-void")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package app.revanced.patches.reddit.customclients.sync.detection.piracy
|
package app.revanced.patches.reddit.customclients.sync.detection.piracy
|
||||||
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.instructions
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import app.revanced.patcher.fingerprint
|
import app.revanced.patcher.fingerprint
|
||||||
|
import app.revanced.util.getReference
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||||
|
|
||||||
internal val piracyDetectionFingerprint = fingerprint {
|
internal val piracyDetectionFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||||
@@ -16,12 +18,9 @@ internal val piracyDetectionFingerprint = fingerprint {
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
)
|
)
|
||||||
custom { method, _ ->
|
custom { method, _ ->
|
||||||
method.implementation?.instructions?.any {
|
method.implementation ?: return@custom false
|
||||||
if (it.opcode != Opcode.NEW_INSTANCE) return@any false
|
method.instructions.any {
|
||||||
|
it.getReference<Reference>()?.toString() == "Lcom/github/javiersantos/piracychecker/PiracyChecker;"
|
||||||
val reference = (it as ReferenceInstruction).reference
|
}
|
||||||
|
|
||||||
reference.toString() == "Lcom/github/javiersantos/piracychecker/PiracyChecker;"
|
|
||||||
} == true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,20 +63,20 @@ val spoofClientPatch = spoofClientPatch(
|
|||||||
val randomName = (0..100000).random()
|
val randomName = (0..100000).random()
|
||||||
val userAgent = "$randomName:app.revanced.$randomName:v1.0.0 (by /u/revanced)"
|
val userAgent = "$randomName:app.revanced.$randomName:v1.0.0 (by /u/revanced)"
|
||||||
|
|
||||||
imgurImageAPIFingerprint.method.replaceInstruction(
|
getUserAgentFingerprint.method.replaceInstruction(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const-string v0, "$userAgent"
|
const-string v0, "$userAgent"
|
||||||
return-object v0
|
return-object v0
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Patch Imgur API URL.
|
// region Patch Imgur API URL.
|
||||||
|
|
||||||
val apiUrlIndex = getUserAgentFingerprint.stringMatches!!.first().index
|
val apiUrlIndex = imgurImageAPIFingerprint.stringMatches!!.first().index
|
||||||
getUserAgentFingerprint.method.replaceInstruction(
|
imgurImageAPIFingerprint.method.replaceInstruction(
|
||||||
apiUrlIndex,
|
apiUrlIndex,
|
||||||
"const-string v1, \"https://api.imgur.com/3/image\"",
|
"const-string v1, \"https://api.imgur.com/3/image\"",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.reddit.customclients.RESOLVE_S_LINK_METHOD
|
import app.revanced.patches.reddit.customclients.RESOLVE_S_LINK_METHOD
|
||||||
import app.revanced.patches.reddit.customclients.SET_ACCESS_TOKEN_METHOD
|
import app.revanced.patches.reddit.customclients.SET_ACCESS_TOKEN_METHOD
|
||||||
import app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.getOAuthAccessTokenFingerprint
|
|
||||||
import app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.handleNavigationFingerprint
|
|
||||||
import app.revanced.patches.reddit.customclients.fixSLinksPatch
|
import app.revanced.patches.reddit.customclients.fixSLinksPatch
|
||||||
import app.revanced.patches.reddit.customclients.sync.syncforreddit.extension.sharedExtensionPatch
|
import app.revanced.patches.reddit.customclients.sync.syncforreddit.extension.sharedExtensionPatch
|
||||||
|
|
||||||
@@ -26,7 +24,7 @@ val fixSLinksPatch = fixSLinksPatch(
|
|||||||
execute {
|
execute {
|
||||||
// region Patch navigation handler.
|
// region Patch navigation handler.
|
||||||
|
|
||||||
handleNavigationFingerprint.method.apply {
|
linkHelperOpenLinkFingerprint.method.apply {
|
||||||
val urlRegister = "p3"
|
val urlRegister = "p3"
|
||||||
val tempRegister = "v2"
|
val tempRegister = "v2"
|
||||||
|
|
||||||
@@ -46,7 +44,7 @@ val fixSLinksPatch = fixSLinksPatch(
|
|||||||
|
|
||||||
// region Patch set access token.
|
// region Patch set access token.
|
||||||
|
|
||||||
getOAuthAccessTokenFingerprint.method.addInstruction(
|
setAuthorizationHeaderFingerprint.method.addInstruction(
|
||||||
0,
|
0,
|
||||||
"invoke-static { p0 }, $EXTENSION_CLASS_DESCRIPTOR->$SET_ACCESS_TOKEN_METHOD",
|
"invoke-static { p0 }, $EXTENSION_CLASS_DESCRIPTOR->$SET_ACCESS_TOKEN_METHOD",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ fun sharedExtensionPatch(
|
|||||||
extendWith("extensions/shared.rve")
|
extendWith("extensions/shared.rve")
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
if (classBy { EXTENSION_CLASS_DESCRIPTOR in it.type } == null) {
|
if (classes.none { EXTENSION_CLASS_DESCRIPTOR == it.type }) {
|
||||||
throw PatchException(
|
throw PatchException(
|
||||||
"Shared extension has not been merged yet. This patch can not succeed without merging it.",
|
"Shared extension has not been merged yet. This patch can not succeed without merging it.",
|
||||||
)
|
)
|
||||||
@@ -35,7 +35,7 @@ fun sharedExtensionPatch(
|
|||||||
*/
|
*/
|
||||||
fun getCurrentJarFilePath(): String {
|
fun getCurrentJarFilePath(): String {
|
||||||
val className = object {}::class.java.enclosingClass.name.replace('.', '/') + ".class"
|
val className = object {}::class.java.enclosingClass.name.replace('.', '/') + ".class"
|
||||||
val classUrl = object {}::class.java.classLoader.getResource(className)
|
val classUrl = object {}::class.java.classLoader?.getResource(className)
|
||||||
if (classUrl != null) {
|
if (classUrl != null) {
|
||||||
val urlString = classUrl.toString()
|
val urlString = classUrl.toString()
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ internal val createTabsFingerprint = fingerprint {
|
|||||||
if (reference.definingClass != ACTIVITY_TAB_DESCRIPTOR) return@any false
|
if (reference.definingClass != ACTIVITY_TAB_DESCRIPTOR) return@any false
|
||||||
if (reference.returnType != "[${ACTIVITY_TAB_DESCRIPTOR}") return@any false
|
if (reference.returnType != "[${ACTIVITY_TAB_DESCRIPTOR}") return@any false
|
||||||
true
|
true
|
||||||
} ?: false
|
} == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ internal val showNotificationFingerprint = fingerprint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
} ?: false
|
} == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch
|
import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.settingsPatch
|
||||||
import app.revanced.patches.tiktok.misc.settings.settingsStatusLoadFingerprint
|
import app.revanced.patches.tiktok.misc.settings.settingsStatusLoadFingerprint
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
|
||||||
import app.revanced.util.findMutableMethodOf
|
import app.revanced.util.findMutableMethodOf
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val audioAdsPatch = bytecodePatch(
|
val audioAdsPatch = bytecodePatch(
|
||||||
name = "Block audio ads",
|
name = "Block audio ads",
|
||||||
description = "Blocks audio ads in streams and VODs.",
|
description = "Blocks audio ads in streams and VODs.",
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val embeddedAdsPatch = bytecodePatch(
|
val embeddedAdsPatch = bytecodePatch(
|
||||||
name = "Block embedded ads",
|
name = "Block embedded ads",
|
||||||
description = "Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.",
|
description = "Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.",
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val showDeletedMessagesPatch = bytecodePatch(
|
val showDeletedMessagesPatch = bytecodePatch(
|
||||||
name = "Show deleted messages",
|
name = "Show deleted messages",
|
||||||
description = "Shows deleted chat messages behind a clickable spoiler.",
|
description = "Shows deleted chat messages behind a clickable spoiler.",
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
|||||||
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val autoClaimChannelPointsPatch = bytecodePatch(
|
val autoClaimChannelPointsPatch = bytecodePatch(
|
||||||
name = "Auto claim channel points",
|
name = "Auto claim channel points",
|
||||||
description = "Automatically claim Channel Points.",
|
description = "Automatically claim Channel Points.",
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
import app.revanced.patches.twitch.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val debugModePatch = bytecodePatch(
|
val debugModePatch = bytecodePatch(
|
||||||
name = "Debug mode",
|
name = "Debug mode",
|
||||||
description = "Enables Twitch's internal debugging mode.",
|
description = "Enables Twitch's internal debugging mode.",
|
||||||
|
|||||||
@@ -47,18 +47,22 @@ val jsonHookPatch = bytecodePatch(
|
|||||||
dependsOn(sharedExtensionPatch)
|
dependsOn(sharedExtensionPatch)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
val jsonFactoryClassDef = jsonHookPatchFingerprint.apply {
|
jsonHookPatchFingerprint.apply {
|
||||||
// Make sure the extension is present.
|
// Make sure the extension is present.
|
||||||
val jsonHookPatch = classBy { classDef -> classDef.type == JSON_HOOK_PATCH_CLASS_DESCRIPTOR }
|
val jsonHookPatch = classBy { classDef -> classDef.type == JSON_HOOK_PATCH_CLASS_DESCRIPTOR }
|
||||||
?: throw PatchException("Could not find the extension.")
|
?: throw PatchException("Could not find the extension.")
|
||||||
|
|
||||||
matchOrNull(jsonHookPatch.immutableClass)
|
matchOrNull(jsonHookPatch.immutableClass)
|
||||||
?: throw PatchException("Unexpected extension.")
|
?: throw PatchException("Unexpected extension.")
|
||||||
}.originalClassDef // Conveniently find the type to hook a method in, via a named field.
|
}
|
||||||
.fields
|
|
||||||
.firstOrNull { it.name == "JSON_FACTORY" }
|
val jsonFactoryClassDef =
|
||||||
?.type
|
loganSquareFingerprint.originalClassDef // Conveniently find the type to hook a method in, via a named field.
|
||||||
.let { type -> classes.find { it.type == type } } ?: throw PatchException("Could not find required class.")
|
.fields
|
||||||
|
.firstOrNull { it.name == "JSON_FACTORY" }
|
||||||
|
?.type
|
||||||
|
.let { type -> classes.find { it.type == type } }
|
||||||
|
?: throw PatchException("Could not find required class.")
|
||||||
|
|
||||||
// Hook the methods first parameter.
|
// Hook the methods first parameter.
|
||||||
jsonInputStreamFingerprint.match(jsonFactoryClassDef).method.addInstructions(
|
jsonInputStreamFingerprint.match(jsonFactoryClassDef).method.addInstructions(
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import app.revanced.patcher.patch.stringOption
|
|||||||
import app.revanced.patches.shared.misc.mapping.get
|
import app.revanced.patches.shared.misc.mapping.get
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||||
|
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
|
||||||
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
@@ -39,7 +40,10 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
|||||||
name = "Change link sharing domain",
|
name = "Change link sharing domain",
|
||||||
description = "Replaces the domain name of Twitter links when sharing them.",
|
description = "Replaces the domain name of Twitter links when sharing them.",
|
||||||
) {
|
) {
|
||||||
dependsOn(changeLinkSharingDomainResourcePatch)
|
dependsOn(
|
||||||
|
changeLinkSharingDomainResourcePatch,
|
||||||
|
sharedExtensionPatch,
|
||||||
|
)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith("com.twitter.android")
|
||||||
|
|
||||||
@@ -52,7 +56,6 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
|
|
||||||
val replacementIndex =
|
val replacementIndex =
|
||||||
linkSharingDomainFingerprint.stringMatches!!.first().index
|
linkSharingDomainFingerprint.stringMatches!!.first().index
|
||||||
val domainRegister =
|
val domainRegister =
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package app.revanced.patches.twitter.misc.links
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val openLinksWithAppChooserPatch = bytecodePatch(
|
val openLinksWithAppChooserPatch = bytecodePatch(
|
||||||
@@ -10,6 +11,8 @@ val openLinksWithAppChooserPatch = bytecodePatch(
|
|||||||
"As a result you can select a browser to open the link with.",
|
"As a result you can select a browser to open the link with.",
|
||||||
use = false,
|
use = false,
|
||||||
) {
|
) {
|
||||||
|
dependsOn(sharedExtensionPatch)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android"("10.48.0-release.0"))
|
compatibleWith("com.twitter.android"("10.48.0-release.0"))
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ val hideAdsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ val hideGetPremiumPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val videoAdsPatch = bytecodePatch(
|
val videoAdsPatch = bytecodePatch(
|
||||||
name = "Video ads",
|
name = "Video ads",
|
||||||
description = "Adds an option to remove ads in the video player.",
|
description = "Adds an option to remove ads in the video player.",
|
||||||
@@ -30,6 +29,7 @@ val videoAdsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ val copyVideoUrlPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
|||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val removeViewerDiscretionDialogPatch = bytecodePatch(
|
val removeViewerDiscretionDialogPatch = bytecodePatch(
|
||||||
name = "Remove viewer discretion dialog",
|
name = "Remove viewer discretion dialog",
|
||||||
description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " +
|
description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " +
|
||||||
@@ -31,6 +30,7 @@ val removeViewerDiscretionDialogPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ val downloadsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val disablePreciseSeekingGesturePatch = bytecodePatch(
|
val disablePreciseSeekingGesturePatch = bytecodePatch(
|
||||||
name = "Disable precise seeking gesture",
|
name = "Disable precise seeking gesture",
|
||||||
description = "Adds an option to disable precise seeking when swiping up on the seekbar.",
|
description = "Adds an option to disable precise seeking when swiping up on the seekbar.",
|
||||||
@@ -30,6 +29,7 @@ val disablePreciseSeekingGesturePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val enableSeekbarTappingPatch = bytecodePatch(
|
val enableSeekbarTappingPatch = bytecodePatch(
|
||||||
name = "Seekbar tapping",
|
name = "Seekbar tapping",
|
||||||
description = "Adds an option to enable tap-to-seek on the seekbar of the video player.",
|
description = "Adds an option to enable tap-to-seek on the seekbar of the video player.",
|
||||||
@@ -33,6 +32,7 @@ val enableSeekbarTappingPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,10 @@ import app.revanced.util.getReference
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
internal const val EXTENSION_METHOD_DESCRIPTOR =
|
internal const val EXTENSION_METHOD_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/SlideToSeekPatch;->isSlideToSeekDisabled(Z)Z"
|
"Lapp/revanced/extension/youtube/patches/SlideToSeekPatch;->isSlideToSeekDisabled(Z)Z"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val enableSlideToSeekPatch = bytecodePatch(
|
val enableSlideToSeekPatch = bytecodePatch(
|
||||||
name = "Enable slide to seek",
|
name = "Enable slide to seek",
|
||||||
description = "Adds an option to enable slide to seek " +
|
description = "Adds an option to enable slide to seek " +
|
||||||
@@ -44,6 +42,7 @@ val enableSlideToSeekPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/SeekbarThumbnailsPatch;"
|
"Lapp/revanced/extension/youtube/patches/SeekbarThumbnailsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val seekbarThumbnailsPatch = bytecodePatch(
|
val seekbarThumbnailsPatch = bytecodePatch(
|
||||||
name = "Seekbar thumbnails",
|
name = "Seekbar thumbnails",
|
||||||
description = "Adds an option to use high quality fullscreen seekbar thumbnails. " +
|
description = "Adds an option to use high quality fullscreen seekbar thumbnails. " +
|
||||||
@@ -36,6 +35,7 @@ val seekbarThumbnailsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ val swipeControlsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
|||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import app.revanced.patches.youtube.shared.subtitleButtonControllerFingerprint
|
import app.revanced.patches.youtube.shared.subtitleButtonControllerFingerprint
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val autoCaptionsPatch = bytecodePatch(
|
val autoCaptionsPatch = bytecodePatch(
|
||||||
name = "Disable auto captions",
|
name = "Disable auto captions",
|
||||||
description = "Adds an option to disable captions from being automatically enabled.",
|
description = "Adds an option to disable captions from being automatically enabled.",
|
||||||
@@ -29,6 +28,7 @@ val autoCaptionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,17 @@ val customBrandingPatch = resourcePatch(
|
|||||||
) {
|
) {
|
||||||
dependsOn(versionCheckPatch)
|
dependsOn(versionCheckPatch)
|
||||||
|
|
||||||
compatibleWith("com.google.android.youtube")
|
compatibleWith(
|
||||||
|
"com.google.android.youtube"(
|
||||||
|
"18.38.44",
|
||||||
|
"18.49.37",
|
||||||
|
"19.16.39",
|
||||||
|
"19.25.37",
|
||||||
|
"19.34.42",
|
||||||
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
val appName by stringOption(
|
val appName by stringOption(
|
||||||
key = "appName",
|
key = "appName",
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package app.revanced.patches.youtube.layout.branding.header
|
|||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.resourcePatch
|
import app.revanced.patcher.patch.resourcePatch
|
||||||
import app.revanced.patcher.patch.stringOption
|
import app.revanced.patcher.patch.stringOption
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_19_25_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.util.ResourceGroup
|
import app.revanced.util.ResourceGroup
|
||||||
import app.revanced.util.Utils.trimIndentMultiline
|
import app.revanced.util.Utils.trimIndentMultiline
|
||||||
import app.revanced.util.copyResources
|
import app.revanced.util.copyResources
|
||||||
|
import app.revanced.util.findElementByAttributeValueOrThrow
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
private const val HEADER_FILE_NAME = "yt_wordmark_header"
|
private const val HEADER_FILE_NAME = "yt_wordmark_header"
|
||||||
@@ -34,7 +37,19 @@ val changeHeaderPatch = resourcePatch(
|
|||||||
description = "Applies a custom header in the top left corner within the app. Defaults to the ReVanced header.",
|
description = "Applies a custom header in the top left corner within the app. Defaults to the ReVanced header.",
|
||||||
use = false,
|
use = false,
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.google.android.youtube")
|
dependsOn(versionCheckPatch)
|
||||||
|
|
||||||
|
compatibleWith(
|
||||||
|
"com.google.android.youtube"(
|
||||||
|
"18.38.44",
|
||||||
|
"18.49.37",
|
||||||
|
"19.16.39",
|
||||||
|
"19.25.37",
|
||||||
|
"19.34.42",
|
||||||
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
val header by stringOption(
|
val header by stringOption(
|
||||||
key = "header",
|
key = "header",
|
||||||
@@ -79,7 +94,7 @@ val changeHeaderPatch = resourcePatch(
|
|||||||
/**
|
/**
|
||||||
* A function that overwrites both header variants in the target resource directories.
|
* A function that overwrites both header variants in the target resource directories.
|
||||||
*/
|
*/
|
||||||
val overwriteFromTo: (String, String) -> Unit = { from: String, to: String ->
|
fun overwriteFromTo(from: String, to: String) {
|
||||||
targetResourceDirectories.forEach { directory ->
|
targetResourceDirectories.forEach { directory ->
|
||||||
variants.forEach { variant ->
|
variants.forEach { variant ->
|
||||||
val fromPath = directory.resolve("${from}_$variant.png")
|
val fromPath = directory.resolve("${from}_$variant.png")
|
||||||
@@ -91,23 +106,28 @@ val changeHeaderPatch = resourcePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Functions to overwrite the header to the different variants.
|
// Functions to overwrite the header to the different variants.
|
||||||
val toPremium = { overwriteFromTo(PREMIUM_HEADER_FILE_NAME, HEADER_FILE_NAME) }
|
fun toPremium() { overwriteFromTo(PREMIUM_HEADER_FILE_NAME, HEADER_FILE_NAME) }
|
||||||
val toHeader = { overwriteFromTo(HEADER_FILE_NAME, PREMIUM_HEADER_FILE_NAME) }
|
fun toHeader() { overwriteFromTo(HEADER_FILE_NAME, PREMIUM_HEADER_FILE_NAME) }
|
||||||
val toReVanced = {
|
fun toReVanced() {
|
||||||
// Copy the ReVanced header to the resource directories.
|
// Copy the ReVanced header to the resource directories.
|
||||||
targetResourceFiles.forEach { copyResources("change-header/revanced", it) }
|
targetResourceFiles.forEach { copyResources("change-header/revanced", it) }
|
||||||
|
|
||||||
// Overwrite the premium with the custom header as well.
|
// Overwrite the premium with the custom header as well.
|
||||||
toHeader()
|
toHeader()
|
||||||
}
|
}
|
||||||
val toReVancedBorderless = {
|
fun toReVancedBorderless() {
|
||||||
// Copy the ReVanced borderless header to the resource directories.
|
// Copy the ReVanced borderless header to the resource directories.
|
||||||
targetResourceFiles.forEach { copyResources("change-header/revanced-borderless", it) }
|
targetResourceFiles.forEach {
|
||||||
|
copyResources(
|
||||||
|
"change-header/revanced-borderless",
|
||||||
|
it
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// Overwrite the premium with the custom header as well.
|
// Overwrite the premium with the custom header as well.
|
||||||
toHeader()
|
toHeader()
|
||||||
}
|
}
|
||||||
val toCustom = {
|
fun toCustom() {
|
||||||
val sourceFolders = File(header!!).listFiles { file -> file.isDirectory }
|
val sourceFolders = File(header!!).listFiles { file -> file.isDirectory }
|
||||||
?: throw PatchException("The provided path is not a directory: $header")
|
?: throw PatchException("The provided path is not a directory: $header")
|
||||||
|
|
||||||
@@ -136,11 +156,42 @@ val changeHeaderPatch = resourcePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
when (header) {
|
when (header) {
|
||||||
HEADER_OPTION -> toHeader
|
HEADER_OPTION -> toHeader()
|
||||||
PREMIUM_HEADER_OPTION -> toPremium
|
PREMIUM_HEADER_OPTION -> toPremium()
|
||||||
REVANCED_HEADER_OPTION -> toReVanced
|
REVANCED_HEADER_OPTION -> toReVanced()
|
||||||
REVANCED_BORDERLESS_HEADER_OPTION -> toReVancedBorderless
|
REVANCED_BORDERLESS_HEADER_OPTION -> toReVancedBorderless()
|
||||||
else -> toCustom
|
else -> toCustom()
|
||||||
}()
|
}
|
||||||
|
|
||||||
|
// Fix 19.25+ A/B layout with different header icons:
|
||||||
|
// yt_ringo2_wordmark_header, yt_ringo2_premium_wordmark_header
|
||||||
|
//
|
||||||
|
// These images are webp and not png, so overwriting them is not so simple.
|
||||||
|
// Instead change styles.xml to use the old drawable resources.
|
||||||
|
if (is_19_25_or_greater) {
|
||||||
|
document("res/values/styles.xml").use { document ->
|
||||||
|
arrayOf(
|
||||||
|
"CairoLightThemeRingo2Updates" to variants[0],
|
||||||
|
"CairoDarkThemeRingo2Updates" to variants[1]
|
||||||
|
).forEach { (styleName, theme) ->
|
||||||
|
val style = document.childNodes.findElementByAttributeValueOrThrow(
|
||||||
|
"name",
|
||||||
|
styleName,
|
||||||
|
)
|
||||||
|
|
||||||
|
val drawable = "@drawable/${HEADER_FILE_NAME}_${theme}"
|
||||||
|
|
||||||
|
arrayOf(
|
||||||
|
"ytWordmarkHeader",
|
||||||
|
"ytPremiumWordmarkHeader"
|
||||||
|
).forEach { itemName ->
|
||||||
|
style.childNodes.findElementByAttributeValueOrThrow(
|
||||||
|
"name",
|
||||||
|
itemName,
|
||||||
|
).textContent = drawable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import app.revanced.patches.youtube.misc.litho.filter.addLithoFilter
|
|||||||
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hideButtonsPatch = resourcePatch(
|
val hideButtonsPatch = resourcePatch(
|
||||||
name = "Hide video action buttons",
|
name = "Hide video action buttons",
|
||||||
description = "Adds options to hide action buttons (such as the Download button) under videos.",
|
description = "Adds options to hide action buttons (such as the Download button) under videos.",
|
||||||
@@ -29,6 +28,7 @@ val hideButtonsPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import app.revanced.util.indexOfFirstInstructionOrThrow
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
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.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
internal const val EXTENSION_CLASS_DESCRIPTOR =
|
internal const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/NavigationButtonsPatch;"
|
"Lapp/revanced/extension/youtube/patches/NavigationButtonsPatch;"
|
||||||
@@ -43,6 +42,7 @@ val navigationButtonsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ val hideEndscreenCardsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
internal const val EXTENSION_CLASS_DESCRIPTOR =
|
internal const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/DisableFullscreenAmbientModePatch;"
|
"Lapp/revanced/extension/youtube/patches/DisableFullscreenAmbientModePatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val disableFullscreenAmbientModePatch = bytecodePatch(
|
val disableFullscreenAmbientModePatch = bytecodePatch(
|
||||||
name = "Disable fullscreen ambient mode",
|
name = "Disable fullscreen ambient mode",
|
||||||
description = "Adds an option to disable the ambient mode when in fullscreen.",
|
description = "Adds an option to disable the ambient mode when in fullscreen.",
|
||||||
@@ -36,6 +35,7 @@ val disableFullscreenAmbientModePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ private const val CUSTOM_FILTER_CLASS_NAME =
|
|||||||
private const val KEYWORD_FILTER_CLASS_NAME =
|
private const val KEYWORD_FILTER_CLASS_NAME =
|
||||||
"Lapp/revanced/extension/youtube/patches/components/KeywordContentFilter;"
|
"Lapp/revanced/extension/youtube/patches/components/KeywordContentFilter;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hideLayoutComponentsPatch = bytecodePatch(
|
val hideLayoutComponentsPatch = bytecodePatch(
|
||||||
name = "Hide layout components",
|
name = "Hide layout components",
|
||||||
description = "Adds options to hide general layout components.",
|
description = "Adds options to hide general layout components.",
|
||||||
@@ -129,6 +128,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ val hideInfoCardsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import app.revanced.patches.youtube.misc.playertype.playerTypeHookPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
||||||
name = "Hide player flyout menu items",
|
name = "Hide player flyout menu items",
|
||||||
description = "Adds options to hide menu items that appear when pressing the gear icon in the video player.",
|
description = "Adds options to hide menu items that appear when pressing the gear icon in the video player.",
|
||||||
@@ -31,6 +30,7 @@ val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/DisableRollingNumberAnimationsPatch;"
|
"Lapp/revanced/extension/youtube/patches/DisableRollingNumberAnimationsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val disableRollingNumberAnimationPatch = bytecodePatch(
|
val disableRollingNumberAnimationPatch = bytecodePatch(
|
||||||
name = "Disable rolling number animations",
|
name = "Disable rolling number animations",
|
||||||
description = "Adds an option to disable rolling number animations of video view count, user likes, and upload time.",
|
description = "Adds an option to disable rolling number animations of video view count, user likes, and upload time.",
|
||||||
@@ -36,6 +35,7 @@ val disableRollingNumberAnimationPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch
|
|||||||
import app.revanced.patches.youtube.shared.seekbarFingerprint
|
import app.revanced.patches.youtube.shared.seekbarFingerprint
|
||||||
import app.revanced.patches.youtube.shared.seekbarOnDrawFingerprint
|
import app.revanced.patches.youtube.shared.seekbarOnDrawFingerprint
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hideSeekbarPatch = bytecodePatch(
|
val hideSeekbarPatch = bytecodePatch(
|
||||||
name = "Hide seekbar",
|
name = "Hide seekbar",
|
||||||
description = "Adds an option to hide the seekbar.",
|
description = "Adds an option to hide the seekbar.",
|
||||||
@@ -32,6 +31,7 @@ val hideSeekbarPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ 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.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
internal var reelMultipleItemShelfId = -1L
|
internal var reelMultipleItemShelfId = -1L
|
||||||
private set
|
private set
|
||||||
@@ -189,6 +188,7 @@ val hideShortsComponentsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ val disableSuggestedVideoEndScreenPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val hideTimestampPatch = bytecodePatch(
|
val hideTimestampPatch = bytecodePatch(
|
||||||
name = "Hide timestamp",
|
name = "Hide timestamp",
|
||||||
description = "Adds an option to hide the timestamp in the bottom left of the video player.",
|
description = "Adds an option to hide the timestamp in the bottom left of the video player.",
|
||||||
@@ -28,6 +27,7 @@ val hideTimestampPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
// 19.33.35
|
// 19.33.35
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val playerPopupPanelsPatch = bytecodePatch(
|
val playerPopupPanelsPatch = bytecodePatch(
|
||||||
name = "Disable player popup panels",
|
name = "Disable player popup panels",
|
||||||
description = "Adds an option to disable panels (such as live chat) from opening automatically.",
|
description = "Adds an option to disable panels (such as live chat) from opening automatically.",
|
||||||
@@ -28,6 +27,7 @@ val playerPopupPanelsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ val playerControlsBackgroundPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ val customPlayerOverlayOpacityPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.TypeReference
|
import com.android.tools.smali.dexlib2.iface.reference.TypeReference
|
||||||
import com.sun.org.apache.bcel.internal.generic.InstructionConst.getInstruction
|
|
||||||
|
|
||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/ReturnYouTubeDislikePatch;"
|
"Lapp/revanced/extension/youtube/patches/ReturnYouTubeDislikePatch;"
|
||||||
@@ -39,7 +38,6 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
|||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/components/ReturnYouTubeDislikeFilterPatch;"
|
"Lapp/revanced/extension/youtube/patches/components/ReturnYouTubeDislikeFilterPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val returnYouTubeDislikePatch = bytecodePatch(
|
val returnYouTubeDislikePatch = bytecodePatch(
|
||||||
name = "Return YouTube Dislike",
|
name = "Return YouTube Dislike",
|
||||||
description = "Adds an option to show the dislike count of videos with Return YouTube Dislike.",
|
description = "Adds an option to show the dislike count of videos with Return YouTube Dislike.",
|
||||||
@@ -61,6 +59,7 @@ val returnYouTubeDislikePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/WideSearchbarPatch;"
|
"Lapp/revanced/extension/youtube/patches/WideSearchbarPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val wideSearchbarPatch = bytecodePatch(
|
val wideSearchbarPatch = bytecodePatch(
|
||||||
name = "Wide searchbar",
|
name = "Wide searchbar",
|
||||||
description = "Adds an option to replace the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
description = "Adds an option to replace the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
||||||
@@ -36,6 +35,7 @@ val wideSearchbarPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
|
|
||||||
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ShortsAutoplayPatch;"
|
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ShortsAutoplayPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val shortsAutoplayPatch = bytecodePatch(
|
val shortsAutoplayPatch = bytecodePatch(
|
||||||
name = "Shorts autoplay",
|
name = "Shorts autoplay",
|
||||||
description = "Adds options to automatically play the next Short.",
|
description = "Adds options to automatically play the next Short.",
|
||||||
@@ -38,6 +37,7 @@ val shortsAutoplayPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ val sponsorBlockPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import app.revanced.patches.all.misc.resources.addResourcesPatch
|
|||||||
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
||||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_19_17_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.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
@@ -15,16 +17,17 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/spoof/SpoofAppVersionPatch;"
|
"Lapp/revanced/extension/youtube/patches/spoof/SpoofAppVersionPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val spoofAppVersionPatch = bytecodePatch(
|
val spoofAppVersionPatch = bytecodePatch(
|
||||||
name = "Spoof app version",
|
name = "Spoof app version",
|
||||||
description = "Adds an option to trick YouTube into thinking you are running an older version of the app. " +
|
description = "Adds an option to trick YouTube into thinking you are running an older version of the app. " +
|
||||||
"This can be used to restore old UI elements and features.",
|
"This can be used to restore old UI elements and features. " +
|
||||||
|
"Patching 19.16.39 or lower includes additional older spoofing targets.",
|
||||||
) {
|
) {
|
||||||
dependsOn(
|
dependsOn(
|
||||||
sharedExtensionPatch,
|
sharedExtensionPatch,
|
||||||
settingsPatch,
|
settingsPatch,
|
||||||
addResourcesPatch,
|
addResourcesPatch,
|
||||||
|
versionCheckPatch
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith(
|
compatibleWith(
|
||||||
@@ -35,6 +38,7 @@ val spoofAppVersionPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -43,10 +47,19 @@ val spoofAppVersionPatch = bytecodePatch(
|
|||||||
|
|
||||||
PreferenceScreen.GENERAL_LAYOUT.addPreferences(
|
PreferenceScreen.GENERAL_LAYOUT.addPreferences(
|
||||||
SwitchPreference("revanced_spoof_app_version"),
|
SwitchPreference("revanced_spoof_app_version"),
|
||||||
ListPreference(
|
if (is_19_17_or_greater) {
|
||||||
key = "revanced_spoof_app_version_target",
|
ListPreference(
|
||||||
summaryKey = null,
|
key = "revanced_spoof_app_version_target",
|
||||||
),
|
summaryKey = null,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ListPreference(
|
||||||
|
key = "revanced_spoof_app_version_target",
|
||||||
|
summaryKey = null,
|
||||||
|
entriesKey = "revanced_spoof_app_version_target_legacy_entries",
|
||||||
|
entryValuesKey = "revanced_spoof_app_version_target_legacy_entry_values"
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val insertIndex = spoofAppVersionFingerprint.patternMatch!!.startIndex + 1
|
val insertIndex = spoofAppVersionFingerprint.patternMatch!!.startIndex + 1
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
|||||||
|
|
||||||
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ChangeStartPagePatch;"
|
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ChangeStartPagePatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val changeStartPagePatch = bytecodePatch(
|
val changeStartPagePatch = bytecodePatch(
|
||||||
name = "Change start page",
|
name = "Change start page",
|
||||||
description = "Adds an option to set which page the app opens in instead of the homepage.",
|
description = "Adds an option to set which page the app opens in instead of the homepage.",
|
||||||
@@ -36,6 +35,7 @@ val changeStartPagePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/DisableResumingStartupShortsPlayerPatch;"
|
"Lapp/revanced/extension/youtube/patches/DisableResumingStartupShortsPlayerPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val disableResumingShortsOnStartupPatch = bytecodePatch(
|
val disableResumingShortsOnStartupPatch = bytecodePatch(
|
||||||
name = "Disable resuming Shorts on startup",
|
name = "Disable resuming Shorts on startup",
|
||||||
description = "Adds an option to disable the Shorts player from resuming on app startup when Shorts were last being watched.",
|
description = "Adds an option to disable the Shorts player from resuming on app startup when Shorts were last being watched.",
|
||||||
@@ -38,6 +37,7 @@ val disableResumingShortsOnStartupPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch
|
|||||||
|
|
||||||
const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/TabletLayoutPatch;"
|
const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/TabletLayoutPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val enableTabletLayoutPatch = bytecodePatch(
|
val enableTabletLayoutPatch = bytecodePatch(
|
||||||
name = "Enable tablet layout",
|
name = "Enable tablet layout",
|
||||||
description = "Adds an option to enable tablet layout.",
|
description = "Adds an option to enable tablet layout.",
|
||||||
@@ -33,6 +32,7 @@ val enableTabletLayoutPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
|||||||
|
|
||||||
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L
|
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val themePatch = bytecodePatch(
|
val themePatch = bytecodePatch(
|
||||||
name = "Theme",
|
name = "Theme",
|
||||||
description = "Adds options for theming and applies a custom background theme (dark background theme defaults to amoled black).",
|
description = "Adds options for theming and applies a custom background theme (dark background theme defaults to amoled black).",
|
||||||
@@ -201,6 +200,7 @@ val themePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/AlternativeThumbnailsPatch;"
|
"Lapp/revanced/extension/youtube/patches/AlternativeThumbnailsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val alternativeThumbnailsPatch = bytecodePatch(
|
val alternativeThumbnailsPatch = bytecodePatch(
|
||||||
name = "Alternative thumbnails",
|
name = "Alternative thumbnails",
|
||||||
description = "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.",
|
description = "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.",
|
||||||
@@ -40,6 +39,7 @@ val alternativeThumbnailsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/BypassImageRegionRestrictionsPatch;"
|
"Lapp/revanced/extension/youtube/patches/BypassImageRegionRestrictionsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val bypassImageRegionRestrictionsPatch = bytecodePatch(
|
val bypassImageRegionRestrictionsPatch = bytecodePatch(
|
||||||
name = "Bypass image region restrictions",
|
name = "Bypass image region restrictions",
|
||||||
description = "Adds an option to use a different host for user avatar and channel images " +
|
description = "Adds an option to use a different host for user avatar and channel images " +
|
||||||
@@ -34,6 +33,7 @@ val bypassImageRegionRestrictionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import app.revanced.patches.youtube.shared.mainActivityOnCreateFingerprint
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/announcements/AnnouncementsPatch;"
|
"Lapp/revanced/extension/youtube/patches/announcements/AnnouncementsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val announcementsPatch = bytecodePatch(
|
val announcementsPatch = bytecodePatch(
|
||||||
name = "Announcements",
|
name = "Announcements",
|
||||||
description = "Adds an option to show announcements from ReVanced on app startup.",
|
description = "Adds an option to show announcements from ReVanced on app startup.",
|
||||||
@@ -30,6 +29,7 @@ val announcementsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.shared.autoRepeatFingerprint
|
import app.revanced.patches.youtube.shared.autoRepeatFingerprint
|
||||||
import app.revanced.patches.youtube.shared.autoRepeatParentFingerprint
|
import app.revanced.patches.youtube.shared.autoRepeatParentFingerprint
|
||||||
import org.stringtemplate.v4.compiler.Bytecode.instructions
|
|
||||||
|
|
||||||
// TODO: Rename this patch to AlwaysRepeatPatch (as well as strings and references in the extension).
|
// TODO: Rename this patch to AlwaysRepeatPatch (as well as strings and references in the extension).
|
||||||
@Suppress("unused")
|
|
||||||
val autoRepeatPatch = bytecodePatch(
|
val autoRepeatPatch = bytecodePatch(
|
||||||
name = "Always repeat",
|
name = "Always repeat",
|
||||||
description = "Adds an option to always repeat videos when they end.",
|
description = "Adds an option to always repeat videos when they end.",
|
||||||
@@ -32,6 +30,7 @@ val autoRepeatPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ val backgroundPlaybackPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
|
import app.revanced.util.indexOfFirstInstructionReversedOrThrow
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/EnableDebuggingPatch;"
|
"Lapp/revanced/extension/youtube/patches/EnableDebuggingPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val enableDebuggingPatch = bytecodePatch(
|
val enableDebuggingPatch = bytecodePatch(
|
||||||
name = "Enable debugging",
|
name = "Enable debugging",
|
||||||
description = "Adds options for debugging.",
|
description = "Adds options for debugging.",
|
||||||
@@ -35,6 +35,7 @@ val enableDebuggingPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -105,7 +106,23 @@ val enableDebuggingPatch = bytecodePatch(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// There exists other experimental accessor methods for String, byte[], and wrappers for obfuscated classes,
|
experimentalStringFeatureFlagFingerprint.match(
|
||||||
// but currently none of those are hooked.
|
experimentalFeatureFlagParentFingerprint.originalClassDef
|
||||||
|
).method.apply {
|
||||||
|
val insertIndex = indexOfFirstInstructionReversedOrThrow(Opcode.MOVE_RESULT_OBJECT)
|
||||||
|
|
||||||
|
addInstructions(
|
||||||
|
insertIndex,
|
||||||
|
"""
|
||||||
|
move-result-object v0
|
||||||
|
invoke-static { v0, p1, p2, p3 }, $EXTENSION_CLASS_DESCRIPTOR->isStringFeatureFlagEnabled(Ljava/lang/String;JLjava/lang/String;)Ljava/lang/String;
|
||||||
|
move-result-object v0
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// There exists other experimental accessor methods for byte[]
|
||||||
|
// and wrappers for obfuscated classes, but currently none of those are hooked.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,3 +28,9 @@ internal val experimentalLongFeatureFlagFingerprint = fingerprint {
|
|||||||
parameters("J", "J")
|
parameters("J", "J")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val experimentalStringFeatureFlagFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("Ljava/lang/String;")
|
||||||
|
parameters("J", "Ljava/lang/String;")
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch
|
|||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/spoof/SpoofDeviceDimensionsPatch;"
|
"Lapp/revanced/extension/youtube/patches/spoof/SpoofDeviceDimensionsPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val spoofDeviceDimensionsPatch = bytecodePatch(
|
val spoofDeviceDimensionsPatch = bytecodePatch(
|
||||||
name = "Spoof device dimensions",
|
name = "Spoof device dimensions",
|
||||||
description = "Adds an option to spoof the device dimensions which can unlock higher video qualities.",
|
description = "Adds an option to spoof the device dimensions which can unlock higher video qualities.",
|
||||||
@@ -31,6 +30,7 @@ val spoofDeviceDimensionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,18 @@ package app.revanced.patches.youtube.misc.dns
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.all.misc.resources.addResources
|
import app.revanced.patches.all.misc.resources.addResources
|
||||||
|
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||||
import app.revanced.patches.youtube.shared.mainActivityOnCreateFingerprint
|
import app.revanced.patches.youtube.shared.mainActivityOnCreateFingerprint
|
||||||
|
|
||||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/extension/youtube/patches/CheckWatchHistoryDomainNameResolutionPatch;"
|
"Lapp/revanced/extension/youtube/patches/CheckWatchHistoryDomainNameResolutionPatch;"
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val checkWatchHistoryDomainNameResolutionPatch = bytecodePatch(
|
val checkWatchHistoryDomainNameResolutionPatch = bytecodePatch(
|
||||||
name = "Check watch history domain name resolution",
|
name = "Check watch history domain name resolution",
|
||||||
description = "Checks if the device DNS server is preventing user watch history from being saved.",
|
description = "Checks if the device DNS server is preventing user watch history from being saved.",
|
||||||
) {
|
) {
|
||||||
|
dependsOn(addResourcesPatch)
|
||||||
|
|
||||||
compatibleWith(
|
compatibleWith(
|
||||||
"com.google.android.youtube"(
|
"com.google.android.youtube"(
|
||||||
"18.38.44",
|
"18.38.44",
|
||||||
@@ -21,6 +23,7 @@ val checkWatchHistoryDomainNameResolutionPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ val spoofVideoStreamsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ val gmsCoreSupportPatch = gmsCoreSupportPatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.android.tools.smali.dexlib2.iface.Method
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val bypassURLRedirectsPatch = bytecodePatch(
|
val bypassURLRedirectsPatch = bytecodePatch(
|
||||||
name = "Bypass URL redirects",
|
name = "Bypass URL redirects",
|
||||||
description = "Adds an option to bypass URL redirects and open the original URL directly.",
|
description = "Adds an option to bypass URL redirects and open the original URL directly.",
|
||||||
@@ -37,6 +36,7 @@ val bypassURLRedirectsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val openLinksExternallyPatch = bytecodePatch(
|
val openLinksExternallyPatch = bytecodePatch(
|
||||||
name = "Open links externally",
|
name = "Open links externally",
|
||||||
description = "Adds an option to always open links in your browser instead of in the in-app-browser.",
|
description = "Adds an option to always open links in your browser instead of in the in-app-browser.",
|
||||||
@@ -48,6 +47,7 @@ val openLinksExternallyPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
|
"19.45.38",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user