1
mirror of https://github.com/revanced/revanced-integrations synced 2025-11-19 03:23:27 +01:00

Compare commits

...

115 Commits

Author SHA1 Message Date
semantic-release-bot
966268fa56 chore: Release v1.17.0-dev.6 [skip ci]
# [1.17.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.17.0-dev.5...v1.17.0-dev.6) (2024-10-24)

### Bug Fixes

* **YouTube - Hide ads:** Hide new type of ad ([b94d2da](b94d2da0b2))
2024-10-24 12:53:56 +00:00
LisoUseInAIKyrios
b94d2da0b2 fix(YouTube - Hide ads): Hide new type of ad 2024-10-24 08:50:48 -04:00
semantic-release-bot
6ecf65179a chore: Release v1.17.0-dev.5 [skip ci]
# [1.17.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.17.0-dev.4...v1.17.0-dev.5) (2024-10-24)

### Bug Fixes

* **YouTube - Hide Shorts components:** Hide new type of Short ([c1bde72](c1bde72525))
* **YouTube - Playback speed:** Remember playback speed with new speed menu ([#725](https://github.com/ReVanced/revanced-integrations/issues/725)) ([fd9ffa5](fd9ffa53b7))
2024-10-24 11:48:35 +00:00
LisoUseInAIKyrios
fd9ffa53b7 fix(YouTube - Playback speed): Remember playback speed with new speed menu (#725) 2024-10-24 07:45:17 -04:00
LisoUseInAIKyrios
c1bde72525 fix(YouTube - Hide Shorts components): Hide new type of Short 2024-10-24 07:43:52 -04:00
semantic-release-bot
b799a1b2d9 chore: Release v1.17.0-dev.4 [skip ci]
# [1.17.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.17.0-dev.3...v1.17.0-dev.4) (2024-10-23)

### Features

* **YouTube:** Hide player shopping shelf in playlists ([#724](https://github.com/ReVanced/revanced-integrations/issues/724)) ([d108f59](d108f59554))
2024-10-23 03:59:05 +00:00
LisoUseInAIKyrios
d108f59554 feat(YouTube): Hide player shopping shelf in playlists (#724) 2024-10-22 23:55:53 -04:00
semantic-release-bot
ac570aabe1 chore: Release v1.17.0-dev.3 [skip ci]
# [1.17.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.17.0-dev.2...v1.17.0-dev.3) (2024-10-23)

### Features

* **YouTube - Hide layout components:** Hide player shopping shelf ([#723](https://github.com/ReVanced/revanced-integrations/issues/723)) ([fbaf288](fbaf2883cc))
2024-10-23 02:16:42 +00:00
LisoUseInAIKyrios
fbaf2883cc feat(YouTube - Hide layout components): Hide player shopping shelf (#723) 2024-10-23 04:13:36 +02:00
semantic-release-bot
4d48f00d98 chore: Release v1.17.0-dev.2 [skip ci]
# [1.17.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.17.0-dev.1...v1.17.0-dev.2) (2024-10-22)

### Bug Fixes

* **YouTube:** Merge multiple layout patches into `Hide Layout Components` ([#721](https://github.com/ReVanced/revanced-integrations/issues/721)) ([c76d8b1](c76d8b166e))

### Features

* **YouTube:** Merge multiple player overlay patches into `Hide player overlay buttons` ([#722](https://github.com/ReVanced/revanced-integrations/issues/722)) ([55089ba](55089baf1f))
2024-10-22 22:34:15 +00:00
LisoUseInAIKyrios
55089baf1f feat(YouTube): Merge multiple player overlay patches into Hide player overlay buttons (#722) 2024-10-23 00:31:04 +02:00
LisoUseInAIKyrios
c76d8b166e fix(YouTube): Merge multiple layout patches into Hide Layout Components (#721) 2024-10-23 00:29:17 +02:00
semantic-release-bot
5f49e92579 chore: Release v1.17.0-dev.1 [skip ci]
# [1.17.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.16.1-dev.1...v1.17.0-dev.1) (2024-10-21)

### Features

* **YouTube:** Add `Shorts autoplay` patch ([#719](https://github.com/ReVanced/revanced-integrations/issues/719)) ([14fb894](14fb894f39))
2024-10-21 06:56:10 +00:00
LisoUseInAIKyrios
14fb894f39 feat(YouTube): Add Shorts autoplay patch (#719) 2024-10-21 02:52:48 -04:00
semantic-release-bot
1c9d371047 chore: Release v1.16.1-dev.1 [skip ci]
## [1.16.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0...v1.16.1-dev.1) (2024-10-20)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community post ([#711](https://github.com/ReVanced/revanced-integrations/issues/711)) ([9ffdfc3](9ffdfc3763))
* **YouTube - Hide seekbar:** Hide 19.34+ gradient seekbar ([e3975cf](e3975cfc3a))
2024-10-20 14:01:32 +00:00
Zain
9ffdfc3763 fix(YouTube - Hide layout components): Hide new kind of community post (#711) 2024-10-20 09:57:58 -04:00
LisoUseInAIKyrios
e3975cfc3a fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar 2024-10-20 09:56:00 -04:00
semantic-release-bot
53d5a94bfa chore: Release v1.16.0 [skip ci]
# [1.16.0](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0...v1.16.0) (2024-10-20)

### Bug Fixes

* **YouTube - Hide layout components:** Adjust settings text ([#713](https://github.com/ReVanced/revanced-integrations/issues/713)) ([119c416](119c416bc5))
* **YouTube - Hide layout components:** Hide new type of Playable ([1a58a40](1a58a406db))
* **YouTube - Spoof video streams:** Fix playback for Android VR by removing invalid body as well ([#716](https://github.com/ReVanced/revanced-integrations/issues/716)) ([8ad3f78](8ad3f78865))
* **YouTube - Spoof video streams:** Handle app left open for a long time ([#709](https://github.com/ReVanced/revanced-integrations/issues/709)) ([ea4b073](ea4b073f5c))

### Features

* **Sync for Reddit:** Add `Fix video downloads` patch ([#710](https://github.com/ReVanced/revanced-integrations/issues/710)) ([888de49](888de49edd))
* **Twitter:** Add `Change link sharing domain` patch ([#715](https://github.com/ReVanced/revanced-integrations/issues/715)) ([c673951](c6739517f1))
* **YouTube - Hide layout components:** Add option to hide Yoodles (YouTube Doodles) ([#712](https://github.com/ReVanced/revanced-integrations/issues/712)) ([4b5f3de](4b5f3deef9))
* **YouTube - Hide Shorts components:** Add option to hide like fountain ([#708](https://github.com/ReVanced/revanced-integrations/issues/708)) ([16c3ef7](16c3ef7ee5))
* **YouTube - Hide Shorts components:** Add options to hide `Use template`, `Upcoming`, `Green screen` buttons ([#714](https://github.com/ReVanced/revanced-integrations/issues/714)) ([faad754](faad7548df))
* **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](1c9a966354))
* **YouTube:** Support versions `19.25` and `19.34` ([#689](https://github.com/ReVanced/revanced-integrations/issues/689)) ([61569ba](61569ba111))
2024-10-20 01:40:13 +00:00
LisoUseInAIKyrios
14f767f943 chore: Merge branch dev to main (#704) 2024-10-19 21:36:46 -04:00
semantic-release-bot
e3317e6f56 chore: Release v1.16.0-dev.11 [skip ci]
# [1.16.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.10...v1.16.0-dev.11) (2024-10-19)

### Features

* **YouTube - Hide Shorts components:** Hide `Hashtag` button ([#717](https://github.com/ReVanced/revanced-integrations/issues/717)) ([1c9a966](1c9a966354))
2024-10-19 12:42:03 +00:00
MarcaD
1c9a966354 feat(YouTube - Hide Shorts components): Hide Hashtag button (#717) 2024-10-19 08:39:00 -04:00
semantic-release-bot
b7b9dd2cb4 chore: Release v1.16.0-dev.10 [skip ci]
# [1.16.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.9...v1.16.0-dev.10) (2024-10-19)

### Features

* **YouTube:** Support versions `19.25` and `19.34` ([#689](https://github.com/ReVanced/revanced-integrations/issues/689)) ([61569ba](61569ba111))
2024-10-19 12:29:43 +00:00
Zain
61569ba111 feat(YouTube): Support versions 19.25 and 19.34 (#689)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: kitadai31 <90122968+kitadai31@users.noreply.github.com>
2024-10-19 08:26:27 -04:00
semantic-release-bot
99d17bf026 chore: Release v1.16.0-dev.9 [skip ci]
# [1.16.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.8...v1.16.0-dev.9) (2024-10-19)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new type of Playable ([1a58a40](1a58a406db))
2024-10-19 02:41:31 +00:00
LisoUseInAIKyrios
1a58a406db fix(YouTube - Hide layout components): Hide new type of Playable 2024-10-18 22:38:16 -04:00
semantic-release-bot
042addc756 chore: Release v1.16.0-dev.8 [skip ci]
# [1.16.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.7...v1.16.0-dev.8) (2024-10-17)

### Features

* **Sync for Reddit:** Add `Fix video downloads` patch ([#710](https://github.com/ReVanced/revanced-integrations/issues/710)) ([888de49](888de49edd))
2024-10-17 15:31:47 +00:00
1fexd
888de49edd feat(Sync for Reddit): Add Fix video downloads patch (#710) 2024-10-17 17:28:27 +02:00
semantic-release-bot
246ebc217a chore: Release v1.16.0-dev.7 [skip ci]
# [1.16.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.6...v1.16.0-dev.7) (2024-10-17)

### Features

* **Twitter:** Add `Change link sharing domain` patch ([#715](https://github.com/ReVanced/revanced-integrations/issues/715)) ([c673951](c6739517f1))
2024-10-17 15:26:52 +00:00
Alex
c6739517f1 feat(Twitter): Add Change link sharing domain patch (#715)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-10-17 17:23:56 +02:00
semantic-release-bot
7b260df965 chore: Release v1.16.0-dev.6 [skip ci]
# [1.16.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.5...v1.16.0-dev.6) (2024-10-17)

### Bug Fixes

* **YouTube - Spoof video streams:** Fix playback for Android VR by removing invalid body as well ([#716](https://github.com/ReVanced/revanced-integrations/issues/716)) ([8ad3f78](8ad3f78865))
2024-10-17 15:19:54 +00:00
oSumAtrIX
8ad3f78865 fix(YouTube - Spoof video streams): Fix playback for Android VR by removing invalid body as well (#716) 2024-10-17 17:16:51 +02:00
semantic-release-bot
142de1ac93 chore: Release v1.16.0-dev.5 [skip ci]
# [1.16.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.4...v1.16.0-dev.5) (2024-10-14)

### Features

* **YouTube - Hide Shorts components:** Add options to hide `Use template`, `Upcoming`, `Green screen` buttons ([#714](https://github.com/ReVanced/revanced-integrations/issues/714)) ([faad754](faad7548df))
2024-10-14 12:14:22 +00:00
MarcaD
faad7548df feat(YouTube - Hide Shorts components): Add options to hide Use template, Upcoming, Green screen buttons (#714) 2024-10-14 14:11:07 +02:00
LisoUseInAIKyrios
af45ab5512 chore(YouTube): Fix typo 2024-10-07 03:06:18 -04:00
semantic-release-bot
5e802ede59 chore: Release v1.16.0-dev.4 [skip ci]
# [1.16.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.3...v1.16.0-dev.4) (2024-10-06)

### Bug Fixes

* **YouTube - Hide layout components:** Adjust settings text ([#713](https://github.com/ReVanced/revanced-integrations/issues/713)) ([119c416](119c416bc5))
2024-10-06 22:57:57 +00:00
LisoUseInAIKyrios
119c416bc5 fix(YouTube - Hide layout components): Adjust settings text (#713) 2024-10-06 18:55:05 -04:00
semantic-release-bot
ca064a7d25 chore: Release v1.16.0-dev.3 [skip ci]
# [1.16.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.2...v1.16.0-dev.3) (2024-10-06)

### Features

* **YouTube - Hide layout components:** Add option to hide Yoodles (YouTube Doodles) ([#712](https://github.com/ReVanced/revanced-integrations/issues/712)) ([4b5f3de](4b5f3deef9))
2024-10-06 00:11:52 +00:00
LisoUseInAIKyrios
4b5f3deef9 feat(YouTube - Hide layout components): Add option to hide Yoodles (YouTube Doodles) (#712) 2024-10-05 20:08:54 -04:00
semantic-release-bot
c12b9a338f chore: Release v1.16.0-dev.2 [skip ci]
# [1.16.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.16.0-dev.1...v1.16.0-dev.2) (2024-10-03)

### Bug Fixes

* **YouTube - Spoof video streams:** Handle app left open for a long time ([#709](https://github.com/ReVanced/revanced-integrations/issues/709)) ([ea4b073](ea4b073f5c))
2024-10-03 23:25:49 +00:00
LisoUseInAIKyrios
ea4b073f5c fix(YouTube - Spoof video streams): Handle app left open for a long time (#709) 2024-10-03 19:22:30 -04:00
semantic-release-bot
f82d29378d chore: Release v1.16.0-dev.1 [skip ci]
# [1.16.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.15.1-dev.1...v1.16.0-dev.1) (2024-10-02)

### Features

* **YouTube - Hide Shorts components:** Add option to hide like fountain ([#708](https://github.com/ReVanced/revanced-integrations/issues/708)) ([16c3ef7](16c3ef7ee5))
2024-10-02 00:41:56 +00:00
oSumAtrIX
16c3ef7ee5 feat(YouTube - Hide Shorts components): Add option to hide like fountain (#708) 2024-10-02 02:38:59 +02:00
semantic-release-bot
df2ebfbc71 chore: Release v1.15.1-dev.1 [skip ci]
## [1.15.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0...v1.15.1-dev.1) (2024-10-01)
2024-10-01 15:33:14 +00:00
oSumAtrIX
a06b7a359e ci: Use permissions and regular GitHub token instead of PAT 2024-10-01 17:25:47 +02:00
oSumAtrIX
85e0cb99f2 build(Needs bump): Update dependencies 2024-09-30 23:21:42 +02:00
oSumAtrIX
469a1a9815 ci: Adjust release commit message 2024-09-30 22:34:22 +02:00
oSumAtrIX
18dbf8b20e chore: Adjust PR body 2024-09-30 22:08:45 +02:00
semantic-release-bot
795617428a chore(release): 1.15.0 [skip ci]
# [1.15.0](https://github.com/ReVanced/revanced-integrations/compare/v1.14.2...v1.15.0) (2024-09-30)

### Bug Fixes

* **YouTube - Check watch history domain name resolution:** Do not show warning if network connection is flaky ([#702](https://github.com/ReVanced/revanced-integrations/issues/702)) ([80482df](80482df3fa))
* **YouTube:** Show video chapter titles without clipping when overlay buttons are enabled ([#699](https://github.com/ReVanced/revanced-integrations/issues/699)) ([325cc17](325cc17900))

### Features

* **YouTube - Disable precise seeking gesture:** Hide "pull up" label that shows up when swiping ([#696](https://github.com/ReVanced/revanced-integrations/issues/696)) ([0b9afd0](0b9afd022d))
* **YouTube - Hide Shorts components:** Add `Hide save music`, `Hide stickers` ([#703](https://github.com/ReVanced/revanced-integrations/issues/703)) ([a87456e](a87456e499))
2024-09-30 19:37:30 +00:00
oSumAtrIX
9b570824db chore: Merge branch dev to main (#700) 2024-09-30 21:13:19 +02:00
semantic-release-bot
a55269dfc0 chore(release): 1.15.0-dev.2 [skip ci]
# [1.15.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.15.0-dev.1...v1.15.0-dev.2) (2024-09-29)

### Features

* **YouTube - Hide Shorts components:** Add `Hide save music`, `Hide stickers` ([#703](https://github.com/ReVanced/revanced-integrations/issues/703)) ([a87456e](a87456e499))
2024-09-29 01:06:26 +00:00
LisoUseInAIKyrios
a87456e499 feat(YouTube - Hide Shorts components): Add Hide save music, Hide stickers (#703) 2024-09-28 21:03:13 -04:00
semantic-release-bot
a85bb5a4bb chore(release): 1.15.0-dev.1 [skip ci]
# [1.15.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.14.3-dev.2...v1.15.0-dev.1) (2024-09-29)

### Features

* **YouTube - Disable precise seeking gesture:** Hide "pull up" label that shows up when swiping ([#696](https://github.com/ReVanced/revanced-integrations/issues/696)) ([0b9afd0](0b9afd022d))
2024-09-29 00:35:35 +00:00
Zain
0b9afd022d feat(YouTube - Disable precise seeking gesture): Hide "pull up" label that shows up when swiping (#696) 2024-09-29 02:32:24 +02:00
semantic-release-bot
ce9e986755 chore(release): 1.14.3-dev.2 [skip ci]
## [1.14.3-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.14.3-dev.1...v1.14.3-dev.2) (2024-09-26)

### Bug Fixes

* **YouTube - Check watch history domain name resolution:** Do not show warning if network connection is flaky ([#702](https://github.com/ReVanced/revanced-integrations/issues/702)) ([80482df](80482df3fa))
2024-09-26 11:59:24 +00:00
LisoUseInAIKyrios
80482df3fa fix(YouTube - Check watch history domain name resolution): Do not show warning if network connection is flaky (#702) 2024-09-26 07:51:34 -04:00
semantic-release-bot
87749ee879 chore(release): 1.14.3-dev.1 [skip ci]
## [1.14.3-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.14.2...v1.14.3-dev.1) (2024-09-23)

### Bug Fixes

* **YouTube:** Show video chapter titles without clipping when overlay buttons are enabled ([#699](https://github.com/ReVanced/revanced-integrations/issues/699)) ([325cc17](325cc17900))
2024-09-23 22:53:07 +00:00
LisoUseInAIKyrios
325cc17900 fix(YouTube): Show video chapter titles without clipping when overlay buttons are enabled (#699) 2024-09-23 18:49:55 -04:00
semantic-release-bot
f49d634bc2 chore(release): 1.14.2 [skip ci]
## [1.14.2](https://github.com/ReVanced/revanced-integrations/compare/v1.14.1...v1.14.2) (2024-09-23)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community posts ([#695](https://github.com/ReVanced/revanced-integrations/issues/695)) ([b384926](b3849267a7))
* **YouTube - Spoof video streams:** Change default client type to Android VR ([a2e8bbb](a2e8bbb422))
* **YouTube - Spoof video streams:** Change default client type to Android VR ([#697](https://github.com/ReVanced/revanced-integrations/issues/697)) ([d06706d](d06706d717))
2024-09-23 14:11:55 +00:00
oSumAtrIX
71eef3c0f5 chore: Merge branch dev to main (#698) 2024-09-23 16:08:59 +02:00
semantic-release-bot
7d831d2693 chore(release): 1.14.2-dev.2 [skip ci]
## [1.14.2-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.14.2-dev.1...v1.14.2-dev.2) (2024-09-22)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community posts ([#695](https://github.com/ReVanced/revanced-integrations/issues/695)) ([b384926](b3849267a7))
2024-09-22 04:49:45 +00:00
Bceez
b3849267a7 fix(YouTube - Hide layout components): Hide new kind of community posts (#695) 2024-09-22 00:46:44 -04:00
semantic-release-bot
e72da0c15f chore(release): 1.14.2-dev.1 [skip ci]
## [1.14.2-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.14.1...v1.14.2-dev.1) (2024-09-21)

### Bug Fixes

* **YouTube - Spoof video streams:** Change default client type to Android VR ([a2e8bbb](a2e8bbb422))
* **YouTube - Spoof video streams:** Change default client type to Android VR ([#697](https://github.com/ReVanced/revanced-integrations/issues/697)) ([d06706d](d06706d717))
2024-09-21 23:34:35 +00:00
LisoUseInAIKyrios
d06706d717 fix(YouTube - Spoof video streams): Change default client type to Android VR (#697) 2024-09-21 19:31:44 -04:00
LisoUseInAIKyrios
a2e8bbb422 fix(YouTube - Spoof video streams): Change default client type to Android VR 2024-09-21 17:11:45 -04:00
semantic-release-bot
9fd0c85f4e chore(release): 1.14.1 [skip ci]
## [1.14.1](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0...v1.14.1) (2024-09-18)

### Bug Fixes

* **YouTube - Check environment:** Only use fields available since Android 8 ([#693](https://github.com/ReVanced/revanced-integrations/issues/693)) ([c0829c3](c0829c3915))
2024-09-18 23:05:05 +00:00
oSumAtrIX
5e0911d188 chore: Merge branch dev to main (#694) 2024-09-19 01:01:26 +02:00
semantic-release-bot
cd71c66995 chore(release): 1.14.1-dev.1 [skip ci]
## [1.14.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0...v1.14.1-dev.1) (2024-09-18)

### Bug Fixes

* **YouTube - Check environment:** Only use fields available since Android 8 ([#693](https://github.com/ReVanced/revanced-integrations/issues/693)) ([c0829c3](c0829c3915))
2024-09-18 23:01:16 +00:00
oSumAtrIX
c0829c3915 fix(YouTube - Check environment): Only use fields available since Android 8 (#693) 2024-09-19 00:58:02 +02:00
semantic-release-bot
5e9637e073 chore(release): 1.14.0 [skip ci]
# [1.14.0](https://github.com/ReVanced/revanced-integrations/compare/v1.13.0...v1.14.0) (2024-09-18)

### Bug Fixes

* **YouTube - Check environment patch:** Allow adb installs even if patched more than 30 minutes ago ([5adf8bd](5adf8bdd67))
* **YouTube - Check environment patch:** Show if patched apk is too old, if the install source is not Manager or ADB ([18048f3](18048f3324))
* **YouTube - Check environment patch:** Use app install/update time instead of current time ([#687](https://github.com/ReVanced/revanced-integrations/issues/687)) ([b0d82b0](b0d82b016e))
* **YouTube - GmsCore support:** Show an error toast if GmsCore is included with root mounted installation ([#686](https://github.com/ReVanced/revanced-integrations/issues/686)) ([a4848be](a4848be653))
* **YouTube - Hide layout components:** Hide new kind of community post ([#678](https://github.com/ReVanced/revanced-integrations/issues/678)) ([6be257a](6be257a7a6))
* **YouTube - Return YouTube Dislike:** Show correct value when swiping back to prior Short and disliking ([2eb5e3a](2eb5e3afeb))
* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([#684](https://github.com/ReVanced/revanced-integrations/issues/684)) ([27d2b60](27d2b60444))
* **YouTube - SponsorBlock:** Add summary text to 'view my segments' button ([0f5dfb4](0f5dfb4e76))
* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([01f084d](01f084d87a))
* **YouTube:** Fix issues related to playback by replace streaming data ([#680](https://github.com/ReVanced/revanced-integrations/issues/680)) ([0468235](04682353af))

### Features

* Add `Check environment` patch ([#683](https://github.com/ReVanced/revanced-integrations/issues/683)) ([e856455](e856455283))
* **YouTube - Hide Shorts components:** Hide 'Use this sound' button ([#691](https://github.com/ReVanced/revanced-integrations/issues/691)) ([6f3d2ff](6f3d2ffb0d))
* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([#681](https://github.com/ReVanced/revanced-integrations/issues/681)) ([5314dd9](5314dd90d1))
* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([#679](https://github.com/ReVanced/revanced-integrations/issues/679)) ([2c471f3](2c471f39c2))
* **YouTube:** Add donation link to settings about screen ([#688](https://github.com/ReVanced/revanced-integrations/issues/688)) ([b816c45](b816c45838))
2024-09-18 22:17:16 +00:00
LisoUseInAIKyrios
8e16999420 chore: Merge branch dev to main (#677) 2024-09-18 18:13:56 -04:00
semantic-release-bot
ebfe083a24 chore(release): 1.14.0-dev.12 [skip ci]
# [1.14.0-dev.12](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.11...v1.14.0-dev.12) (2024-09-17)

### Bug Fixes

* **YouTube:** Fix issues related to playback by replace streaming data ([#680](https://github.com/ReVanced/revanced-integrations/issues/680)) ([0468235](04682353af))
2024-09-17 22:48:14 +00:00
Zain
04682353af fix(YouTube): Fix issues related to playback by replace streaming data (#680)
Co-authored-by: kitadai31 <90122968+kitadai31@users.noreply.github.com>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-09-18 00:45:14 +02:00
semantic-release-bot
ca50665ac8 chore(release): 1.14.0-dev.11 [skip ci]
# [1.14.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.10...v1.14.0-dev.11) (2024-09-17)

### Features

* **YouTube - Hide Shorts components:** Hide 'Use this sound' button ([#691](https://github.com/ReVanced/revanced-integrations/issues/691)) ([6f3d2ff](6f3d2ffb0d))
2024-09-17 13:38:01 +00:00
MarcaD
6f3d2ffb0d feat(YouTube - Hide Shorts components): Hide 'Use this sound' button (#691)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-09-17 15:34:34 +02:00
semantic-release-bot
5ffff1bd40 chore(release): 1.14.0-dev.10 [skip ci]
# [1.14.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.9...v1.14.0-dev.10) (2024-09-11)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Show correct value when swiping back to prior Short and disliking ([2eb5e3a](2eb5e3afeb))
2024-09-11 03:41:25 +00:00
LisoUseInAIKyrios
2eb5e3afeb fix(YouTube - Return YouTube Dislike): Show correct value when swiping back to prior Short and disliking 2024-09-10 23:37:40 -04:00
semantic-release-bot
8332444c0d chore(release): 1.14.0-dev.9 [skip ci]
# [1.14.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.8...v1.14.0-dev.9) (2024-09-09)

### Bug Fixes

* **YouTube - SponsorBlock:** Add summary text to 'view my segments' button ([0f5dfb4](0f5dfb4e76))

### Features

* **YouTube:** Add donation link to settings about screen ([#688](https://github.com/ReVanced/revanced-integrations/issues/688)) ([b816c45](b816c45838))
2024-09-09 07:24:25 +00:00
LisoUseInAIKyrios
b816c45838 feat(YouTube): Add donation link to settings about screen (#688) 2024-09-09 03:21:05 -04:00
LisoUseInAIKyrios
0f5dfb4e76 fix(YouTube - SponsorBlock): Add summary text to 'view my segments' button 2024-09-09 03:17:38 -04:00
semantic-release-bot
2c2641e1cf chore(release): 1.14.0-dev.8 [skip ci]
# [1.14.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.7...v1.14.0-dev.8) (2024-09-06)

### Bug Fixes

* **YouTube - Check environment patch:** Show if patched apk is too old, if the install source is not Manager or ADB ([18048f3](18048f3324))
2024-09-06 09:42:41 +00:00
LisoUseInAIKyrios
18048f3324 fix(YouTube - Check environment patch): Show if patched apk is too old, if the install source is not Manager or ADB 2024-09-06 05:39:33 -04:00
semantic-release-bot
dffe7f6c34 chore(release): 1.14.0-dev.7 [skip ci]
# [1.14.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.6...v1.14.0-dev.7) (2024-09-06)

### Bug Fixes

* **YouTube - Check environment patch:** Allow adb installs even if patched more than 30 minutes ago ([5adf8bd](5adf8bdd67))
2024-09-06 08:58:50 +00:00
LisoUseInAIKyrios
5adf8bdd67 fix(YouTube - Check environment patch): Allow adb installs even if patched more than 30 minutes ago 2024-09-06 04:55:33 -04:00
semantic-release-bot
5f6239b610 chore(release): 1.14.0-dev.6 [skip ci]
# [1.14.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.5...v1.14.0-dev.6) (2024-09-06)

### Bug Fixes

* **YouTube - Check environment patch:** Use app install/update time instead of current time ([#687](https://github.com/ReVanced/revanced-integrations/issues/687)) ([b0d82b0](b0d82b016e))
2024-09-06 08:47:32 +00:00
LisoUseInAIKyrios
b0d82b016e fix(YouTube - Check environment patch): Use app install/update time instead of current time (#687) 2024-09-06 04:44:14 -04:00
semantic-release-bot
5b9e0e8ad4 chore(release): 1.14.0-dev.5 [skip ci]
# [1.14.0-dev.5](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.4...v1.14.0-dev.5) (2024-09-06)

### Features

* Add `Check environment` patch ([#683](https://github.com/ReVanced/revanced-integrations/issues/683)) ([e856455](e856455283))
2024-09-06 08:30:14 +00:00
oSumAtrIX
e856455283 feat: Add Check environment patch (#683)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-09-06 10:27:02 +02:00
semantic-release-bot
a324b16096 chore(release): 1.14.0-dev.4 [skip ci]
# [1.14.0-dev.4](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.3...v1.14.0-dev.4) (2024-09-01)

### Bug Fixes

* **YouTube - GmsCore support:** Show an error toast if GmsCore is included with root mounted installation ([#686](https://github.com/ReVanced/revanced-integrations/issues/686)) ([a4848be](a4848be653))
2024-09-01 22:06:37 +00:00
LisoUseInAIKyrios
a4848be653 fix(YouTube - GmsCore support): Show an error toast if GmsCore is included with root mounted installation (#686)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-09-01 18:03:43 -04:00
semantic-release-bot
a35dfe8ea3 chore(release): 1.14.0-dev.3 [skip ci]
# [1.14.0-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.2...v1.14.0-dev.3) (2024-09-01)

### Bug Fixes

* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([#684](https://github.com/ReVanced/revanced-integrations/issues/684)) ([27d2b60](27d2b60444))
2024-09-01 21:52:14 +00:00
LisoUseInAIKyrios
27d2b60444 fix(YouTube - ReturnYouTubeDislike): Show estimated like count for videos with hidden likes (#684) 2024-09-01 17:49:15 -04:00
semantic-release-bot
55c278dc08 chore(release): 1.14.0-dev.2 [skip ci]
# [1.14.0-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.14.0-dev.1...v1.14.0-dev.2) (2024-08-30)

### Features

* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([#681](https://github.com/ReVanced/revanced-integrations/issues/681)) ([5314dd9](5314dd90d1))
2024-08-30 21:41:55 +00:00
LisoUseInAIKyrios
5314dd90d1 feat(YouTube - Keyword filter): Add syntax to match whole keywords and not substrings (#681)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-08-30 17:38:44 -04:00
semantic-release-bot
db81332078 chore(release): 1.14.0-dev.1 [skip ci]
# [1.14.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.13.1-dev.2...v1.14.0-dev.1) (2024-08-22)

### Features

* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([#679](https://github.com/ReVanced/revanced-integrations/issues/679)) ([2c471f3](2c471f39c2))
2024-08-22 17:50:39 +00:00
LisoUseInAIKyrios
2c471f39c2 feat(YouTube - Spoof client): Allow forcing AVC codec with iOS (#679) 2024-08-22 13:47:15 -04:00
semantic-release-bot
08d9f612a6 chore(release): 1.13.1-dev.2 [skip ci]
## [1.13.1-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v1.13.1-dev.1...v1.13.1-dev.2) (2024-08-20)

### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community post ([#678](https://github.com/ReVanced/revanced-integrations/issues/678)) ([6be257a](6be257a7a6))
2024-08-20 06:20:04 +00:00
Bceez
6be257a7a6 fix(YouTube - Hide layout components): Hide new kind of community post (#678) 2024-08-20 08:16:43 +02:00
semantic-release-bot
7a58ae5d0e chore(release): 1.13.1-dev.1 [skip ci]
## [1.13.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.13.0...v1.13.1-dev.1) (2024-08-20)

### Bug Fixes

* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([01f084d](01f084d87a))
2024-08-20 04:20:24 +00:00
LisoUseInAIKyrios
01f084d87a fix(YouTube - SponsorBlock): Handle if the user enters an invalid number into any SB settings 2024-08-20 00:16:42 -04:00
semantic-release-bot
9e11ba11d9 chore(release): 1.13.0 [skip ci]
# [1.13.0](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0...v1.13.0) (2024-08-15)

### Features

* **YouTube:** Add `Check watch history domain name resolution` patch ([#675](https://github.com/ReVanced/revanced-integrations/issues/675)) ([57d6834](57d6834a2c))
2024-08-15 17:30:27 +00:00
oSumAtrIX
71233ef0ab chore: Merge branch dev to main (#676) 2024-08-15 21:27:09 +04:00
semantic-release-bot
95bb8a7dea chore(release): 1.13.0-dev.1 [skip ci]
# [1.13.0-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0...v1.13.0-dev.1) (2024-08-15)

### Features

* **YouTube:** Add `Check watch history domain name resolution` patch ([#675](https://github.com/ReVanced/revanced-integrations/issues/675)) ([57d6834](57d6834a2c))
2024-08-15 16:09:10 +00:00
LisoUseInAIKyrios
57d6834a2c feat(YouTube): Add Check watch history domain name resolution patch (#675) 2024-08-15 12:06:02 -04:00
semantic-release-bot
c8d381de5e chore(release): 1.12.0 [skip ci]
# [1.12.0](https://github.com/ReVanced/revanced-integrations/compare/v1.11.1...v1.12.0) (2024-08-06)

### Bug Fixes

* adjust blacklist ([d8d2a85](d8d2a852d3))
* **YouTube - Alternative thumbnails:** Always use primary thumbnail domain for still captures ([#666](https://github.com/ReVanced/revanced-integrations/issues/666)) ([7cdaf8d](7cdaf8df14))
* **YouTube - Client Spoof:** Restore missing high qualities by spoofing the iOS client user agent  ([#668](https://github.com/ReVanced/revanced-integrations/issues/668)) ([fbf629f](fbf629fd62))
* **YouTube - Disable auto captions:** Do not break Shorts captions menu ([0345a00](0345a00d60))
* **YouTube - Hide keyword content:** Do not hide flyout menu ([cda1f31](cda1f3160c))
* **YouTube - Hide keyword content:** Do not hide flyout menu ([#664](https://github.com/ReVanced/revanced-integrations/issues/664)) ([120188d](120188d643))
* **YouTube - Hide layout components:** Hide new type of horizontal shelf ([1fa59a6](1fa59a62a1))
* **YouTube - Keyword filter:** Filter videos from new subscription layout ([2f2eeea](2f2eeea5a7))
* **YouTube - Return YouTube Dislike:** Fix dislikes not appearing due to new component name ([#674](https://github.com/ReVanced/revanced-integrations/issues/674)) ([509e151](509e1516f8))
* **YouTube - SponsorBlock:** Correctly show minute timestamp when creating a new segment ([e71955d](e71955d5bb))
* **YouTube - SponsorBlock:** Improve create segment manual seek accuracy ([#671](https://github.com/ReVanced/revanced-integrations/issues/671)) ([34c02ae](34c02aeb2a))
* **YouTube - Spoof client:** Fix tracking history on brand accounts ([#669](https://github.com/ReVanced/revanced-integrations/issues/669)) ([4ac698f](4ac698fd4b))
* **YouTube - Spoof client:** Restore livestream audio only playback with iOS spoofing ([#673](https://github.com/ReVanced/revanced-integrations/issues/673)) ([5bf5fbd](5bf5fbd1a7))

### Features

* **YouTube - Description components:** Add  `Hide 'Key concepts' section` option ([#670](https://github.com/ReVanced/revanced-integrations/issues/670)) ([86b25ea](86b25ea468))
* **YouTube:** Add `Bypass image region restrictions` patch ([#667](https://github.com/ReVanced/revanced-integrations/issues/667)) ([396ba77](396ba77c20))
2024-08-06 00:09:03 +00:00
oSumAtrIX
e5736fc27f chore: Merge branch dev to main (#665) 2024-08-06 02:05:46 +02:00
semantic-release-bot
36cb36fbfd chore(release): 1.12.0-dev.10 [skip ci]
# [1.12.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0-dev.9...v1.12.0-dev.10) (2024-08-05)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Fix dislikes not appearing due to new component name ([#674](https://github.com/ReVanced/revanced-integrations/issues/674)) ([509e151](509e1516f8))
2024-08-05 22:11:15 +00:00
oSumAtrIX
509e1516f8 fix(YouTube - Return YouTube Dislike): Fix dislikes not appearing due to new component name (#674) 2024-08-06 00:07:39 +02:00
semantic-release-bot
7017488de9 chore(release): 1.12.0-dev.9 [skip ci]
# [1.12.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0-dev.8...v1.12.0-dev.9) (2024-08-04)

### Bug Fixes

* **YouTube - Spoof client:** Restore livestream audio only playback with iOS spoofing ([#673](https://github.com/ReVanced/revanced-integrations/issues/673)) ([5bf5fbd](5bf5fbd1a7))
2024-08-04 19:41:12 +00:00
LisoUseInAIKyrios
5bf5fbd1a7 fix(YouTube - Spoof client): Restore livestream audio only playback with iOS spoofing (#673) 2024-08-04 21:38:07 +02:00
semantic-release-bot
a0f3d7a0f7 chore(release): 1.12.0-dev.8 [skip ci]
# [1.12.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0-dev.7...v1.12.0-dev.8) (2024-08-02)

### Bug Fixes

* **YouTube - SponsorBlock:** Improve create segment manual seek accuracy ([#671](https://github.com/ReVanced/revanced-integrations/issues/671)) ([34c02ae](34c02aeb2a))
2024-08-02 13:43:19 +00:00
LisoUseInAIKyrios
34c02aeb2a fix(YouTube - SponsorBlock): Improve create segment manual seek accuracy (#671) 2024-08-02 09:39:33 -04:00
semantic-release-bot
d57a64b659 chore(release): 1.12.0-dev.7 [skip ci]
# [1.12.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0-dev.6...v1.12.0-dev.7) (2024-08-01)

### Features

* **YouTube - Description components:** Add  `Hide 'Key concepts' section` option ([#670](https://github.com/ReVanced/revanced-integrations/issues/670)) ([86b25ea](86b25ea468))
2024-08-01 11:30:52 +00:00
ILoveOpenSourceApplications
86b25ea468 feat(YouTube - Description components): Add Hide 'Key concepts' section option (#670)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: ILoveOpenSourceApplications <ILoveOpenSourceApplications@users.noreply.github.com>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-08-01 13:27:19 +02:00
semantic-release-bot
e879e40e56 chore(release): 1.12.0-dev.6 [skip ci]
# [1.12.0-dev.6](https://github.com/ReVanced/revanced-integrations/compare/v1.12.0-dev.5...v1.12.0-dev.6) (2024-07-28)

### Bug Fixes

* **YouTube - Keyword filter:** Filter videos from new subscription layout ([2f2eeea](2f2eeea5a7))
2024-07-28 17:22:53 +00:00
LisoUseInAIKyrios
2f2eeea5a7 fix(YouTube - Keyword filter): Filter videos from new subscription layout 2024-07-28 13:19:40 -04:00
84 changed files with 5085 additions and 3277 deletions

View File

@@ -25,7 +25,7 @@ jobs:
pr_body: |
This pull request will ${{ env.MESSAGE }}.
## Dependencies before merge
## Before merging this PR
- [ ] https://github.com/revanced/revanced-patches
- [ ] Remember about https://github.com/revanced/revanced-patches
pr_draft: true

View File

@@ -10,6 +10,8 @@ on:
jobs:
release:
name: Release
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -49,5 +51,5 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm exec semantic-release

View File

@@ -23,7 +23,8 @@
"assets": [
"CHANGELOG.md",
"gradle.properties"
]
],
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,7 @@ import java.net.URL;
* @noinspection unused
*/
public class GmsCoreSupport {
public static final String ORIGINAL_UNPATCHED_PACKAGE_NAME = "com.google.android.youtube";
private static final String GMS_CORE_PACKAGE_NAME
= getGmsCoreVendorGroupId() + ".android.gms";
private static final Uri GMS_CORE_PROVIDER
@@ -53,18 +54,15 @@ public class GmsCoreSupport {
String dialogMessageRef,
String positiveButtonStringRef,
DialogInterface.OnClickListener onPositiveClickListener) {
// Use a delay to allow the activity to finish initializing.
// Otherwise, if device is in dark mode the dialog is shown with wrong color scheme.
Utils.runOnMainThreadDelayed(() -> {
new AlertDialog.Builder(context)
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(str("gms_core_dialog_title"))
.setMessage(str(dialogMessageRef))
.setPositiveButton(str(positiveButtonStringRef), onPositiveClickListener)
// Allow using back button to skip the action, just in case the check can never be satisfied.
.setCancelable(true)
.show();
}, 100);
// Do not set cancelable to false, to allow using back button to skip the action,
// just in case the check can never be satisfied.
var dialog = new AlertDialog.Builder(context)
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(str("gms_core_dialog_title"))
.setMessage(str(dialogMessageRef))
.setPositiveButton(str(positiveButtonStringRef), onPositiveClickListener)
.create();
Utils.showDialog(context, dialog);
}
/**
@@ -73,6 +71,21 @@ public class GmsCoreSupport {
@RequiresApi(api = Build.VERSION_CODES.N)
public static void checkGmsCore(Activity context) {
try {
// Verify the user has not included GmsCore for a root installation.
// GmsCore Support changes the package name, but with a mounted installation
// all manifest changes are ignored and the original package name is used.
if (context.getPackageName().equals(ORIGINAL_UNPATCHED_PACKAGE_NAME)) {
Logger.printInfo(() -> "App is mounted with root, but GmsCore patch was included");
// Cannot use localize text here, since the app will load
// resources from the unpatched app and all patch strings are missing.
Utils.showToastLong("The 'GmsCore support' patch breaks mount installations");
// Do not exit. If the app exits before launch completes (and without
// opening another activity), then on some devices such as Pixel phone Android 10
// no toast will be shown and the app will continually be relaunched
// with the appearance of a hung app.
}
// Verify GmsCore is installed.
try {
PackageManager manager = context.getPackageManager();

View File

@@ -1,24 +1,21 @@
package app.revanced.integrations.shared;
import static app.revanced.integrations.shared.settings.BaseSettings.DEBUG;
import static app.revanced.integrations.shared.settings.BaseSettings.DEBUG_STACKTRACE;
import static app.revanced.integrations.shared.settings.BaseSettings.DEBUG_TOAST_ON_ERROR;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.settings.BaseSettings;
import java.io.PrintWriter;
import java.io.StringWriter;
import app.revanced.integrations.shared.settings.BaseSettings;
import static app.revanced.integrations.shared.settings.BaseSettings.*;
public class Logger {
/**
* Log messages using lambdas.
*/
@FunctionalInterface
public interface LogMessage {
@NonNull
String buildMessageString();
@@ -59,19 +56,33 @@ public class Logger {
* so the performance cost of building strings is paid only if {@link BaseSettings#DEBUG} is enabled.
*/
public static void printDebug(@NonNull LogMessage message) {
printDebug(message, null);
}
/**
* Logs debug messages under the outer class name of the code calling this method.
* Whenever possible, the log string should be constructed entirely inside {@link LogMessage#buildMessageString()}
* so the performance cost of building strings is paid only if {@link BaseSettings#DEBUG} is enabled.
*/
public static void printDebug(@NonNull LogMessage message, @Nullable Exception ex) {
if (DEBUG.get()) {
var messageString = message.buildMessageString();
String logMessage = message.buildMessageString();
String logTag = REVANCED_LOG_PREFIX + message.findOuterClassSimpleName();
if (DEBUG_STACKTRACE.get()) {
var builder = new StringBuilder(messageString);
var builder = new StringBuilder(logMessage);
var sw = new StringWriter();
new Throwable().printStackTrace(new PrintWriter(sw));
builder.append('\n').append(sw);
messageString = builder.toString();
logMessage = builder.toString();
}
Log.d(REVANCED_LOG_PREFIX + message.findOuterClassSimpleName(), messageString);
if (ex == null) {
Log.d(logTag, logMessage);
} else {
Log.d(logTag, logMessage, ex);
}
}
}

View File

@@ -1,6 +1,7 @@
package app.revanced.integrations.shared;
import android.annotation.SuppressLint;
import android.app.*;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
@@ -8,6 +9,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.Preference;
@@ -104,7 +106,7 @@ public class Utils {
}
/**
* Hide a view by setting its layout height and width to 1dp.
* Hide a view by setting its layout height and width to 0dp.
*
* @param condition The setting to check for hiding the view.
* @param view The view to hide.
@@ -263,6 +265,20 @@ public class Utils {
boolean matches(T object);
}
/**
* Includes sub children.
*
* @noinspection unchecked
*/
public static <R extends View> R getChildViewByResourceName(@NonNull View view, @NonNull String str) {
var child = view.findViewById(Utils.getResourceIdentifier(str, "id"));
if (child != null) {
return (R) child;
}
throw new IllegalArgumentException("View with resource name '" + str + "' not found");
}
/**
* @param searchRecursively If children ViewGroups should also be
* recursively searched using depth first search.
@@ -273,7 +289,6 @@ public class Utils {
@NonNull MatchFilter<View> filter) {
for (int i = 0, childCount = viewGroup.getChildCount(); i < childCount; i++) {
View childAt = viewGroup.getChildAt(i);
Logger.printDebug(() -> "View id: " + childAt.getId() + " tag: " + childAt.getTag());
if (filter.matches(childAt)) {
//noinspection unchecked
@@ -285,6 +300,7 @@ public class Utils {
if (match != null) return match;
}
}
return null;
}
@@ -363,6 +379,99 @@ public class Utils {
return isRightToLeftTextLayout;
}
/**
* @return if the text contains at least 1 number character,
* including any unicode numbers such as Arabic.
*/
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public static boolean containsNumber(@NonNull CharSequence text) {
for (int index = 0, length = text.length(); index < length;) {
final int codePoint = Character.codePointAt(text, index);
if (Character.isDigit(codePoint)) {
return true;
}
index += Character.charCount(codePoint);
}
return false;
}
/**
* Ignore this class. It must be public to satisfy Android requirements.
*/
@SuppressWarnings("deprecation")
public static final class DialogFragmentWrapper extends DialogFragment {
private Dialog dialog;
@Nullable
private DialogFragmentOnStartAction onStartAction;
@Override
public void onSaveInstanceState(Bundle outState) {
// Do not call super method to prevent state saving.
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return dialog;
}
@Override
public void onStart() {
try {
super.onStart();
if (onStartAction != null) {
onStartAction.onStart((AlertDialog) getDialog());
}
} catch (Exception ex) {
Logger.printException(() -> "onStart failure: " + dialog.getClass().getSimpleName(), ex);
}
}
}
/**
* Interface for {@link #showDialog(Activity, AlertDialog, boolean, DialogFragmentOnStartAction)}.
*/
@FunctionalInterface
public interface DialogFragmentOnStartAction {
void onStart(AlertDialog dialog);
}
public static void showDialog(Activity activity, AlertDialog dialog) {
showDialog(activity, dialog, true, null);
}
/**
* Utility method to allow showing an AlertDialog on top of other alert dialogs.
* Calling this will always display the dialog on top of all other dialogs
* previously called using this method.
* <br>
* Be aware the on start action can be called multiple times for some situations,
* such as the user switching apps without dismissing the dialog then switching back to this app.
*<br>
* This method is only useful during app startup and multiple patches may show their own dialog,
* and the most important dialog can be called last (using a delay) so it's always on top.
*<br>
* For all other situations it's better to not use this method and
* call {@link AlertDialog#show()} on the dialog.
*/
@SuppressWarnings("deprecation")
public static void showDialog(Activity activity,
AlertDialog dialog,
boolean isCancelable,
@Nullable DialogFragmentOnStartAction onStartAction) {
verifyOnMainThread();
DialogFragmentWrapper fragment = new DialogFragmentWrapper();
fragment.dialog = dialog;
fragment.onStartAction = onStartAction;
fragment.setCancelable(isCancelable);
fragment.show(activity.getFragmentManager(), null);
}
/**
* Safe to call from any thread
*/
@@ -612,4 +721,21 @@ public class Utils {
pref.setOrder(order);
}
}
/**
* If {@link Fragment} uses [Android library] rather than [AndroidX library],
* the Dialog theme corresponding to [Android library] should be used.
* <p>
* If not, the following issues will occur:
* <a href="https://github.com/ReVanced/revanced-patches/issues/3061">ReVanced/revanced-patches#3061</a>
* <p>
* To prevent these issues, apply the Dialog theme corresponding to [Android library].
*/
public static void setEditTextDialogTheme(AlertDialog.Builder builder) {
final int editTextDialogStyle = getResourceIdentifier(
"revanced_edit_text_dialog_style", "style");
if (editTextDialogStyle != 0) {
builder.getContext().setTheme(editTextDialogStyle);
}
}
}

View File

@@ -0,0 +1,164 @@
package app.revanced.integrations.shared.checks;
import static android.text.Html.FROM_HTML_MODE_COMPACT;
import static app.revanced.integrations.shared.StringRef.str;
import static app.revanced.integrations.shared.Utils.DialogFragmentOnStartAction;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.text.Html;
import android.widget.Button;
import androidx.annotation.Nullable;
import java.util.Collection;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.settings.Settings;
abstract class Check {
private static final int NUMBER_OF_TIMES_TO_IGNORE_WARNING_BEFORE_DISABLING = 2;
private static final int SECONDS_BEFORE_SHOWING_IGNORE_BUTTON = 15;
private static final int SECONDS_BEFORE_SHOWING_WEBSITE_BUTTON = 10;
private static final Uri GOOD_SOURCE = Uri.parse("https://revanced.app");
/**
* @return If the check conclusively passed or failed. A null value indicates it neither passed nor failed.
*/
@Nullable
protected abstract Boolean check();
protected abstract String failureReason();
/**
* Specifies a sorting order for displaying the checks that failed.
* A lower value indicates to show first before other checks.
*/
public abstract int uiSortingValue();
/**
* For debugging and development only.
* Forces all checks to be performed and the check failed dialog to be shown.
* Can be enabled by importing settings text with {@link Settings#CHECK_ENVIRONMENT_WARNINGS_ISSUED}
* set to -1.
*/
static boolean debugAlwaysShowWarning() {
final boolean alwaysShowWarning = Settings.CHECK_ENVIRONMENT_WARNINGS_ISSUED.get() < 0;
if (alwaysShowWarning) {
Logger.printInfo(() -> "Debug forcing environment check warning to show");
}
return alwaysShowWarning;
}
static boolean shouldRun() {
return Settings.CHECK_ENVIRONMENT_WARNINGS_ISSUED.get()
< NUMBER_OF_TIMES_TO_IGNORE_WARNING_BEFORE_DISABLING;
}
static void disableForever() {
Logger.printInfo(() -> "Environment checks disabled forever");
Settings.CHECK_ENVIRONMENT_WARNINGS_ISSUED.save(Integer.MAX_VALUE);
}
@SuppressLint("NewApi")
static void issueWarning(Activity activity, Collection<Check> failedChecks) {
final var reasons = new StringBuilder();
reasons.append("<ul>");
for (var check : failedChecks) {
// Add a non breaking space to fix bullet points spacing issue.
reasons.append("<li>&nbsp;").append(check.failureReason());
}
reasons.append("</ul>");
var message = Html.fromHtml(
str("revanced_check_environment_failed_message", reasons.toString()),
FROM_HTML_MODE_COMPACT
);
Utils.runOnMainThreadDelayed(() -> {
AlertDialog alert = new AlertDialog.Builder(activity)
.setCancelable(false)
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(str("revanced_check_environment_failed_title"))
.setMessage(message)
.setPositiveButton(
" ",
(dialog, which) -> {
final var intent = new Intent(Intent.ACTION_VIEW, GOOD_SOURCE);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);
// Shutdown to prevent the user from navigating back to this app,
// which is no longer showing a warning dialog.
activity.finishAffinity();
System.exit(0);
}
).setNegativeButton(
" ",
(dialog, which) -> {
// Cleanup data if the user incorrectly imported a huge negative number.
final int current = Math.max(0, Settings.CHECK_ENVIRONMENT_WARNINGS_ISSUED.get());
Settings.CHECK_ENVIRONMENT_WARNINGS_ISSUED.save(current + 1);
dialog.dismiss();
}
).create();
Utils.showDialog(activity, alert, false, new DialogFragmentOnStartAction() {
boolean hasRun;
@Override
public void onStart(AlertDialog dialog) {
// Only run this once, otherwise if the user changes to a different app
// then changes back, this handler will run again and disable the buttons.
if (hasRun) {
return;
}
hasRun = true;
var openWebsiteButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
openWebsiteButton.setEnabled(false);
var dismissButton = dialog.getButton(DialogInterface.BUTTON_NEGATIVE);
dismissButton.setEnabled(false);
getCountdownRunnable(dismissButton, openWebsiteButton).run();
}
});
}, 1000); // Use a delay, so this dialog is shown on top of any other startup dialogs.
}
private static Runnable getCountdownRunnable(Button dismissButton, Button openWebsiteButton) {
return new Runnable() {
private int secondsRemaining = SECONDS_BEFORE_SHOWING_IGNORE_BUTTON;
@Override
public void run() {
Utils.verifyOnMainThread();
if (secondsRemaining > 0) {
if (secondsRemaining - SECONDS_BEFORE_SHOWING_WEBSITE_BUTTON == 0) {
openWebsiteButton.setText(str("revanced_check_environment_dialog_open_official_source_button"));
openWebsiteButton.setEnabled(true);
}
secondsRemaining--;
Utils.runOnMainThreadDelayed(this, 1000);
} else {
dismissButton.setText(str("revanced_check_environment_dialog_ignore_button"));
dismissButton.setEnabled(true);
}
}
};
}
}

View File

@@ -0,0 +1,28 @@
package app.revanced.integrations.shared.checks;
// Fields are set by the patch. Do not modify.
// Fields are not final, because the compiler is inlining them.
final class PatchInfo {
static long PATCH_TIME = 0L;
final static class Build {
static String PATCH_BOARD = "";
static String PATCH_BOOTLOADER = "";
static String PATCH_BRAND = "";
static String PATCH_CPU_ABI = "";
static String PATCH_CPU_ABI2 = "";
static String PATCH_DEVICE = "";
static String PATCH_DISPLAY = "";
static String PATCH_FINGERPRINT = "";
static String PATCH_HARDWARE = "";
static String PATCH_HOST = "";
static String PATCH_ID = "";
static String PATCH_MANUFACTURER = "";
static String PATCH_MODEL = "";
static String PATCH_PRODUCT = "";
static String PATCH_RADIO = "";
static String PATCH_TAGS = "";
static String PATCH_TYPE = "";
static String PATCH_USER = "";
}
}

View File

@@ -208,6 +208,8 @@ public abstract class Setting<T> {
* Migrate a setting value if the path is renamed but otherwise the old and new settings are identical.
*/
public static <T> void migrateOldSettingToNew(@NonNull Setting<T> oldSetting, @NonNull Setting<T> newSetting) {
if (oldSetting == newSetting) throw new IllegalArgumentException();
if (!oldSetting.isSetToDefault()) {
Logger.printInfo(() -> "Migrating old setting value: " + oldSetting + " into replacement setting: " + newSetting);
newSetting.save(oldSetting.value);

View File

@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.shared.settings.BaseSettings;
import app.revanced.integrations.shared.settings.BooleanSetting;
import app.revanced.integrations.shared.settings.Setting;
@@ -141,8 +142,13 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
} else if (pref.hasKey()) {
String key = pref.getKey();
Setting<?> setting = Setting.getSettingFromPath(key);
if (setting != null) {
updatePreference(pref, setting, syncSettingValue, applySettingToPreference);
} else if (BaseSettings.DEBUG.get() && (pref instanceof SwitchPreference
|| pref instanceof EditTextPreference || pref instanceof ListPreference)) {
// Probably a typo in the patches preference declaration.
Logger.printException(() -> "Preference key has no setting: " + key);
}
}
}

View File

@@ -66,6 +66,8 @@ public class ImportExportPreference extends EditTextPreference implements Prefer
@Override
protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
try {
Utils.setEditTextDialogTheme(builder);
// Show the user the settings in JSON format.
builder.setNeutralButton(str("revanced_settings_import_copy"), (dialog, which) -> {
Utils.setClipboard(getEditText().getText().toString());

View File

@@ -1,5 +1,6 @@
package app.revanced.integrations.shared.settings.preference;
import static app.revanced.integrations.shared.StringRef.sf;
import static app.revanced.integrations.shared.StringRef.str;
import static app.revanced.integrations.youtube.requests.Route.Method.GET;
@@ -71,7 +72,7 @@ public class ReVancedAboutPreference extends Preference {
return Color.BLACK;
}
private String createDialogHtml(ReVancedSocialLink[] socialLinks) {
private String createDialogHtml(WebLink[] socialLinks) {
final boolean isNetworkConnected = Utils.isNetworkConnected();
StringBuilder builder = new StringBuilder();
@@ -122,7 +123,7 @@ public class ReVancedAboutPreference extends Preference {
.append("</h2>");
builder.append("<div>");
for (ReVancedSocialLink social : socialLinks) {
for (WebLink social : socialLinks) {
builder.append("<div style=\"margin-bottom: 20px;\">");
builder.append(String.format("<a href=\"%s\">%s</a>", social.url, social.name));
builder.append("</div>");
@@ -151,7 +152,7 @@ public class ReVancedAboutPreference extends Preference {
}
private void fetchLinksAndShowDialog(@Nullable ProgressDialog progress) {
ReVancedSocialLink[] socialLinks = SocialLinksRoutes.fetchSocialLinks();
WebLink[] socialLinks = SocialLinksRoutes.fetchSocialLinks();
String htmlDialog = createDialogHtml(socialLinks);
Utils.runOnMainThreadNowOrLater(() -> {
@@ -221,19 +222,19 @@ class WebViewDialog extends Dialog {
}
}
class ReVancedSocialLink {
class WebLink {
final boolean preferred;
final String name;
final String url;
ReVancedSocialLink(JSONObject json) throws JSONException {
WebLink(JSONObject json) throws JSONException {
this(json.getBoolean("preferred"),
json.getString("name"),
json.getString("url")
);
}
ReVancedSocialLink(boolean preferred, String name, String url) {
WebLink(boolean preferred, String name, String url) {
this.preferred = preferred;
this.name = name;
this.url = url;
@@ -251,24 +252,33 @@ class ReVancedSocialLink {
}
class SocialLinksRoutes {
/**
* Simple link to the website donate page,
* rather than fetching and parsing the donation links using the API.
*/
public static final WebLink DONATE_LINK = new WebLink(true,
sf("revanced_settings_about_links_donate").toString(),
"https://revanced.app/donate");
/**
* Links to use if fetch links api call fails.
*/
private static final ReVancedSocialLink[] NO_CONNECTION_STATIC_LINKS = {
new ReVancedSocialLink(true, "ReVanced.app", "https://revanced.app")
private static final WebLink[] NO_CONNECTION_STATIC_LINKS = {
new WebLink(true, "ReVanced.app", "https://revanced.app"),
DONATE_LINK,
};
private static final String SOCIAL_LINKS_PROVIDER = "https://api.revanced.app/v2";
private static final Route.CompiledRoute GET_SOCIAL = new Route(GET, "/socials").compile();
@Nullable
private static volatile ReVancedSocialLink[] fetchedLinks;
private static volatile WebLink[] fetchedLinks;
static boolean hasFetchedLinks() {
return fetchedLinks != null;
}
static ReVancedSocialLink[] fetchSocialLinks() {
static WebLink[] fetchSocialLinks() {
try {
if (hasFetchedLinks()) return fetchedLinks;
@@ -290,14 +300,17 @@ class SocialLinksRoutes {
JSONObject json = Requester.parseJSONObjectAndDisconnect(connection);
JSONArray socials = json.getJSONArray("socials");
List<ReVancedSocialLink> links = new ArrayList<>();
List<WebLink> links = new ArrayList<>();
links.add(DONATE_LINK); // Show donate link first.
for (int i = 0, length = socials.length(); i < length; i++) {
ReVancedSocialLink link = new ReVancedSocialLink(socials.getJSONObject(i));
WebLink link = new WebLink(socials.getJSONObject(i));
links.add(link);
}
Logger.printDebug(() -> "links: " + links);
return fetchedLinks = links.toArray(new ReVancedSocialLink[0]);
return fetchedLinks = links.toArray(new WebLink[0]);
} catch (SocketTimeoutException ex) {
Logger.printInfo(() -> "Could not fetch social links", ex); // No toast.

View File

@@ -7,6 +7,8 @@ import android.preference.EditTextPreference;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.EditText;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.shared.settings.Setting;
import app.revanced.integrations.shared.Logger;
@@ -33,6 +35,8 @@ public class ResettableEditTextPreference extends EditTextPreference {
@Override
protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
super.onPrepareDialogBuilder(builder);
Utils.setEditTextDialogTheme(builder);
Setting<?> setting = Setting.getSettingFromPath(getKey());
if (setting != null) {
builder.setNeutralButton(str("revanced_settings_reset"), null);

View File

@@ -0,0 +1,77 @@
package app.revanced.integrations.syncforreddit;
import android.util.Pair;
import androidx.annotation.Nullable;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
/**
* @noinspection unused
*/
public class FixRedditVideoDownloadPatch {
private static @Nullable Pair<Integer, String> getBestMpEntry(Element element) {
var representations = element.getElementsByTagName("Representation");
var entries = new ArrayList<Pair<Integer, String>>();
for (int i = 0; i < representations.getLength(); i++) {
Element representation = (Element) representations.item(i);
var bandwidthStr = representation.getAttribute("bandwidth");
try {
var bandwidth = Integer.parseInt(bandwidthStr);
var baseUrl = representation.getElementsByTagName("BaseURL").item(0);
if (baseUrl != null) {
entries.add(new Pair<>(bandwidth, baseUrl.getTextContent()));
}
} catch (NumberFormatException ignored) {
}
}
if (entries.isEmpty()) {
return null;
}
Collections.sort(entries, (e1, e2) -> e2.first - e1.first);
return entries.get(0);
}
private static String[] parse(byte[] data) throws ParserConfigurationException, IOException, SAXException {
var adaptionSets = DocumentBuilderFactory
.newInstance()
.newDocumentBuilder()
.parse(new ByteArrayInputStream(data))
.getElementsByTagName("AdaptationSet");
String videoUrl = null;
String audioUrl = null;
for (int i = 0; i < adaptionSets.getLength(); i++) {
Element element = (Element) adaptionSets.item(i);
var contentType = element.getAttribute("contentType");
var bestEntry = getBestMpEntry(element);
if (bestEntry == null) continue;
if (contentType.equalsIgnoreCase("video")) {
videoUrl = bestEntry.second;
} else if (contentType.equalsIgnoreCase("audio")) {
audioUrl = bestEntry.second;
}
}
return new String[]{videoUrl, audioUrl};
}
public static String[] getLinks(byte[] data) {
try {
return parse(data);
} catch (ParserConfigurationException | IOException | SAXException e) {
return new String[]{null, null};
}
}
}

View File

@@ -0,0 +1,16 @@
package app.revanced.integrations.twitter.patches.links;
public final class ChangeLinkSharingDomainPatch {
private static final String DOMAIN_NAME = "https://fxtwitter.com";
private static final String LINK_FORMAT = "%s/%s/status/%s";
public static String formatResourceLink(Object... formatArgs) {
String username = (String) formatArgs[0];
String tweetId = (String) formatArgs[1];
return String.format(LINK_FORMAT, DOMAIN_NAME, username, tweetId);
}
public static String formatLink(long tweetId, String username) {
return String.format(LINK_FORMAT, DOMAIN_NAME, username, tweetId);
}
}

View File

@@ -8,7 +8,9 @@ public class BackgroundPlaybackPatch {
/**
* Injection point.
*/
public static boolean playbackIsNotShort() {
public static boolean allowBackgroundPlayback(boolean original) {
if (original) return true;
// Steps to verify most edge cases:
// 1. Open a regular video
// 2. Minimize app (PIP should appear)

View File

@@ -1,21 +1,129 @@
package app.revanced.integrations.youtube.patches;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import android.content.Intent;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class ChangeStartPagePatch {
public static void changeIntent(final Intent intent) {
final var startPage = Settings.START_PAGE.get();
if (startPage.isEmpty()) return;
Logger.printDebug(() -> "Changing start page to " + startPage);
public enum StartPage {
/**
* Unmodified type, and same as un-patched.
*/
ORIGINAL("", null),
if (startPage.startsWith("www"))
intent.setData(Uri.parse(startPage));
else
intent.setAction("com.google.android.youtube.action." + startPage);
/**
* Browse id.
*/
BROWSE("FEguide_builder", TRUE),
EXPLORE("FEexplore", TRUE),
HISTORY("FEhistory", TRUE),
LIBRARY("FElibrary", TRUE),
MOVIE("FEstorefront", TRUE),
SUBSCRIPTIONS("FEsubscriptions", TRUE),
TRENDING("FEtrending", TRUE),
/**
* Channel id, this can be used as a browseId.
*/
GAMING("UCOpNcN46UbXVtpKMrmU4Abg", TRUE),
LIVE("UC4R8DWoMoI7CAwX8_LjQHig", TRUE),
MUSIC("UC-9-kyTW8ZkZNDHQJ6FgpwQ", TRUE),
SPORTS("UCEgdi0XIXXZ-qJOFPf4JSKw", TRUE),
/**
* Playlist id, this can be used as a browseId.
*/
LIKED_VIDEO("VLLL", TRUE),
WATCH_LATER("VLWL", TRUE),
/**
* Intent action.
*/
SEARCH("com.google.android.youtube.action.open.search", FALSE),
SHORTS("com.google.android.youtube.action.open.shorts", FALSE);
@Nullable
final Boolean isBrowseId;
@NonNull
final String id;
StartPage(@NonNull String id, @Nullable Boolean isBrowseId) {
this.id = id;
this.isBrowseId = isBrowseId;
}
private boolean isBrowseId() {
return TRUE.equals(isBrowseId);
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
private boolean isIntentAction() {
return FALSE.equals(isBrowseId);
}
}
/**
* Intent action when YouTube is cold started from the launcher.
* <p>
* If you don't check this, the hooking will also apply in the following cases:
* Case 1. The user clicked Shorts button on the YouTube shortcut.
* Case 2. The user clicked Shorts button on the YouTube widget.
* In this case, instead of opening Shorts, the start page specified by the user is opened.
*/
private static final String ACTION_MAIN = "android.intent.action.MAIN";
private static final StartPage START_PAGE = Settings.CHANGE_START_PAGE.get();
/**
* There is an issue where the back button on the toolbar doesn't work properly.
* As a workaround for this issue, instead of overriding the browserId multiple times, just override it once.
*/
private static boolean appLaunched = false;
public static String overrideBrowseId(@NonNull String original) {
if (!START_PAGE.isBrowseId()) {
return original;
}
if (appLaunched) {
Logger.printDebug(() -> "Ignore override browseId as the app already launched");
return original;
}
appLaunched = true;
Logger.printDebug(() -> "Changing browseId to " + START_PAGE.id);
return START_PAGE.id;
}
public static void overrideIntentAction(@NonNull Intent intent) {
if (!START_PAGE.isIntentAction()) {
return;
}
if (!ACTION_MAIN.equals(intent.getAction())) {
Logger.printDebug(() -> "Ignore override intent action" +
" as the current activity is not the entry point of the application");
return;
}
if (appLaunched) {
Logger.printDebug(() -> "Ignore override intent action as the app already launched");
return;
}
appLaunched = true;
final String intentAction = START_PAGE.id;
Logger.printDebug(() -> "Changing intent action to " + intentAction);
intent.setAction(intentAction);
}
}

View File

@@ -0,0 +1,84 @@
package app.revanced.integrations.youtube.patches;
import static app.revanced.integrations.shared.StringRef.str;
import android.app.Activity;
import android.text.Html;
import java.net.InetAddress;
import java.net.UnknownHostException;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class CheckWatchHistoryDomainNameResolutionPatch {
private static final String HISTORY_TRACKING_ENDPOINT = "s.youtube.com";
private static final String SINKHOLE_IPV4 = "0.0.0.0";
private static final String SINKHOLE_IPV6 = "::";
private static boolean domainResolvesToValidIP(String host) {
try {
InetAddress address = InetAddress.getByName(host);
String hostAddress = address.getHostAddress();
if (address.isLoopbackAddress()) {
Logger.printDebug(() -> host + " resolves to localhost");
} else if (SINKHOLE_IPV4.equals(hostAddress) || SINKHOLE_IPV6.equals(hostAddress)) {
Logger.printDebug(() -> host + " resolves to sinkhole ip");
} else {
return true; // Domain is not blocked.
}
} catch (UnknownHostException e) {
Logger.printDebug(() -> host + " failed to resolve");
}
return false;
}
/**
* Injection point.
*
* Checks if s.youtube.com is blacklisted and playback history will fail to work.
*/
public static void checkDnsResolver(Activity context) {
if (!Utils.isNetworkConnected() || !Settings.CHECK_WATCH_HISTORY_DOMAIN_NAME.get()) return;
Utils.runOnBackgroundThread(() -> {
try {
// If the user has a flaky DNS server, or they just lost internet connectivity
// and the isNetworkConnected() check has not detected it yet (it can take a few
// seconds after losing connection), then the history tracking endpoint will
// show a resolving error but it's actually an internet connection problem.
//
// Prevent this false positive by verify youtube.com resolves.
// If youtube.com does not resolve, then it's not a watch history domain resolving error
// because the entire app will not work since no domains are resolving.
if (domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)
|| !domainResolvesToValidIP("youtube.com")) {
return;
}
Utils.runOnMainThread(() -> {
var alert = new android.app.AlertDialog.Builder(context)
.setTitle(str("revanced_check_watch_history_domain_name_dialog_title"))
.setMessage(Html.fromHtml(str("revanced_check_watch_history_domain_name_dialog_message")))
.setIconAttribute(android.R.attr.alertDialogIcon)
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
dialog.dismiss();
}).setNegativeButton(str("revanced_check_watch_history_domain_name_dialog_ignore"), (dialog, which) -> {
Settings.CHECK_WATCH_HISTORY_DOMAIN_NAME.save(false);
dialog.dismiss();
}).create();
Utils.showDialog(context, alert, false, null);
});
} catch (Exception ex) {
Logger.printException(() -> "checkDnsResolver failure", ex);
}
});
}
}

View File

@@ -1,20 +1,10 @@
package app.revanced.integrations.youtube.patches;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class DisablePreciseSeekingGesturePatch {
/**
* Disables the gesture that is used to seek precisely.
* @param tracker The velocity tracker that is used to determine the gesture.
* @param event The motion event that is used to determine the gesture.
*/
public static void disableGesture(VelocityTracker tracker, MotionEvent event) {
if (Settings.DISABLE_PRECISE_SEEKING_GESTURE.get()) return;
tracker.addMovement(event);
public static boolean isGestureDisabled() {
return Settings.DISABLE_PRECISE_SEEKING_GESTURE.get();
}
}

View File

@@ -1,14 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
@SuppressWarnings("unused")
public class HideAlbumCardsPatch {
public static void hideAlbumCard(View view) {
if (!Settings.HIDE_ALBUM_CARDS.get()) return;
Utils.hideViewByLayoutParams(view);
}
}

View File

@@ -1,16 +0,0 @@
package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class HideAutoplayButtonPatch {
private static final boolean HIDE_AUTOPLAY_BUTTON_ENABLED = Settings.HIDE_AUTOPLAY_BUTTON.get();
/**
* Injection point.
*/
public static boolean hideAutoPlayButton() {
return HIDE_AUTOPLAY_BUTTON_ENABLED;
}
}

View File

@@ -1,13 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.widget.ImageView;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class HideCaptionsButtonPatch {
//Used by app.revanced.patches.youtube.layout.hidecaptionsbutton.patch.HideCaptionsButtonPatch
public static void hideCaptionsButton(ImageView imageView) {
imageView.setVisibility(Settings.HIDE_CAPTIONS_BUTTON.get() ? ImageView.GONE : ImageView.VISIBLE);
}
}

View File

@@ -1,14 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public class HideCastButtonPatch {
// Used by app.revanced.patches.youtube.layout.castbutton.patch.HideCastButonPatch
public static int getCastButtonOverrideV2(int original) {
return Settings.HIDE_CAST_BUTTON.get() ? View.GONE : original;
}
}

View File

@@ -1,15 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
@SuppressWarnings("unused")
public class HideCrowdfundingBoxPatch {
//Used by app.revanced.patches.youtube.layout.hidecrowdfundingbox.patch.HideCrowdfundingBoxPatch
public static void hideCrowdfundingBox(View view) {
if (!Settings.HIDE_CROWDFUNDING_BOX.get()) return;
Utils.hideViewByLayoutParams(view);
}
}

View File

@@ -1,27 +0,0 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.Utils;
@SuppressWarnings("unused")
public final class HideFilterBarPatch {
public static int hideInFeed(final int height) {
if (Settings.HIDE_FILTER_BAR_FEED_IN_FEED.get()) return 0;
return height;
}
public static void hideInRelatedVideos(final View chipView) {
if (!Settings.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS.get()) return;
Utils.hideViewByLayoutParams(chipView);
}
public static int hideInSearch(final int height) {
if (Settings.HIDE_FILTER_BAR_FEED_IN_SEARCH.get()) return 0;
return height;
}
}

View File

@@ -1,10 +0,0 @@
package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class HideFloatingMicrophoneButtonPatch {
public static boolean hideFloatingMicrophoneButton(final boolean original) {
return Settings.HIDE_FLOATING_MICROPHONE_BUTTON.get() || original;
}
}

View File

@@ -1,17 +0,0 @@
package app.revanced.integrations.youtube.patches;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class HidePlayerButtonsPatch {
/**
* Injection point.
*/
public static boolean previousOrNextButtonIsVisible(boolean previousOrNextButtonVisible) {
if (Settings.HIDE_PLAYER_BUTTONS.get()) {
return false;
}
return previousOrNextButtonVisible;
}
}

View File

@@ -0,0 +1,72 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import android.widget.ImageView;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class HidePlayerOverlayButtonsPatch {
private static final boolean HIDE_AUTOPLAY_BUTTON_ENABLED = Settings.HIDE_AUTOPLAY_BUTTON.get();
/**
* Injection point.
*/
public static boolean hideAutoPlayButton() {
return HIDE_AUTOPLAY_BUTTON_ENABLED;
}
/**
* Injection point.
*/
public static int getCastButtonOverrideV2(int original) {
return Settings.HIDE_CAST_BUTTON.get() ? View.GONE : original;
}
/**
* Injection point.
*/
public static void hideCaptionsButton(ImageView imageView) {
imageView.setVisibility(Settings.HIDE_CAPTIONS_BUTTON.get() ? ImageView.GONE : ImageView.VISIBLE);
}
private static final boolean HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS_ENABLED
= Settings.HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS.get();
private static final int PLAYER_CONTROL_PREVIOUS_BUTTON_TOUCH_AREA_ID =
Utils.getResourceIdentifier("player_control_previous_button_touch_area", "id");
private static final int PLAYER_CONTROL_NEXT_BUTTON_TOUCH_AREA_ID =
Utils.getResourceIdentifier("player_control_next_button_touch_area", "id");
/**
* Injection point.
*/
public static void hidePreviousNextButtons(View parentView) {
if (!HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS_ENABLED) {
return;
}
// Must use a deferred call to main thread to hide the button.
// Otherwise the layout crashes if set to hidden now.
Utils.runOnMainThread(() -> {
hideView(parentView, PLAYER_CONTROL_PREVIOUS_BUTTON_TOUCH_AREA_ID);
hideView(parentView, PLAYER_CONTROL_NEXT_BUTTON_TOUCH_AREA_ID);
});
}
private static void hideView(View parentView, int resourceId) {
View nextPreviousButton = parentView.findViewById(resourceId);
if (nextPreviousButton == null) {
Logger.printException(() -> "Could not find player previous/next button");
return;
}
Logger.printDebug(() -> "Hiding previous/next button");
Utils.hideViewByRemovingFromParentUnderCondition(true, nextPreviousButton);
}
}

View File

@@ -0,0 +1,44 @@
package app.revanced.integrations.youtube.patches;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import app.revanced.integrations.shared.Logger;
@SuppressWarnings("unused")
public class PlayerControlsPatch {
/**
* Injection point.
*/
public static void setFullscreenCloseButton(ImageView imageButton) {
// Add a global listener, since the protected method
// View#onVisibilityChanged() does not have any call backs.
imageButton.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
int lastVisibility = View.VISIBLE;
@Override
public void onGlobalLayout() {
try {
final int visibility = imageButton.getVisibility();
if (lastVisibility != visibility) {
lastVisibility = visibility;
Logger.printDebug(() -> "fullscreen button visibility: "
+ (visibility == View.VISIBLE ? "VISIBLE" :
visibility == View.GONE ? "GONE" : "INVISIBLE"));
fullscreenButtonVisibilityChanged(visibility == View.VISIBLE);
}
} catch (Exception ex) {
Logger.printDebug(() -> "OnGlobalLayoutListener failure", ex);
}
}
});
}
// noinspection EmptyMethod
public static void fullscreenButtonVisibilityChanged(boolean isVisible) {
// Code added during patching.
}
}

Some files were not shown because too many files have changed in this diff Show More