mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-20 09:33:57 +00:00
Compare commits
32 Commits
feat/moder
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef052c0d8f | ||
|
|
d9fa580222 | ||
|
|
182224c79d | ||
|
|
83c0127ebb | ||
|
|
3762f1de08 | ||
|
|
18c0b04f0c | ||
|
|
4c4ba1c78c | ||
|
|
7cef24a5e9 | ||
|
|
8725a49ba3 | ||
|
|
8b6360e34f | ||
|
|
a10c51f160 | ||
|
|
eecc44b956 | ||
|
|
3401467a6d | ||
|
|
87247590de | ||
|
|
41e2590584 | ||
|
|
778d13ce8b | ||
|
|
19f146c01d | ||
|
|
12b819d20e | ||
|
|
004b5908db | ||
|
|
f4af27dfec | ||
|
|
4cc315952d | ||
|
|
6312fe8d60 | ||
|
|
3d754575a4 | ||
|
|
a3f7609fe3 | ||
|
|
d25dcfe49a | ||
|
|
1cc2cb9cb2 | ||
|
|
f5cbb31724 | ||
|
|
b42ae27ce6 | ||
|
|
43ab29d03d | ||
|
|
789f0a5628 | ||
|
|
da836b667c | ||
|
|
44e7dbcf4d |
3
.github/workflows/build_pull_request.yml
vendored
3
.github/workflows/build_pull_request.yml
vendored
@@ -25,7 +25,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ env.GITHUB_ACTOR }}
|
||||||
|
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew :patches:buildAndroid --no-daemon
|
run: ./gradlew :patches:buildAndroid --no-daemon
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
|
|||||||
2
.github/workflows/pull_strings.yml
vendored
2
.github/workflows/pull_strings.yml
vendored
@@ -2,7 +2,7 @@ name: Pull strings
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 */12 * * *"
|
- cron: "0 0 * * 0"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -31,7 +31,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
|
||||||
|
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew :patches:buildAndroid clean
|
run: ./gradlew :patches:buildAndroid clean
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
@@ -55,6 +56,8 @@ jobs:
|
|||||||
id: release
|
id: release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
|
||||||
|
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Attest
|
- name: Attest
|
||||||
if: steps.release.outputs.new_release_published == 'true'
|
if: steps.release.outputs.new_release_published == 'true'
|
||||||
|
|||||||
108
CHANGELOG.md
108
CHANGELOG.md
@@ -1,3 +1,111 @@
|
|||||||
|
# [5.48.0](https://github.com/ReVanced/revanced-patches/compare/v5.47.0...v5.48.0) (2026-01-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Boost for Reddit - Fix missing audio in video downloads:** Make it work again by reflecting Reddits latest changes ([#6500](https://github.com/ReVanced/revanced-patches/issues/6500)) ([eecc44b](https://github.com/ReVanced/revanced-patches/commit/eecc44b9567bf2ca72ac99e0dafa483a6803c0f9))
|
||||||
|
* **Disney+ - Skip ads:** Remove unsupported package names ([#6422](https://github.com/ReVanced/revanced-patches/issues/6422)) ([44e7dbc](https://github.com/ReVanced/revanced-patches/commit/44e7dbcf4d7eaf94dd0164baba847d3e19250154))
|
||||||
|
* Fix build error introduced in `4046bee` ([#6417](https://github.com/ReVanced/revanced-patches/issues/6417)) ([789f0a5](https://github.com/ReVanced/revanced-patches/commit/789f0a562861825065633d172445ebf35a1ba8d8))
|
||||||
|
* Fix compilation error introduced in `6bb6281` ([#6409](https://github.com/ReVanced/revanced-patches/issues/6409)) ([71c6cb5](https://github.com/ReVanced/revanced-patches/commit/71c6cb569ebf7b93cf73ee391839e5220557ce7c))
|
||||||
|
* Fix compilation error introduced in dc69f243 ([#6392](https://github.com/ReVanced/revanced-patches/issues/6392)) ([a429824](https://github.com/ReVanced/revanced-patches/commit/a429824bb77b49aea14b0b54f2204ae24d5209a1))
|
||||||
|
* **Instagram:** `Sanitize sharing links` ([#6483](https://github.com/ReVanced/revanced-patches/issues/6483)) ([8724759](https://github.com/ReVanced/revanced-patches/commit/87247590de3db74680cb02ba1d87bf683b2269e2))
|
||||||
|
* **YouTube - Hide layout components:** Hide new type of crowdfunding box ([#6380](https://github.com/ReVanced/revanced-patches/issues/6380)) ([dc69f24](https://github.com/ReVanced/revanced-patches/commit/dc69f2433e2650654e2dffdd76b0b0c8a52bf515))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Disable Sentry telemetry` patch ([#6416](https://github.com/ReVanced/revanced-patches/issues/6416)) ([4cc3159](https://github.com/ReVanced/revanced-patches/commit/4cc315952db557c565872de9e8484805f2e42305))
|
||||||
|
* Add `Prevent screenshot detection` patch ([#6482](https://github.com/ReVanced/revanced-patches/issues/6482)) ([83c0127](https://github.com/ReVanced/revanced-patches/commit/83c0127ebb8f53ab8a067758619faaac5596c145))
|
||||||
|
* Disable Play Integrity patch ([#6412](https://github.com/ReVanced/revanced-patches/issues/6412)) ([6312fe8](https://github.com/ReVanced/revanced-patches/commit/6312fe8d60da24465c0c1b0fa4e94ceb79873d9c))
|
||||||
|
* **Instagram - Hides navigation buttons:** Add more buttons to hide ([#6390](https://github.com/ReVanced/revanced-patches/issues/6390)) ([6bb6281](https://github.com/ReVanced/revanced-patches/commit/6bb62811493da04812cc3e392e68d874f95cbef9))
|
||||||
|
* **Instagram:** Add `Hide highlights tray` patch ([#6489](https://github.com/ReVanced/revanced-patches/issues/6489)) ([8725a49](https://github.com/ReVanced/revanced-patches/commit/8725a49ba3a06fee0280ffcf4be62cd960cd301e))
|
||||||
|
* **Instagram:** Add `Remove build expired popup` patch ([#6488](https://github.com/ReVanced/revanced-patches/issues/6488)) ([18c0b04](https://github.com/ReVanced/revanced-patches/commit/18c0b04f0cd1bf8cd78b05af3b8ebe3a6a5f9e48))
|
||||||
|
* **Instagram:** Disable `Disable Reels scrolling` by default ([3401467](https://github.com/ReVanced/revanced-patches/commit/3401467a6d49fc75b6757a15e5c848330c1b7307))
|
||||||
|
* **Letterboxd:** Add `Unlock app icons` patch ([#6415](https://github.com/ReVanced/revanced-patches/issues/6415)) ([d25dcfe](https://github.com/ReVanced/revanced-patches/commit/d25dcfe49ac331c9b3dca739ba0be95dbab669cc))
|
||||||
|
* **ProtonVPN:** Add `Unlock split tunneling` patch ([#6353](https://github.com/ReVanced/revanced-patches/issues/6353)) ([e0f3346](https://github.com/ReVanced/revanced-patches/commit/e0f33468e6e96b9f10cf35ec67622d6488528c90))
|
||||||
|
* **SBS On Demand:** Add `Remove ads` patch ([#6378](https://github.com/ReVanced/revanced-patches/issues/6378)) ([315931c](https://github.com/ReVanced/revanced-patches/commit/315931cbf8f61cd4b3a54ace1ff03685d748614c))
|
||||||
|
* **Strava:** Add `Add 'Give Kudos' button to 'Group Activity'` patch ([#6475](https://github.com/ReVanced/revanced-patches/issues/6475)) ([4c4ba1c](https://github.com/ReVanced/revanced-patches/commit/4c4ba1c78c9f4568a2b572f5c69e9c6c734e1a7f))
|
||||||
|
* **Strava:** Add `Add media download` patch ([#6449](https://github.com/ReVanced/revanced-patches/issues/6449)) ([778d13c](https://github.com/ReVanced/revanced-patches/commit/778d13ce8b28ca6df3a665530320e4a21a27ae44))
|
||||||
|
* **Strava:** Add `Block Snowplow tracking` patch ([#6413](https://github.com/ReVanced/revanced-patches/issues/6413)) ([c47beae](https://github.com/ReVanced/revanced-patches/commit/c47beae21376dd17ab8bc09afe73e9094481bde9))
|
||||||
|
* **Strava:** Add `Disable Quick Edit` patch ([#6452](https://github.com/ReVanced/revanced-patches/issues/6452)) ([f5cbb31](https://github.com/ReVanced/revanced-patches/commit/f5cbb31724d15f7e939b96ee0186fd0a108f9fdc))
|
||||||
|
* **Strava:** Add `Enable password login` patch ([#6396](https://github.com/ReVanced/revanced-patches/issues/6396)) ([8f3f4c9](https://github.com/ReVanced/revanced-patches/commit/8f3f4c95bb8f151fc9a2c272bf7d0e905c2f01fc))
|
||||||
|
* **Strava:** Add `Overwrite media upload parameters` patch ([#6410](https://github.com/ReVanced/revanced-patches/issues/6410)) ([b42ae27](https://github.com/ReVanced/revanced-patches/commit/b42ae27ce66ebad9e9cfc5b70fc121df5bad7567))
|
||||||
|
* **YouTube:** Add `Pause on audio interrupt` patch ([#6464](https://github.com/ReVanced/revanced-patches/issues/6464)) ([19f146c](https://github.com/ReVanced/revanced-patches/commit/19f146c01dc381b3cccd61e61ba4901872ff12d8))
|
||||||
|
|
||||||
|
# [5.48.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.12...v5.48.0-dev.13) (2026-01-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Prevent screenshot detection` patch ([#6482](https://github.com/ReVanced/revanced-patches/issues/6482)) ([83c0127](https://github.com/ReVanced/revanced-patches/commit/83c0127ebb8f53ab8a067758619faaac5596c145))
|
||||||
|
|
||||||
|
# [5.48.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.11...v5.48.0-dev.12) (2026-01-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Instagram:** Add `Remove build expired popup` patch ([#6488](https://github.com/ReVanced/revanced-patches/issues/6488)) ([18c0b04](https://github.com/ReVanced/revanced-patches/commit/18c0b04f0cd1bf8cd78b05af3b8ebe3a6a5f9e48))
|
||||||
|
* **Strava:** Add `Add 'Give Kudos' button to 'Group Activity'` patch ([#6475](https://github.com/ReVanced/revanced-patches/issues/6475)) ([4c4ba1c](https://github.com/ReVanced/revanced-patches/commit/4c4ba1c78c9f4568a2b572f5c69e9c6c734e1a7f))
|
||||||
|
|
||||||
|
# [5.48.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.10...v5.48.0-dev.11) (2026-01-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Instagram:** Add `Hide highlights tray` patch ([#6489](https://github.com/ReVanced/revanced-patches/issues/6489)) ([8725a49](https://github.com/ReVanced/revanced-patches/commit/8725a49ba3a06fee0280ffcf4be62cd960cd301e))
|
||||||
|
|
||||||
|
# [5.48.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.9...v5.48.0-dev.10) (2026-01-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Boost for Reddit - Fix missing audio in video downloads:** Make it work again by reflecting Reddits latest changes ([#6500](https://github.com/ReVanced/revanced-patches/issues/6500)) ([eecc44b](https://github.com/ReVanced/revanced-patches/commit/eecc44b9567bf2ca72ac99e0dafa483a6803c0f9))
|
||||||
|
* **Instagram:** `Sanitize sharing links` ([#6483](https://github.com/ReVanced/revanced-patches/issues/6483)) ([8724759](https://github.com/ReVanced/revanced-patches/commit/87247590de3db74680cb02ba1d87bf683b2269e2))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Instagram:** Disable `Disable Reels scrolling` by default ([3401467](https://github.com/ReVanced/revanced-patches/commit/3401467a6d49fc75b6757a15e5c848330c1b7307))
|
||||||
|
* **Strava:** Add `Add media download` patch ([#6449](https://github.com/ReVanced/revanced-patches/issues/6449)) ([778d13c](https://github.com/ReVanced/revanced-patches/commit/778d13ce8b28ca6df3a665530320e4a21a27ae44))
|
||||||
|
* **YouTube:** Add `Pause on audio interrupt` patch ([#6464](https://github.com/ReVanced/revanced-patches/issues/6464)) ([19f146c](https://github.com/ReVanced/revanced-patches/commit/19f146c01dc381b3cccd61e61ba4901872ff12d8))
|
||||||
|
|
||||||
|
# [5.48.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.8...v5.48.0-dev.9) (2026-01-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Disable Sentry telemetry` patch ([#6416](https://github.com/ReVanced/revanced-patches/issues/6416)) ([4cc3159](https://github.com/ReVanced/revanced-patches/commit/4cc315952db557c565872de9e8484805f2e42305))
|
||||||
|
* Disable Play Integrity patch ([#6412](https://github.com/ReVanced/revanced-patches/issues/6412)) ([6312fe8](https://github.com/ReVanced/revanced-patches/commit/6312fe8d60da24465c0c1b0fa4e94ceb79873d9c))
|
||||||
|
|
||||||
|
# [5.48.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.7...v5.48.0-dev.8) (2026-01-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Letterboxd:** Add `Unlock app icons` patch ([#6415](https://github.com/ReVanced/revanced-patches/issues/6415)) ([d25dcfe](https://github.com/ReVanced/revanced-patches/commit/d25dcfe49ac331c9b3dca739ba0be95dbab669cc))
|
||||||
|
|
||||||
|
# [5.48.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.6...v5.48.0-dev.7) (2026-01-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Strava:** Add `Disable Quick Edit` patch ([#6452](https://github.com/ReVanced/revanced-patches/issues/6452)) ([f5cbb31](https://github.com/ReVanced/revanced-patches/commit/f5cbb31724d15f7e939b96ee0186fd0a108f9fdc))
|
||||||
|
* **Strava:** Add `Overwrite media upload parameters` patch ([#6410](https://github.com/ReVanced/revanced-patches/issues/6410)) ([b42ae27](https://github.com/ReVanced/revanced-patches/commit/b42ae27ce66ebad9e9cfc5b70fc121df5bad7567))
|
||||||
|
|
||||||
|
# [5.48.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.5...v5.48.0-dev.6) (2026-01-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Fix build error introduced in `4046bee` ([#6417](https://github.com/ReVanced/revanced-patches/issues/6417)) ([789f0a5](https://github.com/ReVanced/revanced-patches/commit/789f0a562861825065633d172445ebf35a1ba8d8))
|
||||||
|
|
||||||
|
# [5.48.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.4...v5.48.0-dev.5) (2025-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Disney+ - Skip ads:** Remove unsupported package names ([#6422](https://github.com/ReVanced/revanced-patches/issues/6422)) ([44e7dbc](https://github.com/ReVanced/revanced-patches/commit/44e7dbcf4d7eaf94dd0164baba847d3e19250154))
|
||||||
|
|
||||||
# [5.48.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.3...v5.48.0-dev.4) (2025-12-29)
|
# [5.48.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.48.0-dev.3...v5.48.0-dev.4) (2025-12-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
project_id_env: "CROWDIN_PROJECT_ID"
|
project_id_env: "CROWDIN_PROJECT_ID"
|
||||||
api_token_env: "CROWDIN_PERSONAL_TOKEN"
|
api_token_env: "CROWDIN_PERSONAL_TOKEN"
|
||||||
|
|
||||||
preserve_hierarchy: false
|
preserve_hierarchy: true
|
||||||
files:
|
files:
|
||||||
- source: patches/src/main/resources/addresources/values/strings.xml
|
- source: patches/src/main/resources/addresources/values/strings.xml
|
||||||
|
dest: patches.xml
|
||||||
translation: patches/src/main/resources/addresources/values-%android_code%/strings.xml
|
translation: patches/src/main/resources/addresources/values-%android_code%/strings.xml
|
||||||
skip_untranslated_strings: true
|
skip_untranslated_strings: true
|
||||||
|
|||||||
20
extensions/all/misc/disable-play-integrity/build.gradle.kts
Normal file
20
extensions/all/misc/disable-play-integrity/build.gradle.kts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
android {
|
||||||
|
namespace = "app.revanced.extension"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = 21
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
aidl = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(libs.annotation)
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<manifest/>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.google.android.play.core.integrity.protocol;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IExpressIntegrityServiceCallback;
|
||||||
|
|
||||||
|
interface IExpressIntegrityService {
|
||||||
|
oneway void requestIntegrityToken(in Bundle request, IExpressIntegrityServiceCallback callback) = 2;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.google.android.play.core.integrity.protocol;
|
||||||
|
|
||||||
|
interface IExpressIntegrityServiceCallback {
|
||||||
|
oneway void onRequestExpressIntegrityTokenResult(in Bundle result) = 2;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.google.android.play.core.integrity.protocol;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IIntegrityServiceCallback;
|
||||||
|
|
||||||
|
interface IIntegrityService {
|
||||||
|
oneway void requestIntegrityToken(in Bundle request, IIntegrityServiceCallback callback) = 1;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.google.android.play.core.integrity.protocol;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
interface IIntegrityServiceCallback {
|
||||||
|
oneway void onResult(in Bundle result) = 1;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package android.ext;
|
||||||
|
/** @hide */
|
||||||
|
// Int values that are assigned to packages in this interface can be retrieved at runtime from
|
||||||
|
// ApplicationInfo.ext().getPackageId() or from AndroidPackage.ext().getPackageId() (in system_server).
|
||||||
|
//
|
||||||
|
// PackageIds are assigned to parsed APKs only after they are verified, either by a certificate check
|
||||||
|
// or by a check that the APK is stored on an immutable OS partition.
|
||||||
|
public interface PackageId {
|
||||||
|
String PLAY_STORE_NAME = "com.android.vending";
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package android.os;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.io.FileDescriptor;
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public class BinderWrapper implements IBinder {
|
||||||
|
protected final IBinder base;
|
||||||
|
|
||||||
|
public BinderWrapper(IBinder base) {
|
||||||
|
this.base = base;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean transact(int code, @NonNull Parcel data, @Nullable Parcel reply, int flags) throws RemoteException {
|
||||||
|
return base.transact(code, data, reply, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public IInterface queryLocalInterface(@NonNull String descriptor) {
|
||||||
|
return base.queryLocalInterface(descriptor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public String getInterfaceDescriptor() throws RemoteException {
|
||||||
|
return base.getInterfaceDescriptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean pingBinder() {
|
||||||
|
return base.pingBinder();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isBinderAlive() {
|
||||||
|
return base.isBinderAlive();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dump(@NonNull FileDescriptor fd, @Nullable String[] args) throws RemoteException {
|
||||||
|
base.dump(fd, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dumpAsync(@NonNull FileDescriptor fd, @Nullable String[] args) throws RemoteException {
|
||||||
|
base.dumpAsync(fd, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void linkToDeath(@NonNull DeathRecipient recipient, int flags) throws RemoteException {
|
||||||
|
base.linkToDeath(recipient, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags) {
|
||||||
|
return base.unlinkToDeath(recipient, flags);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package app.grapheneos.gmscompat.lib.playintegrity;
|
||||||
|
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.internal.os.FakeBackgroundHandler;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IIntegrityService;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IIntegrityServiceCallback;
|
||||||
|
|
||||||
|
class ClassicPlayIntegrityServiceWrapper extends PlayIntegrityServiceWrapper {
|
||||||
|
|
||||||
|
ClassicPlayIntegrityServiceWrapper(IBinder base) {
|
||||||
|
super(base);
|
||||||
|
requestIntegrityTokenTxnCode = 2; // IIntegrityService.Stub.TRANSACTION_requestIntegrityToken
|
||||||
|
}
|
||||||
|
|
||||||
|
static class TokenRequestStub extends IIntegrityService.Stub {
|
||||||
|
public void requestIntegrityToken(Bundle request, IIntegrityServiceCallback callback) {
|
||||||
|
Runnable r = () -> {
|
||||||
|
var result = new Bundle();
|
||||||
|
// https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#API_NOT_AVAILABLE
|
||||||
|
final int API_NOT_AVAILABLE = -1;
|
||||||
|
result.putInt("error", API_NOT_AVAILABLE);
|
||||||
|
try {
|
||||||
|
callback.onResult(result);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e("IIntegrityService.Stub", "", e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FakeBackgroundHandler.getHandler().postDelayed(r, getTokenRequestResultDelay());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Binder createTokenRequestStub() {
|
||||||
|
return new TokenRequestStub();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package app.grapheneos.gmscompat.lib.playintegrity;
|
||||||
|
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.BinderWrapper;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
abstract class PlayIntegrityServiceWrapper extends BinderWrapper {
|
||||||
|
final String TAG;
|
||||||
|
protected int requestIntegrityTokenTxnCode;
|
||||||
|
|
||||||
|
public PlayIntegrityServiceWrapper(IBinder base) {
|
||||||
|
super(base);
|
||||||
|
TAG = getClass().getSimpleName();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract Binder createTokenRequestStub();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean transact(int code, Parcel data, @Nullable Parcel reply, int flags) throws RemoteException {
|
||||||
|
if (code == requestIntegrityTokenTxnCode) {
|
||||||
|
if (maybeStubOutIntegrityTokenRequest(code, data, reply, flags)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.transact(code, data, reply, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean maybeStubOutIntegrityTokenRequest(int code, Parcel data, @Nullable Parcel reply, int flags) {
|
||||||
|
Log.d(TAG, "integrity token request detected");
|
||||||
|
|
||||||
|
try {
|
||||||
|
createTokenRequestStub().transact(code, data, reply, flags);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
// this is a local call
|
||||||
|
throw new IllegalStateException(e);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static long getTokenRequestResultDelay() {
|
||||||
|
return 500L;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package app.grapheneos.gmscompat.lib.playintegrity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.ServiceConnection;
|
||||||
|
import android.ext.PackageId;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import app.grapheneos.gmscompat.lib.util.ServiceConnectionWrapper;
|
||||||
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
|
public class PlayIntegrityUtils {
|
||||||
|
|
||||||
|
public static @Nullable ServiceConnection maybeReplaceServiceConnection(Intent service, ServiceConnection orig) {
|
||||||
|
if (PackageId.PLAY_STORE_NAME.equals(service.getPackage())) {
|
||||||
|
UnaryOperator<IBinder> binderOverride = null;
|
||||||
|
|
||||||
|
final String CLASSIC_SERVICE =
|
||||||
|
"com.google.android.play.core.integrityservice.BIND_INTEGRITY_SERVICE";
|
||||||
|
final String STANDARD_SERVICE =
|
||||||
|
"com.google.android.play.core.expressintegrityservice.BIND_EXPRESS_INTEGRITY_SERVICE";
|
||||||
|
|
||||||
|
String action = service.getAction();
|
||||||
|
if (STANDARD_SERVICE.equals(action)) {
|
||||||
|
binderOverride = StandardPlayIntegrityServiceWrapper::new;
|
||||||
|
} else if (CLASSIC_SERVICE.equals(action)) {
|
||||||
|
binderOverride = ClassicPlayIntegrityServiceWrapper::new;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (binderOverride != null) {
|
||||||
|
return new ServiceConnectionWrapper(orig, binderOverride);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package app.grapheneos.gmscompat.lib.playintegrity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.util.Log;
|
||||||
|
import com.android.internal.os.FakeBackgroundHandler;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IExpressIntegrityService;
|
||||||
|
import com.google.android.play.core.integrity.protocol.IExpressIntegrityServiceCallback;
|
||||||
|
|
||||||
|
@SuppressLint("LongLogTag")
|
||||||
|
class StandardPlayIntegrityServiceWrapper extends PlayIntegrityServiceWrapper {
|
||||||
|
|
||||||
|
StandardPlayIntegrityServiceWrapper(IBinder base) {
|
||||||
|
super(base);
|
||||||
|
requestIntegrityTokenTxnCode = 3; // IExpressIntegrityService.Stub.TRANSACTION_requestIntegrityToken
|
||||||
|
}
|
||||||
|
|
||||||
|
static class TokenRequestStub extends IExpressIntegrityService.Stub {
|
||||||
|
public void requestIntegrityToken(Bundle request, IExpressIntegrityServiceCallback callback) {
|
||||||
|
Runnable r = () -> {
|
||||||
|
var result = new Bundle();
|
||||||
|
// https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/StandardIntegrityErrorCode.html#API_NOT_AVAILABLE
|
||||||
|
final int API_NOT_AVAILABLE = -1;
|
||||||
|
result.putInt("error", API_NOT_AVAILABLE);
|
||||||
|
try {
|
||||||
|
callback.onRequestExpressIntegrityTokenResult(result);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e("IExpressIntegrityService.Stub", "", e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FakeBackgroundHandler.getHandler().postDelayed(r, getTokenRequestResultDelay());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Binder createTokenRequestStub() {
|
||||||
|
return new TokenRequestStub();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package app.grapheneos.gmscompat.lib.util;
|
||||||
|
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.ServiceConnection;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.IBinder;
|
||||||
|
|
||||||
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
|
public class ServiceConnectionWrapper implements ServiceConnection {
|
||||||
|
private final ServiceConnection base;
|
||||||
|
private final UnaryOperator<IBinder> binderOverride;
|
||||||
|
|
||||||
|
public ServiceConnectionWrapper(ServiceConnection base, UnaryOperator<IBinder> binderOverride) {
|
||||||
|
this.base = base;
|
||||||
|
this.binderOverride = binderOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
IBinder override = binderOverride.apply(service);
|
||||||
|
if (override != null) {
|
||||||
|
service = override;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
base.onServiceConnected(name, service);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceDisconnected(ComponentName name) {
|
||||||
|
base.onServiceDisconnected(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindingDied(ComponentName name) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
base.onBindingDied(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNullBinding(ComponentName name) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
base.onNullBinding(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.revanced.extension.playintegrity;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.ServiceConnection;
|
||||||
|
import app.grapheneos.gmscompat.lib.playintegrity.PlayIntegrityUtils;
|
||||||
|
|
||||||
|
public class DisablePlayIntegrityPatch {
|
||||||
|
public static boolean bindService(Context context, Intent service, ServiceConnection conn, int flags) {
|
||||||
|
ServiceConnection override = PlayIntegrityUtils.maybeReplaceServiceConnection(service, conn);
|
||||||
|
if (override != null) {
|
||||||
|
conn = override;
|
||||||
|
}
|
||||||
|
|
||||||
|
return context.bindService(service, conn, flags);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.android.internal.os;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
public class FakeBackgroundHandler {
|
||||||
|
|
||||||
|
public static Handler getHandler() {
|
||||||
|
return new Handler(Looper.getMainLooper());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ import android.widget.Toolbar;
|
|||||||
import app.revanced.extension.music.settings.preference.MusicPreferenceFragment;
|
import app.revanced.extension.music.settings.preference.MusicPreferenceFragment;
|
||||||
import app.revanced.extension.music.settings.search.MusicSearchViewController;
|
import app.revanced.extension.music.settings.search.MusicSearchViewController;
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseActivityHook;
|
import app.revanced.extension.shared.settings.BaseActivityHook;
|
||||||
|
|
||||||
@@ -47,7 +46,15 @@ public class MusicActivityHook extends BaseActivityHook {
|
|||||||
// Override the default YouTube Music theme to increase start padding of list items.
|
// Override the default YouTube Music theme to increase start padding of list items.
|
||||||
// Custom style located in resources/music/values/style.xml
|
// Custom style located in resources/music/values/style.xml
|
||||||
activity.setTheme(Utils.getResourceIdentifierOrThrow(
|
activity.setTheme(Utils.getResourceIdentifierOrThrow(
|
||||||
ResourceType.STYLE, "Theme.ReVanced.YouTubeMusic.Settings"));
|
"Theme.ReVanced.YouTubeMusic.Settings", "style"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the resource ID for the YouTube Music settings layout.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected int getContentViewResourceId() {
|
||||||
|
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
package app.revanced.extension.shared;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public enum ResourceType {
|
|
||||||
ANIM("anim"),
|
|
||||||
ANIMATOR("animator"),
|
|
||||||
ARRAY("array"),
|
|
||||||
ATTR("attr"),
|
|
||||||
BOOL("bool"),
|
|
||||||
COLOR("color"),
|
|
||||||
DIMEN("dimen"),
|
|
||||||
DRAWABLE("drawable"),
|
|
||||||
FONT("font"),
|
|
||||||
FRACTION("fraction"),
|
|
||||||
ID("id"),
|
|
||||||
INTEGER("integer"),
|
|
||||||
INTERPOLATOR("interpolator"),
|
|
||||||
LAYOUT("layout"),
|
|
||||||
MENU("menu"),
|
|
||||||
MIPMAP("mipmap"),
|
|
||||||
NAVIGATION("navigation"),
|
|
||||||
PLURALS("plurals"),
|
|
||||||
RAW("raw"),
|
|
||||||
STRING("string"),
|
|
||||||
STYLE("style"),
|
|
||||||
STYLEABLE("styleable"),
|
|
||||||
TRANSITION("transition"),
|
|
||||||
VALUES("values"),
|
|
||||||
XML("xml");
|
|
||||||
|
|
||||||
private static final Map<String, ResourceType> VALUE_MAP;
|
|
||||||
|
|
||||||
static {
|
|
||||||
ResourceType[] values = values();
|
|
||||||
VALUE_MAP = new HashMap<>(2 * values.length);
|
|
||||||
|
|
||||||
for (ResourceType type : values) {
|
|
||||||
VALUE_MAP.put(type.value, type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public final String value;
|
|
||||||
|
|
||||||
public static ResourceType fromValue(String value) {
|
|
||||||
ResourceType type = VALUE_MAP.get(value);
|
|
||||||
if (type == null) {
|
|
||||||
throw new IllegalArgumentException("Unknown resource type: " + value);
|
|
||||||
}
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
ResourceType(String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -32,11 +32,7 @@ import android.view.Window;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.Toolbar;
|
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -47,10 +43,8 @@ import java.text.Collator;
|
|||||||
import java.text.Normalizer;
|
import java.text.Normalizer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
@@ -82,8 +76,6 @@ public class Utils {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private static Boolean isDarkModeEnabled;
|
private static Boolean isDarkModeEnabled;
|
||||||
|
|
||||||
private static boolean appIsUsingBoldIcons;
|
|
||||||
|
|
||||||
// Cached Collator instance with its locale.
|
// Cached Collator instance with its locale.
|
||||||
@Nullable
|
@Nullable
|
||||||
private static Locale cachedCollatorLocale;
|
private static Locale cachedCollatorLocale;
|
||||||
@@ -156,12 +148,12 @@ 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 1dp.
|
||||||
*
|
*
|
||||||
* @param setting The setting to check for hiding the view.
|
* @param condition The setting to check for hiding the view.
|
||||||
* @param view The view to hide.
|
* @param view The view to hide.
|
||||||
*/
|
*/
|
||||||
public static void hideViewBy0dpUnderCondition(BooleanSetting setting, View view) {
|
public static void hideViewBy0dpUnderCondition(BooleanSetting condition, View view) {
|
||||||
if (hideViewBy0dpUnderCondition(setting.get(), view)) {
|
if (hideViewBy0dpUnderCondition(condition.get(), view)) {
|
||||||
Logger.printDebug(() -> "View hidden by setting: " + setting);
|
Logger.printDebug(() -> "View hidden by setting: " + condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,47 +165,22 @@ public class Utils {
|
|||||||
*/
|
*/
|
||||||
public static boolean hideViewBy0dpUnderCondition(boolean condition, View view) {
|
public static boolean hideViewBy0dpUnderCondition(boolean condition, View view) {
|
||||||
if (condition) {
|
if (condition) {
|
||||||
hideViewBy0dp(view);
|
hideViewByLayoutParams(view);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Hide a view by setting its layout params to 0x0
|
|
||||||
* @param view The view to hide.
|
|
||||||
*/
|
|
||||||
public static void hideViewBy0dp(View view) {
|
|
||||||
if (view instanceof LinearLayout) {
|
|
||||||
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, 0);
|
|
||||||
view.setLayoutParams(layoutParams);
|
|
||||||
} else if (view instanceof FrameLayout) {
|
|
||||||
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(0, 0);
|
|
||||||
view.setLayoutParams(layoutParams2);
|
|
||||||
} else if (view instanceof RelativeLayout) {
|
|
||||||
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(0, 0);
|
|
||||||
view.setLayoutParams(layoutParams3);
|
|
||||||
} else if (view instanceof Toolbar) {
|
|
||||||
Toolbar.LayoutParams layoutParams4 = new Toolbar.LayoutParams(0, 0);
|
|
||||||
view.setLayoutParams(layoutParams4);
|
|
||||||
} else {
|
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
||||||
params.width = 0;
|
|
||||||
params.height = 0;
|
|
||||||
view.setLayoutParams(params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide a view by setting its visibility to GONE.
|
* Hide a view by setting its visibility to GONE.
|
||||||
*
|
*
|
||||||
* @param setting The setting to check for hiding the view.
|
* @param condition The setting to check for hiding the view.
|
||||||
* @param view The view to hide.
|
* @param view The view to hide.
|
||||||
*/
|
*/
|
||||||
public static void hideViewUnderCondition(BooleanSetting setting, View view) {
|
public static void hideViewUnderCondition(BooleanSetting condition, View view) {
|
||||||
if (hideViewUnderCondition(setting.get(), view)) {
|
if (hideViewUnderCondition(condition.get(), view)) {
|
||||||
Logger.printDebug(() -> "View hidden by setting: " + setting);
|
Logger.printDebug(() -> "View hidden by setting: " + condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,14 +199,14 @@ public class Utils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void hideViewByRemovingFromParentUnderCondition(BooleanSetting setting, View view) {
|
public static void hideViewByRemovingFromParentUnderCondition(BooleanSetting condition, View view) {
|
||||||
if (hideViewByRemovingFromParentUnderCondition(setting.get(), view)) {
|
if (hideViewByRemovingFromParentUnderCondition(condition.get(), view)) {
|
||||||
Logger.printDebug(() -> "View hidden by setting: " + setting);
|
Logger.printDebug(() -> "View hidden by setting: " + condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hideViewByRemovingFromParentUnderCondition(boolean condition, View view) {
|
public static boolean hideViewByRemovingFromParentUnderCondition(boolean setting, View view) {
|
||||||
if (condition) {
|
if (setting) {
|
||||||
ViewParent parent = view.getParent();
|
ViewParent parent = view.getParent();
|
||||||
if (parent instanceof ViewGroup parentGroup) {
|
if (parent instanceof ViewGroup parentGroup) {
|
||||||
parentGroup.removeView(view);
|
parentGroup.removeView(view);
|
||||||
@@ -311,13 +278,12 @@ public class Utils {
|
|||||||
* @return zero, if the resource is not found.
|
* @return zero, if the resource is not found.
|
||||||
*/
|
*/
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
public static int getResourceIdentifier(Context context, @Nullable ResourceType type, String resourceIdentifierName) {
|
public static int getResourceIdentifier(Context context, String resourceIdentifierName, @Nullable String type) {
|
||||||
return context.getResources().getIdentifier(resourceIdentifierName,
|
return context.getResources().getIdentifier(resourceIdentifierName, type, context.getPackageName());
|
||||||
type == null ? null : type.value, context.getPackageName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getResourceIdentifierOrThrow(Context context, @Nullable ResourceType type, String resourceIdentifierName) {
|
public static int getResourceIdentifierOrThrow(Context context, String resourceIdentifierName, @Nullable String type) {
|
||||||
final int resourceId = getResourceIdentifier(context, type, resourceIdentifierName);
|
final int resourceId = getResourceIdentifier(context, resourceIdentifierName, type);
|
||||||
if (resourceId == 0) {
|
if (resourceId == 0) {
|
||||||
throw new Resources.NotFoundException("No resource id exists with name: " + resourceIdentifierName
|
throw new Resources.NotFoundException("No resource id exists with name: " + resourceIdentifierName
|
||||||
+ " type: " + type);
|
+ " type: " + type);
|
||||||
@@ -327,44 +293,52 @@ public class Utils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return zero, if the resource is not found.
|
* @return zero, if the resource is not found.
|
||||||
* @see #getResourceIdentifierOrThrow(ResourceType, String)
|
* @see #getResourceIdentifierOrThrow(String, String)
|
||||||
*/
|
*/
|
||||||
public static int getResourceIdentifier(@Nullable ResourceType type, String resourceIdentifierName) {
|
public static int getResourceIdentifier(String resourceIdentifierName, @Nullable String type) {
|
||||||
return getResourceIdentifier(getContext(), type, resourceIdentifierName);
|
return getResourceIdentifier(getContext(), resourceIdentifierName, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return zero, if the resource is not found.
|
* @return The resource identifier, or throws an exception if not found.
|
||||||
* @see #getResourceIdentifier(ResourceType, String)
|
|
||||||
*/
|
*/
|
||||||
public static int getResourceIdentifierOrThrow(@Nullable ResourceType type, String resourceIdentifierName) {
|
public static int getResourceIdentifierOrThrow(String resourceIdentifierName, @Nullable String type) {
|
||||||
return getResourceIdentifierOrThrow(getContext(), type, resourceIdentifierName);
|
final int resourceId = getResourceIdentifier(getContext(), resourceIdentifierName, type);
|
||||||
|
if (resourceId == 0) {
|
||||||
|
throw new Resources.NotFoundException("No resource id exists with name: " + resourceIdentifierName
|
||||||
|
+ " type: " + type);
|
||||||
|
}
|
||||||
|
return resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getResourceString(int id) throws Resources.NotFoundException {
|
||||||
|
return getContext().getResources().getString(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getResourceInteger(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static int getResourceInteger(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
return getContext().getResources().getInteger(getResourceIdentifierOrThrow(ResourceType.INTEGER, resourceIdentifierName));
|
return getContext().getResources().getInteger(getResourceIdentifierOrThrow(resourceIdentifierName, "integer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Animation getResourceAnimation(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static Animation getResourceAnimation(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
return AnimationUtils.loadAnimation(getContext(), getResourceIdentifierOrThrow(ResourceType.ANIM, resourceIdentifierName));
|
return AnimationUtils.loadAnimation(getContext(), getResourceIdentifierOrThrow(resourceIdentifierName, "anim"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ColorInt
|
@ColorInt
|
||||||
public static int getResourceColor(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static int getResourceColor(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
//noinspection deprecation
|
//noinspection deprecation
|
||||||
return getContext().getResources().getColor(getResourceIdentifierOrThrow(ResourceType.COLOR, resourceIdentifierName));
|
return getContext().getResources().getColor(getResourceIdentifierOrThrow(resourceIdentifierName, "color"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getResourceDimensionPixelSize(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static int getResourceDimensionPixelSize(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
return getContext().getResources().getDimensionPixelSize(getResourceIdentifierOrThrow(ResourceType.DIMEN, resourceIdentifierName));
|
return getContext().getResources().getDimensionPixelSize(getResourceIdentifierOrThrow(resourceIdentifierName, "dimen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float getResourceDimension(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static float getResourceDimension(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
return getContext().getResources().getDimension(getResourceIdentifierOrThrow(ResourceType.DIMEN, resourceIdentifierName));
|
return getContext().getResources().getDimension(getResourceIdentifierOrThrow(resourceIdentifierName, "dimen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String[] getResourceStringArray(String resourceIdentifierName) throws Resources.NotFoundException {
|
public static String[] getResourceStringArray(String resourceIdentifierName) throws Resources.NotFoundException {
|
||||||
return getContext().getResources().getStringArray(getResourceIdentifierOrThrow(ResourceType.ARRAY, resourceIdentifierName));
|
return getContext().getResources().getStringArray(getResourceIdentifierOrThrow(resourceIdentifierName, "array"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface MatchFilter<T> {
|
public interface MatchFilter<T> {
|
||||||
@@ -375,7 +349,7 @@ public class Utils {
|
|||||||
* Includes sub children.
|
* Includes sub children.
|
||||||
*/
|
*/
|
||||||
public static <R extends View> R getChildViewByResourceName(View view, String str) {
|
public static <R extends View> R getChildViewByResourceName(View view, String str) {
|
||||||
var child = view.findViewById(Utils.getResourceIdentifierOrThrow(ResourceType.ID, str));
|
var child = view.findViewById(Utils.getResourceIdentifierOrThrow(str, "id"));
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
return (R) child;
|
return (R) child;
|
||||||
}
|
}
|
||||||
@@ -832,21 +806,6 @@ public class Utils {
|
|||||||
window.setBackgroundDrawable(null); // Remove default dialog background
|
window.setBackgroundDrawable(null); // Remove default dialog background
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return If the unpatched app is currently using bold icons.
|
|
||||||
*/
|
|
||||||
public static boolean appIsUsingBoldIcons() {
|
|
||||||
return appIsUsingBoldIcons;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controls if ReVanced bold icons are shown in various places.
|
|
||||||
* @param boldIcons If the app is currently using bold icons.
|
|
||||||
*/
|
|
||||||
public static void setAppIsUsingBoldIcons(boolean boldIcons) {
|
|
||||||
appIsUsingBoldIcons = boldIcons;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the theme light color used by the app.
|
* Sets the theme light color used by the app.
|
||||||
*/
|
*/
|
||||||
@@ -1208,18 +1167,4 @@ public class Utils {
|
|||||||
public static float clamp(float value, float lower, float upper) {
|
public static float clamp(float value, float lower, float upper) {
|
||||||
return Math.max(lower, Math.min(value, upper));
|
return Math.max(lower, Math.min(value, upper));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param maxSize The maximum number of elements to keep in the map.
|
|
||||||
* @return A {@link LinkedHashMap} that automatically evicts the oldest entry
|
|
||||||
* when the size exceeds {@code maxSize}.
|
|
||||||
*/
|
|
||||||
public static <T, V> Map<T, V> createSizeRestrictedMap(int maxSize) {
|
|
||||||
return new LinkedHashMap<>(2 * maxSize) {
|
|
||||||
@Override
|
|
||||||
protected boolean removeEldestEntry(Entry eldest) {
|
|
||||||
return size() > maxSize;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import androidx.annotation.Nullable;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
import app.revanced.extension.shared.ui.CustomDialog;
|
import app.revanced.extension.shared.ui.CustomDialog;
|
||||||
@@ -129,7 +128,7 @@ abstract class Check {
|
|||||||
// Add icon to the dialog.
|
// Add icon to the dialog.
|
||||||
ImageView iconView = new ImageView(activity);
|
ImageView iconView = new ImageView(activity);
|
||||||
iconView.setImageResource(Utils.getResourceIdentifierOrThrow(
|
iconView.setImageResource(Utils.getResourceIdentifierOrThrow(
|
||||||
ResourceType.DRAWABLE, "revanced_ic_dialog_alert"));
|
"revanced_ic_dialog_alert", "drawable"));
|
||||||
iconView.setColorFilter(Utils.getAppForegroundColor(), PorterDuff.Mode.SRC_IN);
|
iconView.setColorFilter(Utils.getAppForegroundColor(), PorterDuff.Mode.SRC_IN);
|
||||||
iconView.setPadding(0, 0, 0, 0);
|
iconView.setPadding(0, 0, 0, 0);
|
||||||
LinearLayout.LayoutParams iconParams = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams iconParams = new LinearLayout.LayoutParams(
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import okhttp3.Request;
|
|||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
|
|
||||||
public abstract class BaseFixRedgifsApiPatch implements Interceptor {
|
public abstract class BaseFixRedgifsApiPatch implements Interceptor {
|
||||||
protected static BaseFixRedgifsApiPatch INSTANCE;
|
protected static BaseFixRedgifsApiPatch INSTANCE;
|
||||||
public abstract String getDefaultUserAgent();
|
public abstract String getDefaultUserAgent();
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import java.util.Locale;
|
|||||||
|
|
||||||
import app.revanced.extension.shared.GmsCoreSupport;
|
import app.revanced.extension.shared.GmsCoreSupport;
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
|
|
||||||
@@ -66,7 +65,7 @@ public class CustomBrandingPatch {
|
|||||||
iconName += "_custom";
|
iconName += "_custom";
|
||||||
}
|
}
|
||||||
|
|
||||||
notificationSmallIcon = Utils.getResourceIdentifier(ResourceType.DRAWABLE, iconName);
|
notificationSmallIcon = Utils.getResourceIdentifier(iconName, "drawable");
|
||||||
if (notificationSmallIcon == 0) {
|
if (notificationSmallIcon == 0) {
|
||||||
Logger.printException(() -> "Could not load notification small icon");
|
Logger.printException(() -> "Could not load notification small icon");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.preference.ToolbarPreferenceFragment;
|
import app.revanced.extension.shared.settings.preference.ToolbarPreferenceFragment;
|
||||||
import app.revanced.extension.shared.ui.Dim;
|
import app.revanced.extension.shared.ui.Dim;
|
||||||
@@ -26,13 +25,13 @@ import app.revanced.extension.shared.ui.Dim;
|
|||||||
public abstract class BaseActivityHook extends Activity {
|
public abstract class BaseActivityHook extends Activity {
|
||||||
|
|
||||||
private static final int ID_REVANCED_SETTINGS_FRAGMENTS =
|
private static final int ID_REVANCED_SETTINGS_FRAGMENTS =
|
||||||
getResourceIdentifierOrThrow(ResourceType.ID, "revanced_settings_fragments");
|
getResourceIdentifierOrThrow("revanced_settings_fragments", "id");
|
||||||
private static final int ID_REVANCED_TOOLBAR_PARENT =
|
private static final int ID_REVANCED_TOOLBAR_PARENT =
|
||||||
getResourceIdentifierOrThrow(ResourceType.ID, "revanced_toolbar_parent");
|
getResourceIdentifierOrThrow("revanced_toolbar_parent", "id");
|
||||||
public static final int LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR =
|
public static final int LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR =
|
||||||
getResourceIdentifierOrThrow(ResourceType.LAYOUT, "revanced_settings_with_toolbar");
|
getResourceIdentifierOrThrow("revanced_settings_with_toolbar", "layout");
|
||||||
private static final int STRING_REVANCED_SETTINGS_TITLE =
|
private static final int STRING_REVANCED_SETTINGS_TITLE =
|
||||||
getResourceIdentifierOrThrow(ResourceType.STRING, "revanced_settings_title");
|
getResourceIdentifierOrThrow("revanced_settings_title", "string");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layout parameters for the toolbar, extracted from the dummy toolbar.
|
* Layout parameters for the toolbar, extracted from the dummy toolbar.
|
||||||
@@ -124,18 +123,16 @@ public abstract class BaseActivityHook extends Activity {
|
|||||||
toolBarParent.addView(toolbar, 0);
|
toolBarParent.addView(toolbar, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the resource ID for the content view layout.
|
|
||||||
*/
|
|
||||||
protected int getContentViewResourceId() {
|
|
||||||
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customizes the activity's theme.
|
* Customizes the activity's theme.
|
||||||
*/
|
*/
|
||||||
protected abstract void customizeActivityTheme(Activity activity);
|
protected abstract void customizeActivityTheme(Activity activity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the resource ID for the content view layout.
|
||||||
|
*/
|
||||||
|
protected abstract int getContentViewResourceId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the background color for the toolbar.
|
* Returns the background color for the toolbar.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import static java.lang.Boolean.TRUE;
|
|||||||
import static app.revanced.extension.shared.patches.CustomBrandingPatch.BrandingTheme;
|
import static app.revanced.extension.shared.patches.CustomBrandingPatch.BrandingTheme;
|
||||||
import static app.revanced.extension.shared.settings.Setting.parent;
|
import static app.revanced.extension.shared.settings.Setting.parent;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings shared across multiple apps.
|
* Settings shared across multiple apps.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -26,19 +24,10 @@ public class BaseSettings {
|
|||||||
* Use the icons declared in the preferences created during patching. If no icons or styles are declared then this setting does nothing.
|
* Use the icons declared in the preferences created during patching. If no icons or styles are declared then this setting does nothing.
|
||||||
*/
|
*/
|
||||||
public static final BooleanSetting SHOW_MENU_ICONS = new BooleanSetting("revanced_show_menu_icons", TRUE, true);
|
public static final BooleanSetting SHOW_MENU_ICONS = new BooleanSetting("revanced_show_menu_icons", TRUE, true);
|
||||||
/**
|
|
||||||
* Do not use this setting directly. Instead use {@link app.revanced.extension.shared.Utils#appIsUsingBoldIcons()}
|
|
||||||
*/
|
|
||||||
public static final BooleanSetting SETTINGS_DISABLE_BOLD_ICONS = new BooleanSetting("revanced_settings_disable_bold_icons", FALSE, true);
|
|
||||||
|
|
||||||
public static final BooleanSetting SETTINGS_SEARCH_HISTORY = new BooleanSetting("revanced_settings_search_history", TRUE, true);
|
public static final BooleanSetting SETTINGS_SEARCH_HISTORY = new BooleanSetting("revanced_settings_search_history", TRUE, true);
|
||||||
public static final StringSetting SETTINGS_SEARCH_ENTRIES = new StringSetting("revanced_settings_search_entries", "");
|
public static final StringSetting SETTINGS_SEARCH_ENTRIES = new StringSetting("revanced_settings_search_entries", "");
|
||||||
|
|
||||||
/**
|
|
||||||
* The first time the app was launched with no previous app data (either a clean install, or after wiping app data).
|
|
||||||
*/
|
|
||||||
public static final LongSetting FIRST_TIME_APP_LAUNCHED = new LongSetting("revanced_last_time_app_was_launched", -1L, false, false);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Settings shared by YouTube and YouTube Music.
|
// Settings shared by YouTube and YouTube Music.
|
||||||
//
|
//
|
||||||
@@ -55,13 +44,4 @@ public class BaseSettings {
|
|||||||
public static final IntegerSetting CUSTOM_BRANDING_NAME = new IntegerSetting("revanced_custom_branding_name", 1, true);
|
public static final IntegerSetting CUSTOM_BRANDING_NAME = new IntegerSetting("revanced_custom_branding_name", 1, true);
|
||||||
|
|
||||||
public static final StringSetting DISABLED_FEATURE_FLAGS = new StringSetting("revanced_disabled_feature_flags", "", true, parent(DEBUG));
|
public static final StringSetting DISABLED_FEATURE_FLAGS = new StringSetting("revanced_disabled_feature_flags", "", true, parent(DEBUG));
|
||||||
|
|
||||||
static {
|
|
||||||
final long now = System.currentTimeMillis();
|
|
||||||
|
|
||||||
if (FIRST_TIME_APP_LAUNCHED.get() < 0) {
|
|
||||||
Logger.printInfo(() -> "First launch of installation with no prior app data");
|
|
||||||
FIRST_TIME_APP_LAUNCHED.save(now);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import androidx.annotation.Nullable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
import app.revanced.extension.shared.settings.BooleanSetting;
|
import app.revanced.extension.shared.settings.BooleanSetting;
|
||||||
@@ -104,16 +103,10 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
|
|||||||
* so all app specific {@link Setting} instances are loaded before this method returns.
|
* so all app specific {@link Setting} instances are loaded before this method returns.
|
||||||
*/
|
*/
|
||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
String preferenceResourceName;
|
String preferenceResourceName = BaseSettings.SHOW_MENU_ICONS.get()
|
||||||
if (BaseSettings.SHOW_MENU_ICONS.get()) {
|
? "revanced_prefs_icons"
|
||||||
preferenceResourceName = Utils.appIsUsingBoldIcons()
|
: "revanced_prefs";
|
||||||
? "revanced_prefs_icons_bold"
|
final var identifier = Utils.getResourceIdentifier(preferenceResourceName, "xml");
|
||||||
: "revanced_prefs_icons";
|
|
||||||
} else {
|
|
||||||
preferenceResourceName = "revanced_prefs";
|
|
||||||
}
|
|
||||||
|
|
||||||
final var identifier = Utils.getResourceIdentifier(ResourceType.XML, preferenceResourceName);
|
|
||||||
if (identifier == 0) return;
|
if (identifier == 0) return;
|
||||||
addPreferencesFromResource(identifier);
|
addPreferencesFromResource(identifier);
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import java.util.Locale;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.Setting;
|
import app.revanced.extension.shared.settings.Setting;
|
||||||
import app.revanced.extension.shared.settings.StringSetting;
|
import app.revanced.extension.shared.settings.StringSetting;
|
||||||
@@ -82,13 +81,13 @@ public class ColorPickerPreference extends EditTextPreference {
|
|||||||
private boolean opacitySliderEnabled = false;
|
private boolean opacitySliderEnabled = false;
|
||||||
|
|
||||||
public static final int ID_REVANCED_COLOR_PICKER_VIEW =
|
public static final int ID_REVANCED_COLOR_PICKER_VIEW =
|
||||||
getResourceIdentifierOrThrow(ResourceType.ID, "revanced_color_picker_view");
|
getResourceIdentifierOrThrow("revanced_color_picker_view", "id");
|
||||||
public static final int ID_PREFERENCE_COLOR_DOT =
|
public static final int ID_PREFERENCE_COLOR_DOT =
|
||||||
getResourceIdentifierOrThrow(ResourceType.ID, "preference_color_dot");
|
getResourceIdentifierOrThrow("preference_color_dot", "id");
|
||||||
public static final int LAYOUT_REVANCED_COLOR_DOT_WIDGET =
|
public static final int LAYOUT_REVANCED_COLOR_DOT_WIDGET =
|
||||||
getResourceIdentifierOrThrow(ResourceType.LAYOUT, "revanced_color_dot_widget");
|
getResourceIdentifierOrThrow("revanced_color_dot_widget", "layout");
|
||||||
public static final int LAYOUT_REVANCED_COLOR_PICKER =
|
public static final int LAYOUT_REVANCED_COLOR_PICKER =
|
||||||
getResourceIdentifierOrThrow(ResourceType.LAYOUT, "revanced_color_picker");
|
getResourceIdentifierOrThrow("revanced_color_picker", "layout");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes non valid hex characters, converts to all uppercase,
|
* Removes non valid hex characters, converts to all uppercase,
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.ui.CustomDialog;
|
import app.revanced.extension.shared.ui.CustomDialog;
|
||||||
|
|
||||||
@@ -31,18 +30,14 @@ import app.revanced.extension.shared.ui.CustomDialog;
|
|||||||
@SuppressWarnings({"unused", "deprecation"})
|
@SuppressWarnings({"unused", "deprecation"})
|
||||||
public class CustomDialogListPreference extends ListPreference {
|
public class CustomDialogListPreference extends ListPreference {
|
||||||
|
|
||||||
public static final int ID_REVANCED_CHECK_ICON = getResourceIdentifierOrThrow(
|
public static final int ID_REVANCED_CHECK_ICON =
|
||||||
ResourceType.ID, "revanced_check_icon");
|
getResourceIdentifierOrThrow("revanced_check_icon", "id");
|
||||||
public static final int ID_REVANCED_CHECK_ICON_PLACEHOLDER = getResourceIdentifierOrThrow(
|
public static final int ID_REVANCED_CHECK_ICON_PLACEHOLDER =
|
||||||
ResourceType.ID, "revanced_check_icon_placeholder");
|
getResourceIdentifierOrThrow("revanced_check_icon_placeholder", "id");
|
||||||
public static final int ID_REVANCED_ITEM_TEXT = getResourceIdentifierOrThrow(
|
public static final int ID_REVANCED_ITEM_TEXT =
|
||||||
ResourceType.ID, "revanced_item_text");
|
getResourceIdentifierOrThrow("revanced_item_text", "id");
|
||||||
public static final int LAYOUT_REVANCED_CUSTOM_LIST_ITEM_CHECKED = getResourceIdentifierOrThrow(
|
public static final int LAYOUT_REVANCED_CUSTOM_LIST_ITEM_CHECKED =
|
||||||
ResourceType.LAYOUT, "revanced_custom_list_item_checked");
|
getResourceIdentifierOrThrow("revanced_custom_list_item_checked", "layout");
|
||||||
public static final int DRAWABLE_CHECKMARK = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_custom_checkmark");
|
|
||||||
public static final int DRAWABLE_CHECKMARK_BOLD = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_custom_checkmark_bold");
|
|
||||||
|
|
||||||
private String staticSummary = null;
|
private String staticSummary = null;
|
||||||
private CharSequence[] highlightedEntriesForDialog = null;
|
private CharSequence[] highlightedEntriesForDialog = null;
|
||||||
@@ -130,13 +125,9 @@ public class CustomDialogListPreference extends ListPreference {
|
|||||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||||
view = inflater.inflate(layoutResourceId, parent, false);
|
view = inflater.inflate(layoutResourceId, parent, false);
|
||||||
holder = new SubViewDataContainer();
|
holder = new SubViewDataContainer();
|
||||||
|
holder.checkIcon = view.findViewById(ID_REVANCED_CHECK_ICON);
|
||||||
holder.placeholder = view.findViewById(ID_REVANCED_CHECK_ICON_PLACEHOLDER);
|
holder.placeholder = view.findViewById(ID_REVANCED_CHECK_ICON_PLACEHOLDER);
|
||||||
holder.itemText = view.findViewById(ID_REVANCED_ITEM_TEXT);
|
holder.itemText = view.findViewById(ID_REVANCED_ITEM_TEXT);
|
||||||
holder.checkIcon = view.findViewById(ID_REVANCED_CHECK_ICON);
|
|
||||||
holder.checkIcon.setImageResource(Utils.appIsUsingBoldIcons()
|
|
||||||
? DRAWABLE_CHECKMARK_BOLD
|
|
||||||
: DRAWABLE_CHECKMARK
|
|
||||||
);
|
|
||||||
view.setTag(holder);
|
view.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
holder = (SubViewDataContainer) view.getTag();
|
holder = (SubViewDataContainer) view.getTag();
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import java.util.Set;
|
|||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.patches.EnableDebuggingPatch;
|
import app.revanced.extension.shared.patches.EnableDebuggingPatch;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
@@ -53,26 +52,25 @@ import app.revanced.extension.shared.ui.Dim;
|
|||||||
public class FeatureFlagsManagerPreference extends Preference {
|
public class FeatureFlagsManagerPreference extends Preference {
|
||||||
|
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_SELECT_ALL =
|
private static final int DRAWABLE_REVANCED_SETTINGS_SELECT_ALL =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_select_all");
|
getResourceIdentifierOrThrow("revanced_settings_select_all", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_DESELECT_ALL =
|
private static final int DRAWABLE_REVANCED_SETTINGS_DESELECT_ALL =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_deselect_all");
|
getResourceIdentifierOrThrow("revanced_settings_deselect_all", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_COPY_ALL =
|
private static final int DRAWABLE_REVANCED_SETTINGS_COPY_ALL =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_copy_all");
|
getResourceIdentifierOrThrow("revanced_settings_copy_all", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_RIGHT_ONE =
|
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_RIGHT_ONE =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_arrow_right_one");
|
getResourceIdentifierOrThrow("revanced_settings_arrow_right_one", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_RIGHT_DOUBLE =
|
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_RIGHT_DOUBLE =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_arrow_right_double");
|
getResourceIdentifierOrThrow("revanced_settings_arrow_right_double", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_LEFT_ONE =
|
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_LEFT_ONE =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_arrow_left_one");
|
getResourceIdentifierOrThrow("revanced_settings_arrow_left_one", "drawable");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_LEFT_DOUBLE =
|
private static final int DRAWABLE_REVANCED_SETTINGS_ARROW_LEFT_DOUBLE =
|
||||||
getResourceIdentifierOrThrow(ResourceType.DRAWABLE, "revanced_settings_arrow_left_double");
|
getResourceIdentifierOrThrow("revanced_settings_arrow_left_double", "drawable");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flags to hide from the UI.
|
* Flags to hide from the UI.
|
||||||
*/
|
*/
|
||||||
private static final Set<Long> FLAGS_TO_IGNORE = Set.of(
|
private static final Set<Long> FLAGS_TO_IGNORE = Set.of(
|
||||||
45386834L, // 'You' tab settings icon.
|
45386834L // 'You' tab settings icon.
|
||||||
45685201L // Bold icons. Forcing off interferes with patch changes and YT icons are broken.
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,11 +17,9 @@ import android.widget.Toolbar;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseActivityHook;
|
import app.revanced.extension.shared.settings.BaseActivityHook;
|
||||||
import app.revanced.extension.shared.ui.Dim;
|
import app.revanced.extension.shared.ui.Dim;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
|
||||||
|
|
||||||
@SuppressWarnings({"deprecation", "NewApi"})
|
@SuppressWarnings({"deprecation", "NewApi"})
|
||||||
public class ToolbarPreferenceFragment extends AbstractPreferenceFragment {
|
public class ToolbarPreferenceFragment extends AbstractPreferenceFragment {
|
||||||
@@ -135,10 +133,8 @@ public class ToolbarPreferenceFragment extends AbstractPreferenceFragment {
|
|||||||
*/
|
*/
|
||||||
@SuppressLint("UseCompatLoadingForDrawables")
|
@SuppressLint("UseCompatLoadingForDrawables")
|
||||||
public static Drawable getBackButtonDrawable() {
|
public static Drawable getBackButtonDrawable() {
|
||||||
final int backButtonResource = Utils.getResourceIdentifierOrThrow(ResourceType.DRAWABLE,
|
final int backButtonResource = Utils.getResourceIdentifierOrThrow(
|
||||||
Utils.appIsUsingBoldIcons()
|
"revanced_settings_toolbar_arrow_left", "drawable");
|
||||||
? "revanced_settings_toolbar_arrow_left_bold"
|
|
||||||
: "revanced_settings_toolbar_arrow_left");
|
|
||||||
Drawable drawable = Utils.getContext().getResources().getDrawable(backButtonResource);
|
Drawable drawable = Utils.getContext().getResources().getDrawable(backButtonResource);
|
||||||
customizeBackButtonDrawable(drawable);
|
customizeBackButtonDrawable(drawable);
|
||||||
return drawable;
|
return drawable;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import java.util.List;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.preference.ColorPickerPreference;
|
import app.revanced.extension.shared.settings.preference.ColorPickerPreference;
|
||||||
import app.revanced.extension.shared.settings.preference.CustomDialogListPreference;
|
import app.revanced.extension.shared.settings.preference.CustomDialogListPreference;
|
||||||
@@ -39,18 +38,18 @@ public abstract class BaseSearchResultItem {
|
|||||||
// Get the corresponding layout resource ID.
|
// Get the corresponding layout resource ID.
|
||||||
public int getLayoutResourceId() {
|
public int getLayoutResourceId() {
|
||||||
return switch (this) {
|
return switch (this) {
|
||||||
case REGULAR, URL_LINK -> getResourceIdentifier("revanced_preference_search_result_regular");
|
case REGULAR, URL_LINK -> getResourceIdentifier("revanced_preference_search_result_regular");
|
||||||
case SWITCH -> getResourceIdentifier("revanced_preference_search_result_switch");
|
case SWITCH -> getResourceIdentifier("revanced_preference_search_result_switch");
|
||||||
case LIST -> getResourceIdentifier("revanced_preference_search_result_list");
|
case LIST -> getResourceIdentifier("revanced_preference_search_result_list");
|
||||||
case COLOR_PICKER -> getResourceIdentifier("revanced_preference_search_result_color");
|
case COLOR_PICKER -> getResourceIdentifier("revanced_preference_search_result_color");
|
||||||
case GROUP_HEADER -> getResourceIdentifier("revanced_preference_search_result_group_header");
|
case GROUP_HEADER -> getResourceIdentifier("revanced_preference_search_result_group_header");
|
||||||
case NO_RESULTS -> getResourceIdentifier("revanced_preference_search_no_result");
|
case NO_RESULTS -> getResourceIdentifier("revanced_preference_search_no_result");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getResourceIdentifier(String name) {
|
private static int getResourceIdentifier(String name) {
|
||||||
// Placeholder for actual resource identifier retrieval.
|
// Placeholder for actual resource identifier retrieval.
|
||||||
return Utils.getResourceIdentifierOrThrow(ResourceType.LAYOUT, name);
|
return Utils.getResourceIdentifierOrThrow(name, "layout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package app.revanced.extension.shared.settings.search;
|
package app.revanced.extension.shared.settings.search;
|
||||||
|
|
||||||
import static app.revanced.extension.shared.Utils.getResourceIdentifierOrThrow;
|
import static app.revanced.extension.shared.Utils.getResourceIdentifierOrThrow;
|
||||||
|
import static app.revanced.extension.shared.settings.search.BaseSearchViewController.DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON;
|
||||||
|
|
||||||
import android.animation.AnimatorSet;
|
import android.animation.AnimatorSet;
|
||||||
import android.animation.ArgbEvaluator;
|
import android.animation.ArgbEvaluator;
|
||||||
@@ -32,7 +33,6 @@ import java.lang.reflect.Method;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.preference.ColorPickerPreference;
|
import app.revanced.extension.shared.settings.preference.ColorPickerPreference;
|
||||||
import app.revanced.extension.shared.settings.preference.CustomDialogListPreference;
|
import app.revanced.extension.shared.settings.preference.CustomDialogListPreference;
|
||||||
@@ -54,15 +54,15 @@ public abstract class BaseSearchResultsAdapter extends ArrayAdapter<BaseSearchRe
|
|||||||
protected static final int PAUSE_BETWEEN_BLINKS = 100;
|
protected static final int PAUSE_BETWEEN_BLINKS = 100;
|
||||||
|
|
||||||
protected static final int ID_PREFERENCE_TITLE = getResourceIdentifierOrThrow(
|
protected static final int ID_PREFERENCE_TITLE = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "preference_title");
|
"preference_title", "id");
|
||||||
protected static final int ID_PREFERENCE_SUMMARY = getResourceIdentifierOrThrow(
|
protected static final int ID_PREFERENCE_SUMMARY = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "preference_summary");
|
"preference_summary", "id");
|
||||||
protected static final int ID_PREFERENCE_PATH = getResourceIdentifierOrThrow(
|
protected static final int ID_PREFERENCE_PATH = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "preference_path");
|
"preference_path", "id");
|
||||||
protected static final int ID_PREFERENCE_SWITCH = getResourceIdentifierOrThrow(
|
protected static final int ID_PREFERENCE_SWITCH = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "preference_switch");
|
"preference_switch", "id");
|
||||||
protected static final int ID_PREFERENCE_COLOR_DOT = getResourceIdentifierOrThrow(
|
protected static final int ID_PREFERENCE_COLOR_DOT = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "preference_color_dot");
|
"preference_color_dot", "id");
|
||||||
|
|
||||||
protected static class RegularViewHolder {
|
protected static class RegularViewHolder {
|
||||||
TextView titleView;
|
TextView titleView;
|
||||||
@@ -275,7 +275,7 @@ public abstract class BaseSearchResultsAdapter extends ArrayAdapter<BaseSearchRe
|
|||||||
holder.titleView.setText(item.highlightedTitle);
|
holder.titleView.setText(item.highlightedTitle);
|
||||||
holder.summaryView.setText(item.highlightedSummary);
|
holder.summaryView.setText(item.highlightedSummary);
|
||||||
holder.summaryView.setVisibility(TextUtils.isEmpty(item.highlightedSummary) ? View.GONE : View.VISIBLE);
|
holder.summaryView.setVisibility(TextUtils.isEmpty(item.highlightedSummary) ? View.GONE : View.VISIBLE);
|
||||||
holder.iconView.setImageResource(BaseSearchViewController.getSearchIcon());
|
holder.iconView.setImageResource(DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import android.preference.PreferenceGroup;
|
|||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
@@ -38,7 +37,6 @@ import java.util.Set;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.AppLanguage;
|
import app.revanced.extension.shared.settings.AppLanguage;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
@@ -72,29 +70,14 @@ public abstract class BaseSearchViewController {
|
|||||||
|
|
||||||
protected static final int MAX_SEARCH_RESULTS = 50; // Maximum number of search results displayed.
|
protected static final int MAX_SEARCH_RESULTS = 50; // Maximum number of search results displayed.
|
||||||
|
|
||||||
protected static final int ID_REVANCED_SEARCH_VIEW = getResourceIdentifierOrThrow(
|
protected static final int ID_REVANCED_SEARCH_VIEW = getResourceIdentifierOrThrow("revanced_search_view", "id");
|
||||||
ResourceType.ID, "revanced_search_view");
|
protected static final int ID_REVANCED_SEARCH_VIEW_CONTAINER = getResourceIdentifierOrThrow("revanced_search_view_container", "id");
|
||||||
protected static final int ID_REVANCED_SEARCH_VIEW_CONTAINER = getResourceIdentifierOrThrow(
|
protected static final int ID_ACTION_SEARCH = getResourceIdentifierOrThrow("action_search", "id");
|
||||||
ResourceType.ID, "revanced_search_view_container");
|
protected static final int ID_REVANCED_SETTINGS_FRAGMENTS = getResourceIdentifierOrThrow("revanced_settings_fragments", "id");
|
||||||
protected static final int ID_ACTION_SEARCH = getResourceIdentifierOrThrow(
|
public static final int DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON =
|
||||||
ResourceType.ID, "action_search");
|
getResourceIdentifierOrThrow("revanced_settings_search_icon", "drawable");
|
||||||
protected static final int ID_REVANCED_SETTINGS_FRAGMENTS = getResourceIdentifierOrThrow(
|
protected static final int MENU_REVANCED_SEARCH_MENU =
|
||||||
ResourceType.ID, "revanced_settings_fragments");
|
getResourceIdentifierOrThrow("revanced_search_menu", "menu");
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_search_icon");
|
|
||||||
private static final int DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON_BOLD = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_search_icon_bold");
|
|
||||||
protected static final int MENU_REVANCED_SEARCH_MENU = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.MENU, "revanced_search_menu");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The search icon, either bold or not bold, depending on the ReVanced UI setting.
|
|
||||||
*/
|
|
||||||
public static int getSearchIcon() {
|
|
||||||
return Utils.appIsUsingBoldIcons()
|
|
||||||
? DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON_BOLD
|
|
||||||
: DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new BaseSearchViewController instance.
|
* Constructs a new BaseSearchViewController instance.
|
||||||
@@ -129,7 +112,7 @@ public abstract class BaseSearchViewController {
|
|||||||
// Retrieve SearchView and container from XML.
|
// Retrieve SearchView and container from XML.
|
||||||
searchView = activity.findViewById(ID_REVANCED_SEARCH_VIEW);
|
searchView = activity.findViewById(ID_REVANCED_SEARCH_VIEW);
|
||||||
EditText searchEditText = searchView.findViewById(Utils.getResourceIdentifierOrThrow(
|
EditText searchEditText = searchView.findViewById(Utils.getResourceIdentifierOrThrow(
|
||||||
null, "android:id/search_src_text"));
|
"android:id/search_src_text", null));
|
||||||
// Disable fullscreen keyboard mode.
|
// Disable fullscreen keyboard mode.
|
||||||
searchEditText.setImeOptions(searchEditText.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
searchEditText.setImeOptions(searchEditText.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||||
|
|
||||||
@@ -265,10 +248,6 @@ public abstract class BaseSearchViewController {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set bold icon if needed.
|
|
||||||
MenuItem search = toolbar.getMenu().findItem(ID_ACTION_SEARCH);
|
|
||||||
search.setIcon(getSearchIcon());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -545,7 +524,7 @@ public abstract class BaseSearchViewController {
|
|||||||
noResultsPreference.setTitle(str("revanced_settings_search_no_results_title", query));
|
noResultsPreference.setTitle(str("revanced_settings_search_no_results_title", query));
|
||||||
noResultsPreference.setSummary(str("revanced_settings_search_no_results_summary"));
|
noResultsPreference.setSummary(str("revanced_settings_search_no_results_summary"));
|
||||||
noResultsPreference.setSelectable(false);
|
noResultsPreference.setSelectable(false);
|
||||||
noResultsPreference.setIcon(getSearchIcon());
|
noResultsPreference.setIcon(DRAWABLE_REVANCED_SETTINGS_SEARCH_ICON);
|
||||||
filteredSearchItems.add(new BaseSearchResultItem.PreferenceSearchItem(noResultsPreference, "", Collections.emptyList()));
|
filteredSearchItems.add(new BaseSearchResultItem.PreferenceSearchItem(noResultsPreference, "", Collections.emptyList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import java.util.Deque;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.shared.settings.preference.BulletPointPreference;
|
import app.revanced.extension.shared.settings.preference.BulletPointPreference;
|
||||||
import app.revanced.extension.shared.ui.CustomDialog;
|
import app.revanced.extension.shared.ui.CustomDialog;
|
||||||
|
|
||||||
@@ -39,35 +37,25 @@ public class SearchHistoryManager {
|
|||||||
private static final int MAX_HISTORY_SIZE = 5; // Maximum history items stored.
|
private static final int MAX_HISTORY_SIZE = 5; // Maximum history items stored.
|
||||||
|
|
||||||
private static final int ID_CLEAR_HISTORY_BUTTON = getResourceIdentifierOrThrow(
|
private static final int ID_CLEAR_HISTORY_BUTTON = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "clear_history_button");
|
"clear_history_button", "id");
|
||||||
private static final int ID_HISTORY_TEXT = getResourceIdentifierOrThrow(
|
private static final int ID_HISTORY_TEXT = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "history_text");
|
"history_text", "id");
|
||||||
private static final int ID_HISTORY_ICON = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.ID, "history_icon");
|
|
||||||
private static final int ID_DELETE_ICON = getResourceIdentifierOrThrow(
|
private static final int ID_DELETE_ICON = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "delete_icon");
|
"delete_icon", "id");
|
||||||
private static final int ID_EMPTY_HISTORY_TITLE = getResourceIdentifierOrThrow(
|
private static final int ID_EMPTY_HISTORY_TITLE = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "empty_history_title");
|
"empty_history_title", "id");
|
||||||
private static final int ID_EMPTY_HISTORY_SUMMARY = getResourceIdentifierOrThrow(
|
private static final int ID_EMPTY_HISTORY_SUMMARY = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "empty_history_summary");
|
"empty_history_summary", "id");
|
||||||
private static final int ID_SEARCH_HISTORY_HEADER = getResourceIdentifierOrThrow(
|
private static final int ID_SEARCH_HISTORY_HEADER = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "search_history_header");
|
"search_history_header", "id");
|
||||||
private static final int ID_SEARCH_TIPS_SUMMARY = getResourceIdentifierOrThrow(
|
private static final int ID_SEARCH_TIPS_SUMMARY = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "revanced_settings_search_tips_summary");
|
"revanced_settings_search_tips_summary", "id");
|
||||||
private static final int LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_SCREEN = getResourceIdentifierOrThrow(
|
private static final int LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_SCREEN = getResourceIdentifierOrThrow(
|
||||||
ResourceType.LAYOUT, "revanced_preference_search_history_screen");
|
"revanced_preference_search_history_screen", "layout");
|
||||||
private static final int LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_ITEM = getResourceIdentifierOrThrow(
|
private static final int LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_ITEM = getResourceIdentifierOrThrow(
|
||||||
ResourceType.LAYOUT, "revanced_preference_search_history_item");
|
"revanced_preference_search_history_item", "layout");
|
||||||
private static final int ID_SEARCH_HISTORY_LIST = getResourceIdentifierOrThrow(
|
private static final int ID_SEARCH_HISTORY_LIST = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "search_history_list");
|
"search_history_list", "id");
|
||||||
private static final int ID_SEARCH_REMOVE_ICON = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_search_remove");
|
|
||||||
private static final int ID_SEARCH_REMOVE_ICON_BOLD = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_search_remove_bold");
|
|
||||||
private static final int ID_SEARCH_ARROW_TIME_ICON = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_arrow_time");
|
|
||||||
private static final int ID_SEARCH_ARROW_TIME_ICON_BOLD = getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, "revanced_settings_arrow_time_bold");
|
|
||||||
|
|
||||||
private final Deque<String> searchHistory;
|
private final Deque<String> searchHistory;
|
||||||
private final Activity activity;
|
private final Activity activity;
|
||||||
@@ -109,8 +97,7 @@ public class SearchHistoryManager {
|
|||||||
|
|
||||||
// Inflate search history layout.
|
// Inflate search history layout.
|
||||||
LayoutInflater inflater = LayoutInflater.from(activity);
|
LayoutInflater inflater = LayoutInflater.from(activity);
|
||||||
View historyView = inflater.inflate(LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_SCREEN,
|
View historyView = inflater.inflate(LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_SCREEN, searchHistoryContainer, false);
|
||||||
searchHistoryContainer, false);
|
|
||||||
searchHistoryContainer.addView(historyView, new FrameLayout.LayoutParams(
|
searchHistoryContainer.addView(historyView, new FrameLayout.LayoutParams(
|
||||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||||
FrameLayout.LayoutParams.MATCH_PARENT));
|
FrameLayout.LayoutParams.MATCH_PARENT));
|
||||||
@@ -333,29 +320,17 @@ public class SearchHistoryManager {
|
|||||||
public void notifyDataSetChanged() {
|
public void notifyDataSetChanged() {
|
||||||
container.removeAllViews();
|
container.removeAllViews();
|
||||||
for (String query : history) {
|
for (String query : history) {
|
||||||
View view = inflater.inflate(LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_ITEM,
|
View view = inflater.inflate(LAYOUT_REVANCED_PREFERENCE_SEARCH_HISTORY_ITEM, container, false);
|
||||||
container, false);
|
|
||||||
|
TextView historyText = view.findViewById(ID_HISTORY_TEXT);
|
||||||
|
ImageView deleteIcon = view.findViewById(ID_DELETE_ICON);
|
||||||
|
|
||||||
|
historyText.setText(query);
|
||||||
|
|
||||||
// Set click listener for main item (select query).
|
// Set click listener for main item (select query).
|
||||||
view.setOnClickListener(v -> onSelectHistoryItemListener.onSelectHistoryItem(query));
|
view.setOnClickListener(v -> onSelectHistoryItemListener.onSelectHistoryItem(query));
|
||||||
|
|
||||||
// Set history icon.
|
|
||||||
ImageView historyIcon = view.findViewById(ID_HISTORY_ICON);
|
|
||||||
historyIcon.setImageResource(Utils.appIsUsingBoldIcons()
|
|
||||||
? ID_SEARCH_ARROW_TIME_ICON_BOLD
|
|
||||||
: ID_SEARCH_ARROW_TIME_ICON
|
|
||||||
);
|
|
||||||
|
|
||||||
TextView historyText = view.findViewById(ID_HISTORY_TEXT);
|
|
||||||
historyText.setText(query);
|
|
||||||
|
|
||||||
// Set click listener for delete icon.
|
// Set click listener for delete icon.
|
||||||
ImageView deleteIcon = view.findViewById(ID_DELETE_ICON);
|
|
||||||
|
|
||||||
deleteIcon.setImageResource(Utils.appIsUsingBoldIcons()
|
|
||||||
? ID_SEARCH_REMOVE_ICON_BOLD
|
|
||||||
: ID_SEARCH_REMOVE_ICON
|
|
||||||
);
|
|
||||||
|
|
||||||
deleteIcon.setOnClickListener(v -> createAndShowDialog(
|
deleteIcon.setOnClickListener(v -> createAndShowDialog(
|
||||||
query,
|
query,
|
||||||
str("revanced_settings_search_remove_message"),
|
str("revanced_settings_search_remove_message"),
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import java.nio.ByteBuffer;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -82,15 +83,22 @@ public class StreamingDataRequest {
|
|||||||
*/
|
*/
|
||||||
private static final int MAX_MILLISECONDS_TO_WAIT_FOR_FETCH = 20 * 1000;
|
private static final int MAX_MILLISECONDS_TO_WAIT_FOR_FETCH = 20 * 1000;
|
||||||
|
|
||||||
/**
|
|
||||||
* Cache limit must be greater than the maximum number of videos open at once,
|
|
||||||
* which theoretically is more than 4 (3 Shorts + one regular minimized video).
|
|
||||||
* But instead use a much larger value, to handle if a video viewed a while ago
|
|
||||||
* is somehow still referenced. Each stream is a small array of Strings
|
|
||||||
* so memory usage is not a concern.
|
|
||||||
*/
|
|
||||||
private static final Map<String, StreamingDataRequest> cache = Collections.synchronizedMap(
|
private static final Map<String, StreamingDataRequest> cache = Collections.synchronizedMap(
|
||||||
Utils.createSizeRestrictedMap(50));
|
new LinkedHashMap<>(100) {
|
||||||
|
/**
|
||||||
|
* Cache limit must be greater than the maximum number of videos open at once,
|
||||||
|
* which theoretically is more than 4 (3 Shorts + one regular minimized video).
|
||||||
|
* But instead use a much larger value, to handle if a video viewed a while ago
|
||||||
|
* is somehow still referenced. Each stream is a small array of Strings
|
||||||
|
* so memory usage is not a concern.
|
||||||
|
*/
|
||||||
|
private static final int CACHE_LIMIT = 50;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean removeEldestEntry(Entry eldest) {
|
||||||
|
return size() > CACHE_LIMIT; // Evict the oldest entry if over the cache limit.
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strings found in the response if the video is a livestream.
|
* Strings found in the response if the video is a livestream.
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package app.revanced.extension.spotify.layout.hide.createbutton;
|
package app.revanced.extension.spotify.layout.hide.createbutton;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.spotify.shared.ComponentFilters.ComponentFilter;
|
import app.revanced.extension.spotify.shared.ComponentFilters.ComponentFilter;
|
||||||
import app.revanced.extension.spotify.shared.ComponentFilters.ResourceIdComponentFilter;
|
import app.revanced.extension.spotify.shared.ComponentFilters.ResourceIdComponentFilter;
|
||||||
import app.revanced.extension.spotify.shared.ComponentFilters.StringComponentFilter;
|
import app.revanced.extension.spotify.shared.ComponentFilters.StringComponentFilter;
|
||||||
@@ -17,7 +16,7 @@ public final class HideCreateButtonPatch {
|
|||||||
* The main approach used is matching the resource id for the Create button title.
|
* The main approach used is matching the resource id for the Create button title.
|
||||||
*/
|
*/
|
||||||
private static final List<ComponentFilter> CREATE_BUTTON_COMPONENT_FILTERS = List.of(
|
private static final List<ComponentFilter> CREATE_BUTTON_COMPONENT_FILTERS = List.of(
|
||||||
new ResourceIdComponentFilter(ResourceType.STRING, "navigationbar_musicappitems_create_title"),
|
new ResourceIdComponentFilter("navigationbar_musicappitems_create_title", "string"),
|
||||||
// Temporary fallback and fix for APKs merged with AntiSplit-M not having resources properly encoded,
|
// Temporary fallback and fix for APKs merged with AntiSplit-M not having resources properly encoded,
|
||||||
// and thus getting the resource identifier for the Create button title always return 0.
|
// and thus getting the resource identifier for the Create button title always return 0.
|
||||||
// FIXME: Remove this once the above issue is no longer relevant.
|
// FIXME: Remove this once the above issue is no longer relevant.
|
||||||
@@ -29,7 +28,7 @@ public final class HideCreateButtonPatch {
|
|||||||
* Used in older versions of the app.
|
* Used in older versions of the app.
|
||||||
*/
|
*/
|
||||||
private static final ResourceIdComponentFilter OLD_CREATE_BUTTON_COMPONENT_FILTER =
|
private static final ResourceIdComponentFilter OLD_CREATE_BUTTON_COMPONENT_FILTER =
|
||||||
new ResourceIdComponentFilter(ResourceType.STRING, "bottom_navigation_bar_create_tab_title");
|
new ResourceIdComponentFilter("bottom_navigation_bar_create_tab_title", "string");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point. This method is called on every navigation bar item to check whether it is the Create button.
|
* Injection point. This method is called on every navigation bar item to check whether it is the Create button.
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package app.revanced.extension.spotify.shared;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
|
|
||||||
public final class ComponentFilters {
|
public final class ComponentFilters {
|
||||||
@@ -20,26 +19,21 @@ public final class ComponentFilters {
|
|||||||
public static final class ResourceIdComponentFilter implements ComponentFilter {
|
public static final class ResourceIdComponentFilter implements ComponentFilter {
|
||||||
|
|
||||||
public final String resourceName;
|
public final String resourceName;
|
||||||
public final ResourceType resourceType;
|
public final String resourceType;
|
||||||
// Android resources are always positive, so -1 is a valid sentinel value to indicate it has not been loaded.
|
// Android resources are always positive, so -1 is a valid sentinel value to indicate it has not been loaded.
|
||||||
// 0 is returned when a resource has not been found.
|
// 0 is returned when a resource has not been found.
|
||||||
private int resourceId = -1;
|
private int resourceId = -1;
|
||||||
@Nullable
|
@Nullable
|
||||||
private String stringfiedResourceId;
|
private String stringfiedResourceId;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public ResourceIdComponentFilter(String resourceName, String resourceType) {
|
public ResourceIdComponentFilter(String resourceName, String resourceType) {
|
||||||
this(ResourceType.valueOf(resourceType), resourceName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResourceIdComponentFilter(ResourceType resourceType, String resourceName) {
|
|
||||||
this.resourceName = resourceName;
|
this.resourceName = resourceName;
|
||||||
this.resourceType = resourceType;
|
this.resourceType = resourceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getResourceId() {
|
public int getResourceId() {
|
||||||
if (resourceId == -1) {
|
if (resourceId == -1) {
|
||||||
resourceId = Utils.getResourceIdentifier(resourceType, resourceName);
|
resourceId = Utils.getResourceIdentifier(resourceName, resourceType);
|
||||||
}
|
}
|
||||||
return resourceId;
|
return resourceId;
|
||||||
}
|
}
|
||||||
|
|||||||
5
extensions/strava/build.gradle.kts
Normal file
5
extensions/strava/build.gradle.kts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
dependencies {
|
||||||
|
compileOnly(project(":extensions:shared:library"))
|
||||||
|
compileOnly(project(":extensions:strava:stub"))
|
||||||
|
compileOnly(libs.okhttp)
|
||||||
|
}
|
||||||
1
extensions/strava/src/main/AndroidManifest.xml
Normal file
1
extensions/strava/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<manifest/>
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
package app.revanced.extension.strava;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.ContentResolver;
|
||||||
|
import android.content.ContentValues;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.webkit.MimeTypeMap;
|
||||||
|
|
||||||
|
import com.strava.core.data.MediaType;
|
||||||
|
import com.strava.photos.data.Media;
|
||||||
|
|
||||||
|
import okhttp3.*;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.concurrent.Future;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import app.revanced.extension.shared.Utils;
|
||||||
|
|
||||||
|
@SuppressLint("NewApi")
|
||||||
|
public final class AddMediaDownloadPatch {
|
||||||
|
public static final int ACTION_DOWNLOAD = -1;
|
||||||
|
public static final int ACTION_OPEN_LINK = -2;
|
||||||
|
public static final int ACTION_COPY_LINK = -3;
|
||||||
|
|
||||||
|
private static final OkHttpClient client = new OkHttpClient();
|
||||||
|
|
||||||
|
public static boolean handleAction(int actionId, Media media) {
|
||||||
|
String url = getUrl(media);
|
||||||
|
switch (actionId) {
|
||||||
|
case ACTION_DOWNLOAD:
|
||||||
|
String name = media.getId();
|
||||||
|
if (media.getType() == MediaType.VIDEO) {
|
||||||
|
downloadVideo(url, name);
|
||||||
|
} else {
|
||||||
|
downloadPhoto(url, name);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
case ACTION_OPEN_LINK:
|
||||||
|
Utils.openLink(url);
|
||||||
|
return true;
|
||||||
|
case ACTION_COPY_LINK:
|
||||||
|
copyLink(url);
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void copyLink(CharSequence url) {
|
||||||
|
Utils.setClipboard(url);
|
||||||
|
showInfoToast("link_copied_to_clipboard", "🔗");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void downloadPhoto(String url, String name) {
|
||||||
|
showInfoToast("loading", "⏳");
|
||||||
|
Utils.runOnBackgroundThread(() -> {
|
||||||
|
try (Response response = fetch(url)) {
|
||||||
|
ResponseBody body = response.body();
|
||||||
|
String mimeType = body.contentType().toString();
|
||||||
|
String extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType);
|
||||||
|
ContentResolver resolver = Utils.getContext().getContentResolver();
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
values.put(MediaStore.Images.Media.DISPLAY_NAME, name + '.' + extension);
|
||||||
|
values.put(MediaStore.Images.Media.IS_PENDING, 1);
|
||||||
|
values.put(MediaStore.Images.Media.MIME_TYPE, mimeType);
|
||||||
|
values.put(MediaStore.Images.Media.RELATIVE_PATH, Environment.DIRECTORY_PICTURES + "/Strava");
|
||||||
|
Uri collection = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
||||||
|
? MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL)
|
||||||
|
: MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
|
||||||
|
Uri row = resolver.insert(collection, values);
|
||||||
|
try (OutputStream outputStream = resolver.openOutputStream(row)) {
|
||||||
|
transferTo(body.byteStream(), outputStream);
|
||||||
|
} finally {
|
||||||
|
values.clear();
|
||||||
|
values.put(MediaStore.Images.Media.IS_PENDING, 0);
|
||||||
|
resolver.update(row, values, null);
|
||||||
|
}
|
||||||
|
showInfoToast("yis_2024_local_save_image_success", "✔️");
|
||||||
|
} catch (IOException e) {
|
||||||
|
showErrorToast("download_failure", "❌", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Downloads a video in the M3U8 / HLS (HTTP Live Streaming) format.
|
||||||
|
*/
|
||||||
|
public static void downloadVideo(String url, String name) {
|
||||||
|
// The first request yields multiple URLs with different stream options.
|
||||||
|
// In case of Strava, the first one is always of highest quality.
|
||||||
|
// Each stream can consist of multiple chunks.
|
||||||
|
// The second request yields the URLs of all of these chunks.
|
||||||
|
// Fetch all of them concurrently and pipe their streams into the file in order.
|
||||||
|
showInfoToast("loading", "⏳");
|
||||||
|
Utils.runOnBackgroundThread(() -> {
|
||||||
|
try {
|
||||||
|
String highestQualityStreamUrl;
|
||||||
|
try (Response response = fetch(url)) {
|
||||||
|
highestQualityStreamUrl = replaceFileName(url, lines(response).findFirst().get());
|
||||||
|
}
|
||||||
|
List<Future<Response>> futures;
|
||||||
|
try (Response response = fetch(highestQualityStreamUrl)) {
|
||||||
|
futures = lines(response)
|
||||||
|
.map(line -> replaceFileName(highestQualityStreamUrl, line))
|
||||||
|
.map(chunkUrl -> Utils.submitOnBackgroundThread(() -> fetch(chunkUrl)))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
ContentResolver resolver = Utils.getContext().getContentResolver();
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
values.put(MediaStore.Video.Media.DISPLAY_NAME, name + '.' + "mp4");
|
||||||
|
values.put(MediaStore.Video.Media.IS_PENDING, 1);
|
||||||
|
values.put(MediaStore.Video.Media.MIME_TYPE, MimeTypeMap.getSingleton().getMimeTypeFromExtension("mp4"));
|
||||||
|
values.put(MediaStore.Video.Media.RELATIVE_PATH, Environment.DIRECTORY_MOVIES + "/Strava");
|
||||||
|
Uri collection = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
||||||
|
? MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL)
|
||||||
|
: MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
|
||||||
|
Uri row = resolver.insert(collection, values);
|
||||||
|
try (OutputStream outputStream = resolver.openOutputStream(row)) {
|
||||||
|
Throwable error = null;
|
||||||
|
for (Future<Response> future : futures) {
|
||||||
|
if (error != null) {
|
||||||
|
if (future.cancel(true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try (Response response = future.get()) {
|
||||||
|
if (error == null) {
|
||||||
|
transferTo(response.body().byteStream(), outputStream);
|
||||||
|
}
|
||||||
|
} catch (InterruptedException | IOException e) {
|
||||||
|
error = e;
|
||||||
|
} catch (ExecutionException e) {
|
||||||
|
error = e.getCause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (error != null) {
|
||||||
|
throw new IOException(error);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
values.clear();
|
||||||
|
values.put(MediaStore.Video.Media.IS_PENDING, 0);
|
||||||
|
resolver.update(row, values, null);
|
||||||
|
}
|
||||||
|
showInfoToast("yis_2024_local_save_video_success", "✔️");
|
||||||
|
} catch (IOException e) {
|
||||||
|
showErrorToast("download_failure", "❌", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getUrl(Media media) {
|
||||||
|
return media.getType() == MediaType.VIDEO
|
||||||
|
? ((Media.Video) media).getVideoUrl()
|
||||||
|
: media.getLargestUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getString(String name, String fallback) {
|
||||||
|
int id = Utils.getResourceIdentifier(name, "string");
|
||||||
|
return id != 0
|
||||||
|
? Utils.getResourceString(id)
|
||||||
|
: fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void showInfoToast(String resourceName, String fallback) {
|
||||||
|
String text = getString(resourceName, fallback);
|
||||||
|
Utils.showToastShort(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void showErrorToast(String resourceName, String fallback, IOException exception) {
|
||||||
|
String text = getString(resourceName, fallback);
|
||||||
|
Utils.showToastLong(text + ' ' + exception.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Response fetch(String url) throws IOException {
|
||||||
|
Request request = new Request.Builder().url(url).build();
|
||||||
|
Response response = client.newCall(request).execute();
|
||||||
|
if (!response.isSuccessful()) {
|
||||||
|
throw new IOException("Got HTTP status code " + response.code());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code inputStream.transferTo(outputStream)} is "too new".
|
||||||
|
*/
|
||||||
|
private static void transferTo(InputStream in, OutputStream out) throws IOException {
|
||||||
|
byte[] buffer = new byte[1024 * 8];
|
||||||
|
int length;
|
||||||
|
while ((length = in.read(buffer)) != -1) {
|
||||||
|
out.write(buffer, 0, length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all file names.
|
||||||
|
*/
|
||||||
|
private static Stream<String> lines(Response response) {
|
||||||
|
BufferedReader reader = new BufferedReader(response.body().charStream());
|
||||||
|
return reader.lines().filter(line -> !line.startsWith("#"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String replaceFileName(String uri, String newName) {
|
||||||
|
return uri.substring(0, uri.lastIndexOf('/') + 1) + newName;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
extensions/strava/stub/build.gradle.kts
Normal file
12
extensions/strava/stub/build.gradle.kts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.library)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.revanced.extension"
|
||||||
|
compileSdk = 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = 21
|
||||||
|
}
|
||||||
|
}
|
||||||
1
extensions/strava/stub/src/main/AndroidManifest.xml
Normal file
1
extensions/strava/stub/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<manifest/>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.strava.core.data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public interface MediaContent extends Serializable {
|
||||||
|
String getCaption();
|
||||||
|
|
||||||
|
String getId();
|
||||||
|
|
||||||
|
String getReferenceId();
|
||||||
|
|
||||||
|
MediaType getType();
|
||||||
|
|
||||||
|
void setCaption(String caption);
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.strava.core.data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public final class MediaDimension implements Comparable<MediaDimension>, Serializable {
|
||||||
|
private final int height;
|
||||||
|
private final int width;
|
||||||
|
|
||||||
|
public MediaDimension(int width, int height) {
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getHeightScale() {
|
||||||
|
if (width <= 0 || height <= 0) {
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
return height / width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getWidthScale() {
|
||||||
|
if (width <= 0 || height <= 0) {
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
return width / height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLandscape() {
|
||||||
|
return width > 0 && width >= height;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(MediaDimension other) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.strava.core.data;
|
||||||
|
|
||||||
|
public enum MediaType {
|
||||||
|
PHOTO(1),
|
||||||
|
VIDEO(2);
|
||||||
|
|
||||||
|
private final int remoteValue;
|
||||||
|
|
||||||
|
private MediaType(int remoteValue) {
|
||||||
|
this.remoteValue = remoteValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRemoteValue() {
|
||||||
|
return remoteValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.strava.core.data;
|
||||||
|
|
||||||
|
import java.util.SortedMap;
|
||||||
|
|
||||||
|
public interface RemoteMediaContent extends MediaContent {
|
||||||
|
MediaDimension getLargestSize();
|
||||||
|
|
||||||
|
String getLargestUrl();
|
||||||
|
|
||||||
|
SortedMap<Integer, MediaDimension> getSizes();
|
||||||
|
|
||||||
|
String getSmallestUrl();
|
||||||
|
|
||||||
|
RemoteMediaStatus getStatus();
|
||||||
|
|
||||||
|
SortedMap<Integer, String> getUrls();
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.strava.core.data;
|
||||||
|
|
||||||
|
public enum RemoteMediaStatus {
|
||||||
|
NEW,
|
||||||
|
PENDING,
|
||||||
|
PROCESSED,
|
||||||
|
REPORTED,
|
||||||
|
REINSTATED,
|
||||||
|
DELETED,
|
||||||
|
FAILED
|
||||||
|
}
|
||||||
@@ -0,0 +1,286 @@
|
|||||||
|
package com.strava.photos.data;
|
||||||
|
|
||||||
|
import com.strava.core.data.MediaDimension;
|
||||||
|
import com.strava.core.data.MediaType;
|
||||||
|
import com.strava.core.data.RemoteMediaContent;
|
||||||
|
import com.strava.core.data.RemoteMediaStatus;
|
||||||
|
import java.util.SortedMap;
|
||||||
|
|
||||||
|
public abstract class Media implements RemoteMediaContent {
|
||||||
|
public static final class Photo extends Media {
|
||||||
|
private final Long activityId;
|
||||||
|
private final String activityName;
|
||||||
|
private final long athleteId;
|
||||||
|
private String caption;
|
||||||
|
private final String createdAt;
|
||||||
|
private final String createdAtLocal;
|
||||||
|
private final String cursor;
|
||||||
|
private final String id;
|
||||||
|
private final SortedMap<Integer, MediaDimension> sizes;
|
||||||
|
private final RemoteMediaStatus status;
|
||||||
|
private final String tag;
|
||||||
|
private final MediaType type;
|
||||||
|
private final SortedMap<Integer, String> urls;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getActivityName() {
|
||||||
|
return activityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getAthleteId() {
|
||||||
|
return athleteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCaption() {
|
||||||
|
return caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCreatedAtLocal() {
|
||||||
|
return createdAtLocal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCursor() {
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SortedMap<Integer, MediaDimension> getSizes() {
|
||||||
|
return sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteMediaStatus getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MediaType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SortedMap<Integer, String> getUrls() {
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCaption(String caption) {
|
||||||
|
this.caption = caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Photo(String id,
|
||||||
|
String caption,
|
||||||
|
SortedMap<Integer, String> urls,
|
||||||
|
SortedMap<Integer, MediaDimension> sizes,
|
||||||
|
long athleteId,
|
||||||
|
String createdAt,
|
||||||
|
String createdAtLocal,
|
||||||
|
Long activityId,
|
||||||
|
String activityName,
|
||||||
|
RemoteMediaStatus status,
|
||||||
|
String tag,
|
||||||
|
String cursor) {
|
||||||
|
this.id = id;
|
||||||
|
this.caption = caption;
|
||||||
|
this.urls = urls;
|
||||||
|
this.sizes = sizes;
|
||||||
|
this.athleteId = athleteId;
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
this.createdAtLocal = createdAtLocal;
|
||||||
|
this.activityId = activityId;
|
||||||
|
this.activityName = activityName;
|
||||||
|
this.status = status;
|
||||||
|
this.tag = tag;
|
||||||
|
this.cursor = cursor;
|
||||||
|
this.type = MediaType.PHOTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Video extends Media {
|
||||||
|
private final Long activityId;
|
||||||
|
private final String activityName;
|
||||||
|
private final long athleteId;
|
||||||
|
private String caption;
|
||||||
|
private final String createdAt;
|
||||||
|
private final String createdAtLocal;
|
||||||
|
private final String cursor;
|
||||||
|
private final Float durationSeconds;
|
||||||
|
private final String id;
|
||||||
|
private final SortedMap<Integer, MediaDimension> sizes;
|
||||||
|
private final RemoteMediaStatus status;
|
||||||
|
private final String tag;
|
||||||
|
private final MediaType type;
|
||||||
|
private final SortedMap<Integer, String> urls;
|
||||||
|
private final String videoUrl;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getActivityName() {
|
||||||
|
return activityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getAthleteId() {
|
||||||
|
return athleteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCaption() {
|
||||||
|
return caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCreatedAtLocal() {
|
||||||
|
return createdAtLocal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCursor() {
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final Float getDurationSeconds() {
|
||||||
|
return durationSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SortedMap<Integer, MediaDimension> getSizes() {
|
||||||
|
return sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteMediaStatus getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MediaType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SortedMap<Integer, String> getUrls() {
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String getVideoUrl() {
|
||||||
|
return videoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCaption(String caption) {
|
||||||
|
this.caption = caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Video(String id,
|
||||||
|
String caption,
|
||||||
|
SortedMap<Integer, String> urls,
|
||||||
|
SortedMap<Integer, MediaDimension> sizes,
|
||||||
|
long athleteId,
|
||||||
|
String createdAt,
|
||||||
|
String createdAtLocal,
|
||||||
|
Long activityId,
|
||||||
|
String activityName,
|
||||||
|
RemoteMediaStatus status,
|
||||||
|
String videoUrl,
|
||||||
|
Float durationSeconds,
|
||||||
|
String tag,
|
||||||
|
String cursor) {
|
||||||
|
this.id = id;
|
||||||
|
this.caption = caption;
|
||||||
|
this.urls = urls;
|
||||||
|
this.sizes = sizes;
|
||||||
|
this.athleteId = athleteId;
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
this.createdAtLocal = createdAtLocal;
|
||||||
|
this.activityId = activityId;
|
||||||
|
this.activityName = activityName;
|
||||||
|
this.status = status;
|
||||||
|
this.videoUrl = videoUrl;
|
||||||
|
this.durationSeconds = durationSeconds;
|
||||||
|
this.tag = tag;
|
||||||
|
this.cursor = cursor;
|
||||||
|
this.type = MediaType.VIDEO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract Long getActivityId();
|
||||||
|
|
||||||
|
public abstract String getActivityName();
|
||||||
|
|
||||||
|
public abstract long getAthleteId();
|
||||||
|
|
||||||
|
public abstract String getCreatedAt();
|
||||||
|
|
||||||
|
public abstract String getCreatedAtLocal();
|
||||||
|
|
||||||
|
public abstract String getCursor();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MediaDimension getLargestSize() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLargestUrl() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getReferenceId() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSmallestUrl() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract String getTag();
|
||||||
|
|
||||||
|
private Media() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
package app.revanced.extension.twitch;
|
package app.revanced.extension.twitch;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
/* Called from SettingsPatch smali */
|
/* Called from SettingsPatch smali */
|
||||||
public static int getStringId(String name) {
|
public static int getStringId(String name) {
|
||||||
return app.revanced.extension.shared.Utils.getResourceIdentifier(
|
return app.revanced.extension.shared.Utils.getResourceIdentifier(name, "string");
|
||||||
ResourceType.STRING, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from SettingsPatch smali */
|
/* Called from SettingsPatch smali */
|
||||||
public static int getDrawableId(String name) {
|
public static int getDrawableId(String name) {
|
||||||
return app.revanced.extension.shared.Utils.getResourceIdentifier(
|
return app.revanced.extension.shared.Utils.getResourceIdentifier(name, "drawable");
|
||||||
ResourceType.DRAWABLE, name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,19 @@ import static app.revanced.extension.twitch.Utils.getStringId;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.twitch.settings.preference.TwitchPreferenceFragment;
|
import app.revanced.extension.twitch.settings.preference.TwitchPreferenceFragment;
|
||||||
|
|
||||||
import tv.twitch.android.feature.settings.menu.SettingsMenuGroup;
|
import tv.twitch.android.feature.settings.menu.SettingsMenuGroup;
|
||||||
import tv.twitch.android.settings.SettingsActivity;
|
import tv.twitch.android.settings.SettingsActivity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hooks AppCompatActivity to inject a custom {@link TwitchPreferenceFragment}.
|
* Hooks AppCompatActivity to inject a custom {@link TwitchPreferenceFragment}.
|
||||||
*/
|
*/
|
||||||
@@ -110,7 +108,7 @@ public class TwitchActivityHook {
|
|||||||
|
|
||||||
base.getFragmentManager()
|
base.getFragmentManager()
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
.replace(Utils.getResourceIdentifier(ResourceType.ID, "fragment_container"), fragment)
|
.replace(Utils.getResourceIdentifier("fragment_container", "id"), fragment)
|
||||||
.commit();
|
.commit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,8 +528,14 @@ public final class AlternativeThumbnailsPatch {
|
|||||||
* Cache used to verify if an alternative thumbnails exists for a given video id.
|
* Cache used to verify if an alternative thumbnails exists for a given video id.
|
||||||
*/
|
*/
|
||||||
@GuardedBy("itself")
|
@GuardedBy("itself")
|
||||||
private static final Map<String, VerifiedQualities> altVideoIdLookup =
|
private static final Map<String, VerifiedQualities> altVideoIdLookup = new LinkedHashMap<>(100) {
|
||||||
Utils.createSizeRestrictedMap(1000);
|
private static final int CACHE_LIMIT = 1000;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean removeEldestEntry(Entry eldest) {
|
||||||
|
return size() > CACHE_LIMIT; // Evict the oldest entry if over the cache limit.
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private static VerifiedQualities getVerifiedQualities(@NonNull String videoId, boolean returnNullIfDoesNotExist) {
|
private static VerifiedQualities getVerifiedQualities(@NonNull String videoId, boolean returnNullIfDoesNotExist) {
|
||||||
synchronized (altVideoIdLookup) {
|
synchronized (altVideoIdLookup) {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import androidx.annotation.Nullable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@@ -51,7 +50,7 @@ public class ChangeHeaderPatch {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int identifier = Utils.getResourceIdentifier(ResourceType.ATTR, attributeName);
|
final int identifier = Utils.getResourceIdentifier(attributeName, "attr");
|
||||||
if (identifier == 0) {
|
if (identifier == 0) {
|
||||||
// Should never happen.
|
// Should never happen.
|
||||||
Logger.printException(() -> "Could not find attribute: " + drawableName);
|
Logger.printException(() -> "Could not find attribute: " + drawableName);
|
||||||
@@ -72,7 +71,7 @@ public class ChangeHeaderPatch {
|
|||||||
? "_dark"
|
? "_dark"
|
||||||
: "_light");
|
: "_light");
|
||||||
|
|
||||||
final int identifier = Utils.getResourceIdentifier(ResourceType.DRAWABLE, drawableFullName);
|
final int identifier = Utils.getResourceIdentifier(drawableFullName, "drawable");
|
||||||
if (identifier != 0) {
|
if (identifier != 0) {
|
||||||
return Utils.getContext().getDrawable(identifier);
|
return Utils.getContext().getDrawable(identifier);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public final class DownloadsPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static void setMainActivity(Activity mainActivity) {
|
public static void activityCreated(Activity mainActivity) {
|
||||||
activityRef = new WeakReference<>(mainActivity);
|
activityRef = new WeakReference<>(mainActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package app.revanced.extension.youtube.patches;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class FixContentProviderPatch {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static void removeNullMapEntries(Map<?, ?> map) {
|
|
||||||
map.entrySet().removeIf(entry -> {
|
|
||||||
Object value = entry.getValue();
|
|
||||||
if (value == null) {
|
|
||||||
Logger.printDebug(() -> "Removing content provider key with null value: " + entry.getKey());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@@ -30,15 +29,6 @@ public final class HidePlayerOverlayButtonsPatch {
|
|||||||
return Settings.HIDE_CAST_BUTTON.get() ? View.GONE : original;
|
return Settings.HIDE_CAST_BUTTON.get() ? View.GONE : original;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static boolean getCastButtonOverrideV2(boolean original) {
|
|
||||||
if (Settings.HIDE_CAST_BUTTON.get()) return false;
|
|
||||||
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
@@ -50,10 +40,10 @@ public final class HidePlayerOverlayButtonsPatch {
|
|||||||
= Settings.HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS.get();
|
= Settings.HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS.get();
|
||||||
|
|
||||||
private static final int PLAYER_CONTROL_PREVIOUS_BUTTON_TOUCH_AREA_ID = getResourceIdentifierOrThrow(
|
private static final int PLAYER_CONTROL_PREVIOUS_BUTTON_TOUCH_AREA_ID = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "player_control_previous_button_touch_area");
|
"player_control_previous_button_touch_area", "id");
|
||||||
|
|
||||||
private static final int PLAYER_CONTROL_NEXT_BUTTON_TOUCH_AREA_ID = getResourceIdentifierOrThrow(
|
private static final int PLAYER_CONTROL_NEXT_BUTTON_TOUCH_AREA_ID = getResourceIdentifierOrThrow(
|
||||||
ResourceType.ID, "player_control_next_button_touch_area");
|
"player_control_next_button_touch_area", "id");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
|
|||||||
@@ -4,17 +4,7 @@ import app.revanced.extension.youtube.settings.Settings;
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class HideSeekbarPatch {
|
public class HideSeekbarPatch {
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static boolean hideSeekbar() {
|
public static boolean hideSeekbar() {
|
||||||
return Settings.HIDE_SEEKBAR.get();
|
return Settings.HIDE_SEEKBAR.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static boolean useFullscreenLargeSeekbar(boolean original) {
|
|
||||||
return Settings.FULLSCREEN_LARGE_SEEKBAR.get();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import androidx.annotation.Nullable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.Setting;
|
import app.revanced.extension.shared.settings.Setting;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
@@ -116,7 +115,7 @@ public final class MiniplayerPatch {
|
|||||||
* Resource is not present in older targets, and this field will be zero.
|
* Resource is not present in older targets, and this field will be zero.
|
||||||
*/
|
*/
|
||||||
private static final int MODERN_OVERLAY_SUBTITLE_TEXT
|
private static final int MODERN_OVERLAY_SUBTITLE_TEXT
|
||||||
= Utils.getResourceIdentifier(ResourceType.ID, "modern_miniplayer_subtitle_text");
|
= Utils.getResourceIdentifier("modern_miniplayer_subtitle_text", "id");
|
||||||
|
|
||||||
private static final MiniplayerType CURRENT_TYPE = Settings.MINIPLAYER_TYPE.get();
|
private static final MiniplayerType CURRENT_TYPE = Settings.MINIPLAYER_TYPE.get();
|
||||||
|
|
||||||
@@ -379,19 +378,6 @@ public final class MiniplayerPatch {
|
|||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static boolean allowBoldIcons(boolean original) {
|
|
||||||
if (CURRENT_TYPE == MINIMAL) {
|
|
||||||
// Minimal player does not have the correct pause/play icon (it's too large).
|
|
||||||
// Use the non bold icons instead.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ import static app.revanced.extension.youtube.shared.NavigationBar.NavigationButt
|
|||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@@ -29,13 +30,13 @@ public final class NavigationButtonsPatch {
|
|||||||
private static final boolean SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON
|
private static final boolean SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON
|
||||||
= Settings.SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON.get();
|
= Settings.SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON.get();
|
||||||
|
|
||||||
private static final boolean DISABLE_TRANSLUCENT_STATUS_BAR
|
private static final Boolean DISABLE_TRANSLUCENT_STATUS_BAR
|
||||||
= Settings.DISABLE_TRANSLUCENT_STATUS_BAR.get();
|
= Settings.DISABLE_TRANSLUCENT_STATUS_BAR.get();
|
||||||
|
|
||||||
private static final boolean DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT
|
private static final Boolean DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT
|
||||||
= Settings.DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT.get();
|
= Settings.DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT.get();
|
||||||
|
|
||||||
private static final boolean DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK
|
private static final Boolean DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK
|
||||||
= Settings.DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK.get();
|
= Settings.DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK.get();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,13 +62,6 @@ public final class NavigationButtonsPatch {
|
|||||||
hideViewUnderCondition(Settings.HIDE_NAVIGATION_BUTTON_LABELS, navigationLabelsView);
|
hideViewUnderCondition(Settings.HIDE_NAVIGATION_BUTTON_LABELS, navigationLabelsView);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static boolean useAnimatedNavigationButtons(boolean original) {
|
|
||||||
return Settings.NAVIGATION_BAR_ANIMATIONS.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,6 +20,15 @@ public class OpenShortsInRegularPlayerPatch {
|
|||||||
REGULAR_PLAYER_FULLSCREEN
|
REGULAR_PLAYER_FULLSCREEN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
if (!VersionCheckPatch.IS_19_46_OR_GREATER
|
||||||
|
&& Settings.SHORTS_PLAYER_TYPE.get() == ShortsPlayerType.REGULAR_PLAYER_FULLSCREEN) {
|
||||||
|
// User imported newer settings to an older app target.
|
||||||
|
Logger.printInfo(() -> "Resetting " + Settings.SHORTS_PLAYER_TYPE);
|
||||||
|
Settings.SHORTS_PLAYER_TYPE.resetToDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static WeakReference<Activity> mainActivityRef = new WeakReference<>(null);
|
private static WeakReference<Activity> mainActivityRef = new WeakReference<>(null);
|
||||||
|
|
||||||
private static volatile boolean overrideBackPressToExit;
|
private static volatile boolean overrideBackPressToExit;
|
||||||
|
|||||||
@@ -24,20 +24,18 @@ public class OpenVideosFullscreenHookPatch {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*
|
|
||||||
* Returns negated value.
|
|
||||||
*/
|
*/
|
||||||
public static boolean doNotOpenVideoFullscreenPortrait(boolean original) {
|
public static boolean openVideoFullscreenPortrait(boolean original) {
|
||||||
Boolean openFullscreen = openNextVideoFullscreen;
|
Boolean openFullscreen = openNextVideoFullscreen;
|
||||||
if (openFullscreen != null) {
|
if (openFullscreen != null) {
|
||||||
openNextVideoFullscreen = null;
|
openNextVideoFullscreen = null;
|
||||||
return !openFullscreen;
|
return openFullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isFullScreenPatchIncluded()) {
|
if (!isFullScreenPatchIncluded()) {
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
return !Settings.OPEN_VIDEOS_FULLSCREEN_PORTRAIT.get();
|
return Settings.OPEN_VIDEOS_FULLSCREEN_PORTRAIT.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package app.revanced.extension.youtube.patches;
|
||||||
|
|
||||||
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class PauseOnAudioInterruptPatch {
|
||||||
|
|
||||||
|
private static final int AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK = -3;
|
||||||
|
private static final int AUDIOFOCUS_LOSS_TRANSIENT = -2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point for AudioFocusRequest builder.
|
||||||
|
* Returns true if audio ducking should be disabled (willPauseWhenDucked = true).
|
||||||
|
*/
|
||||||
|
public static boolean shouldPauseOnAudioInterrupt() {
|
||||||
|
return Settings.PAUSE_ON_AUDIO_INTERRUPT.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point for onAudioFocusChange callback.
|
||||||
|
* Converts AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK to AUDIOFOCUS_LOSS_TRANSIENT
|
||||||
|
* when the setting is enabled, causing YouTube to pause instead of ducking.
|
||||||
|
*/
|
||||||
|
public static int overrideAudioFocusChange(int focusChange) {
|
||||||
|
if (Settings.PAUSE_ON_AUDIO_INTERRUPT.get() && focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
|
||||||
|
return AUDIOFOCUS_LOSS_TRANSIENT;
|
||||||
|
}
|
||||||
|
return focusChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ public class PlayerControlsPatch {
|
|||||||
|
|
||||||
Logger.printDebug(() -> "fullscreen button visibility: "
|
Logger.printDebug(() -> "fullscreen button visibility: "
|
||||||
+ (visibility == View.VISIBLE ? "VISIBLE" :
|
+ (visibility == View.VISIBLE ? "VISIBLE" :
|
||||||
visibility == View.GONE ? "GONE" : "INVISIBLE"));
|
visibility == View.GONE ? "GONE" : "INVISIBLE"));
|
||||||
|
|
||||||
fullscreenButtonVisibilityChanged(visibility == View.VISIBLE);
|
fullscreenButtonVisibilityChanged(visibility == View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,19 @@
|
|||||||
package app.revanced.extension.youtube.patches;
|
package app.revanced.extension.youtube.patches;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
/** @noinspection unused*/
|
||||||
public class RemoveViewerDiscretionDialogPatch {
|
public class RemoveViewerDiscretionDialogPatch {
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static void confirmDialog(AlertDialog dialog) {
|
public static void confirmDialog(AlertDialog dialog) {
|
||||||
if (Settings.REMOVE_VIEWER_DISCRETION_DIALOG.get()) {
|
if (!Settings.REMOVE_VIEWER_DISCRETION_DIALOG.get()) {
|
||||||
Logger.printDebug(() -> "Clicking alert dialog dismiss button");
|
// Since the patch replaces the AlertDialog#show() method, we need to call the original method here.
|
||||||
|
dialog.show();
|
||||||
final var button = dialog.getButton(AlertDialog.BUTTON_POSITIVE);
|
|
||||||
button.setSoundEffectsEnabled(false);
|
|
||||||
button.performClick();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since the patch replaces the AlertDialog#show() method, we need to call the original method here.
|
final var button = dialog.getButton(AlertDialog.BUTTON_POSITIVE);
|
||||||
Logger.printDebug(() -> "Showing alert dialog");
|
button.setSoundEffectsEnabled(false);
|
||||||
dialog.show();
|
button.performClick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
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.shared.settings.BaseSettings;
|
|
||||||
import app.revanced.extension.youtube.patches.components.ReturnYouTubeDislikeFilter;
|
import app.revanced.extension.youtube.patches.components.ReturnYouTubeDislikeFilter;
|
||||||
import app.revanced.extension.youtube.returnyoutubedislike.ReturnYouTubeDislike;
|
import app.revanced.extension.youtube.returnyoutubedislike.ReturnYouTubeDislike;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
@@ -133,10 +131,6 @@ public class ReturnYouTubeDislikePatch {
|
|||||||
|
|
||||||
String conversionContextString = conversionContext.toString();
|
String conversionContextString = conversionContext.toString();
|
||||||
|
|
||||||
if (Settings.RYD_ENABLED.get()) { // FIXME: Remove this.
|
|
||||||
Logger.printDebug(() -> "RYD conversion context: " + conversionContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isRollingNumber && !conversionContextString.contains("video_action_bar.e")) {
|
if (isRollingNumber && !conversionContextString.contains("video_action_bar.e")) {
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package app.revanced.extension.youtube.patches;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -76,7 +78,7 @@ public class ShortsAutoplayPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static Enum<?> changeShortsRepeatBehavior(Enum<?> original) {
|
public static Enum<?> changeShortsRepeatBehavior(@Nullable Enum<?> original) {
|
||||||
try {
|
try {
|
||||||
final boolean autoplay;
|
final boolean autoplay;
|
||||||
|
|
||||||
@@ -93,19 +95,19 @@ public class ShortsAutoplayPatch {
|
|||||||
autoplay = Settings.SHORTS_AUTOPLAY.get();
|
autoplay = Settings.SHORTS_AUTOPLAY.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
Enum<?> overrideBehavior = (autoplay
|
final ShortsLoopBehavior behavior = autoplay
|
||||||
? ShortsLoopBehavior.SINGLE_PLAY
|
? ShortsLoopBehavior.SINGLE_PLAY
|
||||||
: ShortsLoopBehavior.REPEAT).ytEnumValue;
|
: ShortsLoopBehavior.REPEAT;
|
||||||
|
|
||||||
if (overrideBehavior != null) {
|
if (behavior.ytEnumValue != null) {
|
||||||
Logger.printDebug(() -> {
|
Logger.printDebug(() -> {
|
||||||
String name = (original == null ? "unknown (null)" : original.name());
|
String name = (original == null ? "unknown (null)" : original.name());
|
||||||
return overrideBehavior == original
|
return behavior == original
|
||||||
? "Behavior setting is same as original. Using original: " + name
|
? "Behavior setting is same as original. Using original: " + name
|
||||||
: "Changing Shorts repeat behavior from: " + name + " to: " + overrideBehavior.name();
|
: "Changing Shorts repeat behavior from: " + name + " to: " + behavior.name();
|
||||||
});
|
});
|
||||||
|
|
||||||
return overrideBehavior;
|
return behavior.ytEnumValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (original == null) {
|
if (original == null) {
|
||||||
@@ -116,12 +118,13 @@ public class ShortsAutoplayPatch {
|
|||||||
return unknown;
|
return unknown;
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.printException(() -> "changeShortsRepeatState failure", ex);
|
Logger.printException(() -> "changeShortsRepeatBehavior failure", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,12 +19,5 @@ public class VersionCheckPatch {
|
|||||||
public static final boolean IS_19_29_OR_GREATER = isVersionOrGreater("19.29.00");
|
public static final boolean IS_19_29_OR_GREATER = isVersionOrGreater("19.29.00");
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final boolean IS_19_34_OR_GREATER = isVersionOrGreater("19.34.00");
|
public static final boolean IS_19_34_OR_GREATER = isVersionOrGreater("19.34.00");
|
||||||
|
public static final boolean IS_19_46_OR_GREATER = isVersionOrGreater("19.46.00");
|
||||||
public static final boolean IS_20_21_OR_GREATER = isVersionOrGreater("20.21.00");
|
|
||||||
|
|
||||||
public static final boolean IS_20_22_OR_GREATER = isVersionOrGreater("20.22.00");
|
|
||||||
|
|
||||||
public static final boolean IS_20_31_OR_GREATER = isVersionOrGreater("20.31.00");
|
|
||||||
|
|
||||||
public static final boolean IS_20_37_OR_GREATER = isVersionOrGreater("20.37.00");
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.extension.youtube.patches.components;
|
package app.revanced.extension.youtube.patches.components;
|
||||||
|
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@@ -39,6 +38,7 @@ final class ButtonsFilter extends Filter {
|
|||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
likeSubscribeGlow,
|
likeSubscribeGlow,
|
||||||
|
bufferFilterPathGroup,
|
||||||
new StringFilterGroup(
|
new StringFilterGroup(
|
||||||
Settings.HIDE_LIKE_DISLIKE_BUTTON,
|
Settings.HIDE_LIKE_DISLIKE_BUTTON,
|
||||||
"|segmented_like_dislike_button"
|
"|segmented_like_dislike_button"
|
||||||
@@ -57,12 +57,6 @@ final class ButtonsFilter extends Filter {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// FIXME: 20.22+ filtering of the action buttons doesn't work because
|
|
||||||
// the buffer is the same for all buttons.
|
|
||||||
if (!VersionCheckPatch.IS_20_22_OR_GREATER) {
|
|
||||||
addPathCallbacks(bufferFilterPathGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
bufferButtonsGroupList.addAll(
|
bufferButtonsGroupList.addAll(
|
||||||
new ByteArrayFilterGroup(
|
new ByteArrayFilterGroup(
|
||||||
Settings.HIDE_REPORT_BUTTON,
|
Settings.HIDE_REPORT_BUTTON,
|
||||||
@@ -114,13 +108,11 @@ final class ButtonsFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isEveryFilterGroupEnabled() {
|
private boolean isEveryFilterGroupEnabled() {
|
||||||
for (var group : pathCallbacks) {
|
for (var group : pathCallbacks)
|
||||||
if (!group.isEnabled()) return false;
|
if (!group.isEnabled()) return false;
|
||||||
}
|
|
||||||
|
|
||||||
for (var group : bufferButtonsGroupList) {
|
for (var group : bufferButtonsGroupList)
|
||||||
if (!group.isEnabled()) return false;
|
if (!group.isEnabled()) return false;
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.extension.youtube.patches.components;
|
package app.revanced.extension.youtube.patches.components;
|
||||||
|
|
||||||
import static app.revanced.extension.youtube.patches.VersionCheckPatch.IS_20_21_OR_GREATER;
|
|
||||||
import static app.revanced.extension.youtube.shared.NavigationBar.NavigationButton;
|
import static app.revanced.extension.youtube.shared.NavigationBar.NavigationButton;
|
||||||
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
@@ -400,22 +399,20 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
* Injection point.
|
* Injection point.
|
||||||
* Called from a different place then the other filters.
|
* Called from a different place then the other filters.
|
||||||
*/
|
*/
|
||||||
public static boolean filterMixPlaylists(Object conversionContext, @Nullable byte[] buffer) {
|
public static boolean filterMixPlaylists(Object conversionContext, @Nullable final byte[] bytes) {
|
||||||
// Edit: This hook may no longer be needed, and mix playlist filtering
|
|
||||||
// might be possible using the existing litho filters.
|
|
||||||
try {
|
try {
|
||||||
if (!Settings.HIDE_MIX_PLAYLISTS.get()) {
|
if (!Settings.HIDE_MIX_PLAYLISTS.get()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer == null) {
|
if (bytes == null) {
|
||||||
Logger.printDebug(() -> "buffer is null");
|
Logger.printDebug(() -> "bytes is null");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mixPlaylists.check(buffer).isFiltered()
|
if (mixPlaylists.check(bytes).isFiltered()
|
||||||
// Prevent hiding the description of some videos accidentally.
|
// Prevent hiding the description of some videos accidentally.
|
||||||
&& !mixPlaylistsBufferExceptions.check(buffer).isFiltered()
|
&& !mixPlaylistsBufferExceptions.check(bytes).isFiltered()
|
||||||
// Prevent playlist items being hidden, if a mix playlist is present in it.
|
// Prevent playlist items being hidden, if a mix playlist is present in it.
|
||||||
// Check last since it requires creating a context string.
|
// Check last since it requires creating a context string.
|
||||||
//
|
//
|
||||||
@@ -478,23 +475,11 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
: height;
|
: height;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final boolean HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS_ENABLED
|
|
||||||
= Settings.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS.get();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static void hideInRelatedVideos(View chipView) {
|
public static void hideInRelatedVideos(View chipView) {
|
||||||
// Cannot use 0dp hide with later targets, otherwise the suggested videos
|
Utils.hideViewBy0dpUnderCondition(Settings.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS, chipView);
|
||||||
// can be shown in full screen mode.
|
|
||||||
// This behavior may also be present in earlier app targets.
|
|
||||||
if (IS_20_21_OR_GREATER) {
|
|
||||||
// FIXME: The filter bar is still briefly shown when dragging the suggested videos
|
|
||||||
// below the video player.
|
|
||||||
Utils.hideViewUnderCondition(HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS_ENABLED, chipView);
|
|
||||||
} else {
|
|
||||||
Utils.hideViewBy0dpUnderCondition(HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS_ENABLED, chipView);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final boolean HIDE_DOODLES_ENABLED = Settings.HIDE_DOODLES.get();
|
private static final boolean HIDE_DOODLES_ENABLED = Settings.HIDE_DOODLES.get();
|
||||||
@@ -519,9 +504,7 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
&& NavigationBar.isSearchBarActive()
|
&& NavigationBar.isSearchBarActive()
|
||||||
// Search bar can be active but behind the player.
|
// Search bar can be active but behind the player.
|
||||||
&& !PlayerType.getCurrent().isMaximizedOrFullscreen()) {
|
&& !PlayerType.getCurrent().isMaximizedOrFullscreen()) {
|
||||||
// FIXME: "Show more" button is visible hidden,
|
Utils.hideViewByLayoutParams(view);
|
||||||
// but an empty space remains that can be clicked.
|
|
||||||
Utils.hideViewBy0dp(view);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,11 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
import app.revanced.extension.shared.StringTrieSearch;
|
import app.revanced.extension.shared.StringTrieSearch;
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@@ -78,15 +73,6 @@ public final class LithoFilterPatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Placeholder for actual filters.
|
|
||||||
*/
|
|
||||||
private static final class DummyFilter extends Filter { }
|
|
||||||
|
|
||||||
private static final Filter[] filters = new Filter[] {
|
|
||||||
new DummyFilter() // Replaced during patching, do not touch.
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Litho layout fixed thread pool size override.
|
* Litho layout fixed thread pool size override.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -104,50 +90,25 @@ public final class LithoFilterPatch {
|
|||||||
private static final int LITHO_LAYOUT_THREAD_POOL_SIZE = 1;
|
private static final int LITHO_LAYOUT_THREAD_POOL_SIZE = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 20.22+ cannot use the thread buffer, because frequently the buffer is not correct,
|
* Placeholder for actual filters.
|
||||||
* especially for components that are recreated such as dragging off screen then back on screen.
|
|
||||||
* Instead, parse the identifier found near the start of the buffer and use that to
|
|
||||||
* identify the correct buffer to use when filtering.
|
|
||||||
*/
|
*/
|
||||||
private static final boolean EXTRACT_IDENTIFIER_FROM_BUFFER = VersionCheckPatch.IS_20_22_OR_GREATER;
|
private static final class DummyFilter extends Filter { }
|
||||||
|
|
||||||
/**
|
private static final Filter[] filters = new Filter[] {
|
||||||
* Turns on additional logging, used for development purposes only.
|
new DummyFilter() // Replaced patching, do not touch.
|
||||||
*/
|
};
|
||||||
public static final boolean DEBUG_EXTRACT_IDENTIFIER_FROM_BUFFER = false;
|
|
||||||
|
|
||||||
/**
|
private static final StringTrieSearch pathSearchTree = new StringTrieSearch();
|
||||||
* String suffix for components.
|
private static final StringTrieSearch identifierSearchTree = new StringTrieSearch();
|
||||||
* Can be any of: ".eml", ".e-b", ".eml-js", "e-js-b"
|
|
||||||
*/
|
|
||||||
private static final String LITHO_COMPONENT_EXTENSION = ".e";
|
|
||||||
private static final byte[] LITHO_COMPONENT_EXTENSION_BYTES = LITHO_COMPONENT_EXTENSION.getBytes(StandardCharsets.US_ASCII);
|
|
||||||
|
|
||||||
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
|
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Because litho filtering is multi-threaded and the buffer is passed in from a different injection point,
|
* Because litho filtering is multi-threaded and the buffer is passed in from a different injection point,
|
||||||
* the buffer is saved to a ThreadLocal so each calling thread does not interfere with other threads.
|
* the buffer is saved to a ThreadLocal so each calling thread does not interfere with other threads.
|
||||||
* Used for 20.21 and lower.
|
|
||||||
*/
|
*/
|
||||||
private static final ThreadLocal<byte[]> bufferThreadLocal = new ThreadLocal<>();
|
private static final ThreadLocal<byte[]> bufferThreadLocal = new ThreadLocal<>();
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier to protocol buffer mapping. Only used for 20.22+.
|
|
||||||
* Thread local is needed because filtering is multi-threaded and each thread can load
|
|
||||||
* a different component with the same identifier.
|
|
||||||
*/
|
|
||||||
private static final ThreadLocal<Map<String, byte[]>> identifierToBufferThread = new ThreadLocal<>();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Global shared buffer. Used only if the buffer is not found in the ThreadLocal.
|
|
||||||
*/
|
|
||||||
private static final Map<String, byte[]> identifierToBufferGlobal
|
|
||||||
= Collections.synchronizedMap(createIdentifierToBufferMap());
|
|
||||||
|
|
||||||
private static final StringTrieSearch pathSearchTree = new StringTrieSearch();
|
|
||||||
private static final StringTrieSearch identifierSearchTree = new StringTrieSearch();
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
for (Filter filter : filters) {
|
for (Filter filter : filters) {
|
||||||
filterUsingCallbacks(identifierSearchTree, filter,
|
filterUsingCallbacks(identifierSearchTree, filter,
|
||||||
@@ -199,107 +160,16 @@ public final class LithoFilterPatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<String, byte[]> createIdentifierToBufferMap() {
|
|
||||||
// It's unclear how many items should be cached. This is a guess.
|
|
||||||
return Utils.createSizeRestrictedMap(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function that differs from {@link Character#isDigit(char)}
|
|
||||||
* as this only matches ascii and not unicode numbers.
|
|
||||||
*/
|
|
||||||
private static boolean isAsciiNumber(byte character) {
|
|
||||||
return '0' <= character && character <= '9';
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isAsciiLowerCaseLetter(byte character) {
|
|
||||||
return 'a' <= character && character <= 'z';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point. Called off the main thread.
|
* Injection point. Called off the main thread.
|
||||||
* Targets 20.22+
|
* Targets 20.22+
|
||||||
*/
|
*/
|
||||||
public static void setProtoBuffer(byte[] buffer) {
|
public static void setProtoBuffer(byte[] buffer) {
|
||||||
if (DEBUG_EXTRACT_IDENTIFIER_FROM_BUFFER) {
|
// Set the buffer to a thread local. The buffer will remain in memory, even after the call to #filter completes.
|
||||||
StringBuilder builder = new StringBuilder();
|
// This is intentional, as it appears the buffer can be set once and then filtered multiple times.
|
||||||
LithoFilterParameters.findAsciiStrings(builder, buffer);
|
// The buffer will be cleared from memory after a new buffer is set by the same thread,
|
||||||
Logger.printDebug(() -> "New buffer: " + builder);
|
// or when the calling thread eventually dies.
|
||||||
}
|
bufferThreadLocal.set(buffer);
|
||||||
|
|
||||||
// Could use Boyer-Moore-Horspool since the string is ASCII and has a limited number of
|
|
||||||
// unique characters, but it seems to be slower since the extra overhead of checking the
|
|
||||||
// bad character array negates any performance gain of skipping a few extra subsearches.
|
|
||||||
int emlIndex = -1;
|
|
||||||
final int emlStringLength = LITHO_COMPONENT_EXTENSION_BYTES.length;
|
|
||||||
for (int i = 0, lastStartIndex = buffer.length - emlStringLength; i <= lastStartIndex; i++) {
|
|
||||||
boolean match = true;
|
|
||||||
for (int j = 0; j < emlStringLength; j++) {
|
|
||||||
if (buffer[i + j] != LITHO_COMPONENT_EXTENSION_BYTES[j]) {
|
|
||||||
match = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (match) {
|
|
||||||
emlIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (emlIndex < 0) {
|
|
||||||
// Buffer is not used for creating a new litho component.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int startIndex = emlIndex - 1;
|
|
||||||
while (startIndex > 0) {
|
|
||||||
final byte character = buffer[startIndex];
|
|
||||||
int startIndexFinal = startIndex;
|
|
||||||
if (isAsciiLowerCaseLetter(character) || isAsciiNumber(character) || character == '_') {
|
|
||||||
// Valid character for the first path element.
|
|
||||||
startIndex--;
|
|
||||||
} else {
|
|
||||||
startIndex++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Strip away any numbers on the start of the identifier, which can
|
|
||||||
// be from random data in the buffer before the identifier starts.
|
|
||||||
while (true) {
|
|
||||||
final byte character = buffer[startIndex];
|
|
||||||
if (isAsciiNumber(character)) {
|
|
||||||
startIndex++;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the pipe character after the identifier.
|
|
||||||
int endIndex = -1;
|
|
||||||
for (int i = emlIndex, length = buffer.length; i < length; i++) {
|
|
||||||
if (buffer[i] == '|') {
|
|
||||||
endIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (endIndex < 0) {
|
|
||||||
Logger.printException(() -> "Could not find buffer identifier");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String identifier = new String(buffer, startIndex, endIndex - startIndex, StandardCharsets.US_ASCII);
|
|
||||||
if (DEBUG_EXTRACT_IDENTIFIER_FROM_BUFFER) {
|
|
||||||
Logger.printDebug(() -> "Found buffer for identifier: " + identifier);
|
|
||||||
}
|
|
||||||
identifierToBufferGlobal.put(identifier, buffer);
|
|
||||||
|
|
||||||
Map<String, byte[]> map = identifierToBufferThread.get();
|
|
||||||
if (map == null) {
|
|
||||||
map = createIdentifierToBufferMap();
|
|
||||||
identifierToBufferThread.set(map);
|
|
||||||
}
|
|
||||||
map.put(identifier, buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -307,70 +177,46 @@ public final class LithoFilterPatch {
|
|||||||
* Targets 20.21 and lower.
|
* Targets 20.21 and lower.
|
||||||
*/
|
*/
|
||||||
public static void setProtoBuffer(@Nullable ByteBuffer buffer) {
|
public static void setProtoBuffer(@Nullable ByteBuffer buffer) {
|
||||||
|
// Set the buffer to a thread local. The buffer will remain in memory, even after the call to #filter completes.
|
||||||
|
// This is intentional, as it appears the buffer can be set once and then filtered multiple times.
|
||||||
|
// The buffer will be cleared from memory after a new buffer is set by the same thread,
|
||||||
|
// or when the calling thread eventually dies.
|
||||||
if (buffer == null || !buffer.hasArray()) {
|
if (buffer == null || !buffer.hasArray()) {
|
||||||
// It appears the buffer can be cleared out just before the call to #filter()
|
// It appears the buffer can be cleared out just before the call to #filter()
|
||||||
// Ignore this null value and retain the last buffer that was set.
|
// Ignore this null value and retain the last buffer that was set.
|
||||||
Logger.printDebug(() -> "Ignoring null or empty buffer: " + buffer);
|
Logger.printDebug(() -> "Ignoring null or empty buffer: " + buffer);
|
||||||
} else {
|
} else {
|
||||||
// Set the buffer to a thread local. The buffer will remain in memory, even after the call to #filter completes.
|
setProtoBuffer(buffer.array());
|
||||||
// This is intentional, as it appears the buffer can be set once and then filtered multiple times.
|
|
||||||
// The buffer will be cleared from memory after a new buffer is set by the same thread,
|
|
||||||
// or when the calling thread eventually dies.
|
|
||||||
bufferThreadLocal.set(buffer.array());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static boolean isFiltered(String identifier, StringBuilder pathBuilder) {
|
public static boolean isFiltered(String lithoIdentifier, StringBuilder pathBuilder) {
|
||||||
try {
|
try {
|
||||||
if (identifier.isEmpty() || pathBuilder.length() == 0) {
|
if (lithoIdentifier.isEmpty() && pathBuilder.length() == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] buffer = null;
|
byte[] buffer = bufferThreadLocal.get();
|
||||||
if (EXTRACT_IDENTIFIER_FROM_BUFFER) {
|
|
||||||
final int pipeIndex = identifier.indexOf('|');
|
|
||||||
if (pipeIndex >= 0) {
|
|
||||||
// If the identifier contains no pipe, then it's not an ".eml" identifier
|
|
||||||
// and the buffer is not uniquely identified. Typically this only happens
|
|
||||||
// for subcomponents where buffer filtering is not used.
|
|
||||||
String identifierKey = identifier.substring(0, pipeIndex);
|
|
||||||
|
|
||||||
var map = identifierToBufferThread.get();
|
|
||||||
if (map != null) {
|
|
||||||
buffer = map.get(identifierKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buffer == null) {
|
|
||||||
// Buffer for thread local not found. Use the last buffer found from any thread.
|
|
||||||
buffer = identifierToBufferGlobal.get(identifierKey);
|
|
||||||
|
|
||||||
if (DEBUG_EXTRACT_IDENTIFIER_FROM_BUFFER && buffer == null) {
|
|
||||||
// No buffer is found for some components, such as
|
|
||||||
// shorts_lockup_cell.eml on channel profiles.
|
|
||||||
// For now, just ignore this and filter without a buffer.
|
|
||||||
Logger.printException(() -> "Could not find global buffer for identifier: " + identifier);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
buffer = bufferThreadLocal.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Potentially the buffer may have been null or never set up until now.
|
// Potentially the buffer may have been null or never set up until now.
|
||||||
// Use an empty buffer so the litho id/path filters that do not use a buffer still work.
|
// Use an empty buffer so the litho id/path filters still work correctly.
|
||||||
if (buffer == null) {
|
if (buffer == null) {
|
||||||
buffer = EMPTY_BYTE_ARRAY;
|
buffer = EMPTY_BYTE_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
String path = pathBuilder.toString();
|
LithoFilterParameters parameter = new LithoFilterParameters(
|
||||||
LithoFilterParameters parameter = new LithoFilterParameters(identifier, path, buffer);
|
lithoIdentifier, pathBuilder.toString(), buffer);
|
||||||
Logger.printDebug(() -> "Searching " + parameter);
|
Logger.printDebug(() -> "Searching " + parameter);
|
||||||
|
|
||||||
return identifierSearchTree.matches(identifier, parameter)
|
if (identifierSearchTree.matches(parameter.identifier, parameter)) {
|
||||||
|| pathSearchTree.matches(path, parameter);
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pathSearchTree.matches(parameter.path, parameter)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.printException(() -> "isFiltered failure", ex);
|
Logger.printException(() -> "isFiltered failure", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import androidx.annotation.GuardedBy;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
|
||||||
import app.revanced.extension.shared.TrieSearch;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.youtube.patches.ReturnYouTubeDislikePatch;
|
import app.revanced.extension.youtube.patches.ReturnYouTubeDislikePatch;
|
||||||
import app.revanced.extension.youtube.patches.VideoInformation;
|
import app.revanced.extension.youtube.patches.VideoInformation;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
import app.revanced.extension.shared.Logger;
|
||||||
|
import app.revanced.extension.shared.TrieSearch;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches for video id's in the proto buffer of Shorts dislike.
|
* Searches for video id's in the proto buffer of Shorts dislike.
|
||||||
@@ -33,7 +33,18 @@ public final class ReturnYouTubeDislikeFilter extends Filter {
|
|||||||
* Cannot use {@link LinkedHashSet} because it's missing #removeEldestEntry().
|
* Cannot use {@link LinkedHashSet} because it's missing #removeEldestEntry().
|
||||||
*/
|
*/
|
||||||
@GuardedBy("itself")
|
@GuardedBy("itself")
|
||||||
private static final Map<String, Boolean> lastVideoIds = Utils.createSizeRestrictedMap(5);
|
private static final Map<String, Boolean> lastVideoIds = new LinkedHashMap<>() {
|
||||||
|
/**
|
||||||
|
* Number of video id's to keep track of for searching thru the buffer.
|
||||||
|
* A minimum value of 3 should be sufficient, but check a few more just in case.
|
||||||
|
*/
|
||||||
|
private static final int NUMBER_OF_LAST_VIDEO_IDS_TO_TRACK = 5;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean removeEldestEntry(Entry eldest) {
|
||||||
|
return size() > NUMBER_OF_LAST_VIDEO_IDS_TO_TRACK;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
import app.revanced.extension.youtube.shared.NavigationBar;
|
import app.revanced.extension.youtube.shared.NavigationBar;
|
||||||
import app.revanced.extension.youtube.shared.PlayerType;
|
import app.revanced.extension.youtube.shared.PlayerType;
|
||||||
@@ -224,11 +223,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
|
|
||||||
videoActionButton = new StringFilterGroup(
|
videoActionButton = new StringFilterGroup(
|
||||||
null,
|
null,
|
||||||
// Can be any of:
|
// Can be simply 'button.e', 'shorts_video_action_button.e' or 'reel_action_button.e'
|
||||||
// button.eml
|
|
||||||
// shorts_video_action_button.eml
|
|
||||||
// reel_action_button.eml
|
|
||||||
// reel_pivot_button.eml
|
|
||||||
"button.e"
|
"button.e"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -239,37 +234,31 @@ public final class ShortsFilter extends Filter {
|
|||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
shortsCompactFeedVideo, joinButton, subscribeButton, paidPromotionLabel, autoDubbedLabel,
|
shortsCompactFeedVideo, joinButton, subscribeButton, paidPromotionLabel, autoDubbedLabel,
|
||||||
suggestedAction, pausedOverlayButtons, channelBar, previewComment,
|
shortsActionBar, suggestedAction, pausedOverlayButtons, channelBar, previewComment,
|
||||||
fullVideoLinkLabel, videoTitle, useSoundButton, reelSoundMetadata, soundButton, infoPanel,
|
fullVideoLinkLabel, videoTitle, useSoundButton, reelSoundMetadata, soundButton, infoPanel,
|
||||||
stickers, likeFountain, likeButton, dislikeButton, livePreview
|
stickers, likeFountain, likeButton, dislikeButton, livePreview
|
||||||
);
|
);
|
||||||
|
|
||||||
// FIXME: The Shorts buffer is very different with 20.22+ and if any of these filters
|
//
|
||||||
// are enabled then all Shorts player vertical buttons are hidden.
|
// All other action buttons.
|
||||||
if (!VersionCheckPatch.IS_20_22_OR_GREATER) {
|
//
|
||||||
addPathCallbacks(shortsActionBar);
|
videoActionButtonBuffer.addAll(
|
||||||
|
new ByteArrayFilterGroup(
|
||||||
//
|
Settings.HIDE_SHORTS_COMMENTS_BUTTON,
|
||||||
// All other action buttons.
|
"reel_comment_button",
|
||||||
//
|
"youtube_shorts_comment_outline"
|
||||||
videoActionButtonBuffer.addAll(
|
),
|
||||||
new ByteArrayFilterGroup(
|
new ByteArrayFilterGroup(
|
||||||
Settings.HIDE_SHORTS_COMMENTS_BUTTON,
|
Settings.HIDE_SHORTS_SHARE_BUTTON,
|
||||||
"reel_comment_button",
|
"reel_share_button",
|
||||||
"youtube_shorts_comment_outline"
|
"youtube_shorts_share_outline"
|
||||||
),
|
),
|
||||||
new ByteArrayFilterGroup(
|
new ByteArrayFilterGroup(
|
||||||
Settings.HIDE_SHORTS_SHARE_BUTTON,
|
Settings.HIDE_SHORTS_REMIX_BUTTON,
|
||||||
"reel_share_button",
|
"reel_remix_button",
|
||||||
"youtube_shorts_share_outline"
|
"youtube_shorts_remix_outline"
|
||||||
),
|
)
|
||||||
new ByteArrayFilterGroup(
|
);
|
||||||
Settings.HIDE_SHORTS_REMIX_BUTTON,
|
|
||||||
"reel_remix_button",
|
|
||||||
"youtube_shorts_remix_outline"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Suggested actions.
|
// Suggested actions.
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class RememberVideoQualityPatch {
|
|||||||
private static final IntegerSetting shortsQualityWifi = Settings.SHORTS_QUALITY_DEFAULT_WIFI;
|
private static final IntegerSetting shortsQualityWifi = Settings.SHORTS_QUALITY_DEFAULT_WIFI;
|
||||||
private static final IntegerSetting shortsQualityMobile = Settings.SHORTS_QUALITY_DEFAULT_MOBILE;
|
private static final IntegerSetting shortsQualityMobile = Settings.SHORTS_QUALITY_DEFAULT_MOBILE;
|
||||||
|
|
||||||
|
|
||||||
public static boolean shouldRememberVideoQuality() {
|
public static boolean shouldRememberVideoQuality() {
|
||||||
BooleanSetting preference = ShortsPlayerState.isOpen()
|
BooleanSetting preference = ShortsPlayerState.isOpen()
|
||||||
? Settings.REMEMBER_SHORTS_QUALITY_LAST_SELECTED
|
? Settings.REMEMBER_SHORTS_QUALITY_LAST_SELECTED
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
package app.revanced.extension.youtube.patches.theme;
|
|
||||||
|
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.graphics.ColorFilter;
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dynamic drawable that is either the regular or bolded ReVanced preference icon.
|
|
||||||
*
|
|
||||||
* This is needed because the YouTube ReVanced preference intent is an AndroidX preference,
|
|
||||||
* and AndroidX classes are not built into Android which makes programmatically changing
|
|
||||||
* the preference thru patching overly complex. This solves the problem by using a drawable
|
|
||||||
* wrapper to dynamically pick which icon drawable to use at runtime.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class ReVancedSettingsIconDynamicDrawable extends Drawable {
|
|
||||||
|
|
||||||
private final Drawable icon;
|
|
||||||
|
|
||||||
public ReVancedSettingsIconDynamicDrawable() {
|
|
||||||
final int resId = Utils.getResourceIdentifier(ResourceType.DRAWABLE,
|
|
||||||
Utils.appIsUsingBoldIcons()
|
|
||||||
? "revanced_settings_icon_bold"
|
|
||||||
: "revanced_settings_icon"
|
|
||||||
);
|
|
||||||
|
|
||||||
icon = Utils.getContext().getDrawable(resId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(@NonNull Canvas canvas) {
|
|
||||||
icon.draw(canvas);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAlpha(int alpha) {
|
|
||||||
icon.setAlpha(alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setColorFilter(@Nullable ColorFilter colorFilter) {
|
|
||||||
icon.setColorFilter(colorFilter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getOpacity() {
|
|
||||||
return icon.getOpacity();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getIntrinsicWidth() {
|
|
||||||
return icon.getIntrinsicWidth();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getIntrinsicHeight() {
|
|
||||||
return icon.getIntrinsicHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBounds(int left, int top, int right, int bottom) {
|
|
||||||
super.setBounds(left, top, right, bottom);
|
|
||||||
icon.setBounds(left, top, right, bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBounds(@NonNull Rect bounds) {
|
|
||||||
super.setBounds(bounds);
|
|
||||||
icon.setBounds(bounds);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBoundsChange(@NonNull Rect bounds) {
|
|
||||||
super.onBoundsChange(bounds);
|
|
||||||
icon.setBounds(bounds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -16,7 +16,6 @@ import java.util.Arrays;
|
|||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
@@ -102,6 +101,16 @@ public final class SeekbarColorPatch {
|
|||||||
return customSeekbarColor;
|
return customSeekbarColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* injection point.
|
||||||
|
*/
|
||||||
|
public static boolean useLotteLaunchSplashScreen(boolean original) {
|
||||||
|
// This method is only used for development purposes to force the old style launch screen.
|
||||||
|
// Forcing this off on some devices can cause unexplained startup crashes,
|
||||||
|
// where the lottie animation is still used even though this condition appears to bypass it.
|
||||||
|
return original; // false = drawable style, true = lottie style.
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
* Modern Lottie style animation.
|
* Modern Lottie style animation.
|
||||||
|
|||||||
@@ -260,8 +260,7 @@ public class ReturnYouTubeDislike {
|
|||||||
// middle separator
|
// middle separator
|
||||||
String middleSeparatorString = compactLayout
|
String middleSeparatorString = compactLayout
|
||||||
? " " + MIDDLE_SEPARATOR_CHARACTER + " "
|
? " " + MIDDLE_SEPARATOR_CHARACTER + " "
|
||||||
: " \u2009\u2009" + MIDDLE_SEPARATOR_CHARACTER + "\u2009\u2009 "; // u2009 = 'narrow space'
|
: " \u2009" + MIDDLE_SEPARATOR_CHARACTER + "\u2009 "; // u2009 = 'narrow space' character
|
||||||
|
|
||||||
final int shapeInsertionIndex = middleSeparatorString.length() / 2;
|
final int shapeInsertionIndex = middleSeparatorString.length() / 2;
|
||||||
Spannable middleSeparatorSpan = new SpannableString(middleSeparatorString);
|
Spannable middleSeparatorSpan = new SpannableString(middleSeparatorString);
|
||||||
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
|
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
|
||||||
@@ -556,8 +555,7 @@ public class ReturnYouTubeDislike {
|
|||||||
|
|
||||||
if (originalDislikeSpan != null && replacementLikeDislikeSpan != null
|
if (originalDislikeSpan != null && replacementLikeDislikeSpan != null
|
||||||
&& spansHaveEqualTextAndColor(original, originalDislikeSpan)) {
|
&& spansHaveEqualTextAndColor(original, originalDislikeSpan)) {
|
||||||
Logger.printDebug(() -> "Replacing span: " + original + " with " +
|
Logger.printDebug(() -> "Replacing span with previously created dislike span of data: " + videoId);
|
||||||
"previously created dislike span of data: " + videoId);
|
|
||||||
return replacementLikeDislikeSpan;
|
return replacementLikeDislikeSpan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.DeArrow
|
|||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.StillImagesAvailability;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.StillImagesAvailability;
|
||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailOption;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailOption;
|
||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailStillTime;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailStillTime;
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
import app.revanced.extension.youtube.patches.MiniplayerPatch;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
||||||
import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider.SwipeOverlayStyle;
|
import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider.SwipeOverlayStyle;
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, new MiniplayerAnyModernAvailability());
|
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, new MiniplayerAnyModernAvailability());
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_OVERLAY_BUTTONS = new BooleanSetting("revanced_miniplayer_hide_overlay_buttons", FALSE, true, new MiniplayerHideOverlayButtonsAvailability());
|
public static final BooleanSetting MINIPLAYER_HIDE_OVERLAY_BUTTONS = new BooleanSetting("revanced_miniplayer_hide_overlay_buttons", FALSE, true, new MiniplayerHideOverlayButtonsAvailability());
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, new MiniplayerHideSubtextsAvailability());
|
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, new MiniplayerHideSubtextsAvailability());
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_REWIND_FORWARD = new BooleanSetting("revanced_miniplayer_hide_rewind_forward", TRUE, true, new MiniplayerHideRewindOrOverlayOpacityAvailability());
|
public static final BooleanSetting MINIPLAYER_HIDE_REWIND_FORWARD = new BooleanSetting("revanced_miniplayer_hide_rewind_forward", TRUE, true, new MiniplayerPatch.MiniplayerHideRewindOrOverlayOpacityAvailability());
|
||||||
public static final IntegerSetting MINIPLAYER_WIDTH_DIP = new IntegerSetting("revanced_miniplayer_width_dip", 192, true, new MiniplayerAnyModernAvailability());
|
public static final IntegerSetting MINIPLAYER_WIDTH_DIP = new IntegerSetting("revanced_miniplayer_width_dip", 192, true, new MiniplayerAnyModernAvailability());
|
||||||
public static final IntegerSetting MINIPLAYER_OPACITY = new IntegerSetting("revanced_miniplayer_opacity", 100, true, new MiniplayerHideRewindOrOverlayOpacityAvailability());
|
public static final IntegerSetting MINIPLAYER_OPACITY = new IntegerSetting("revanced_miniplayer_opacity", 100, true, new MiniplayerHideRewindOrOverlayOpacityAvailability());
|
||||||
|
|
||||||
@@ -288,7 +288,6 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_hide_notifications_button", FALSE, true);
|
public static final BooleanSetting HIDE_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_hide_notifications_button", FALSE, true);
|
||||||
public static final BooleanSetting SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_switch_create_with_notifications_button", TRUE, true,
|
public static final BooleanSetting SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_switch_create_with_notifications_button", TRUE, true,
|
||||||
"revanced_switch_create_with_notifications_button_user_dialog_message");
|
"revanced_switch_create_with_notifications_button_user_dialog_message");
|
||||||
public static final BooleanSetting NAVIGATION_BAR_ANIMATIONS = new BooleanSetting("revanced_navigation_bar_animations", FALSE);
|
|
||||||
public static final BooleanSetting DISABLE_TRANSLUCENT_STATUS_BAR = new BooleanSetting("revanced_disable_translucent_status_bar", FALSE, true,
|
public static final BooleanSetting DISABLE_TRANSLUCENT_STATUS_BAR = new BooleanSetting("revanced_disable_translucent_status_bar", FALSE, true,
|
||||||
"revanced_disable_translucent_status_bar_user_dialog_message");
|
"revanced_disable_translucent_status_bar_user_dialog_message");
|
||||||
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT = new BooleanSetting("revanced_disable_translucent_navigation_bar_light", FALSE, true);
|
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT = new BooleanSetting("revanced_disable_translucent_navigation_bar_light", FALSE, true);
|
||||||
@@ -342,7 +341,6 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting DISABLE_PRECISE_SEEKING_GESTURE = new BooleanSetting("revanced_disable_precise_seeking_gesture", FALSE);
|
public static final BooleanSetting DISABLE_PRECISE_SEEKING_GESTURE = new BooleanSetting("revanced_disable_precise_seeking_gesture", FALSE);
|
||||||
public static final BooleanSetting HIDE_SEEKBAR = new BooleanSetting("revanced_hide_seekbar", FALSE, true);
|
public static final BooleanSetting HIDE_SEEKBAR = new BooleanSetting("revanced_hide_seekbar", FALSE, true);
|
||||||
public static final BooleanSetting HIDE_SEEKBAR_THUMBNAIL = new BooleanSetting("revanced_hide_seekbar_thumbnail", FALSE, true);
|
public static final BooleanSetting HIDE_SEEKBAR_THUMBNAIL = new BooleanSetting("revanced_hide_seekbar_thumbnail", FALSE, true);
|
||||||
public static final BooleanSetting FULLSCREEN_LARGE_SEEKBAR = new BooleanSetting("revanced_fullscreen_large_seekbar", FALSE);
|
|
||||||
public static final BooleanSetting HIDE_TIMESTAMP = new BooleanSetting("revanced_hide_timestamp", FALSE);
|
public static final BooleanSetting HIDE_TIMESTAMP = new BooleanSetting("revanced_hide_timestamp", FALSE);
|
||||||
public static final BooleanSetting RESTORE_OLD_SEEKBAR_THUMBNAILS = new BooleanSetting("revanced_restore_old_seekbar_thumbnails", TRUE);
|
public static final BooleanSetting RESTORE_OLD_SEEKBAR_THUMBNAILS = new BooleanSetting("revanced_restore_old_seekbar_thumbnails", TRUE);
|
||||||
public static final BooleanSetting SEEKBAR_TAPPING = new BooleanSetting("revanced_seekbar_tapping", FALSE);
|
public static final BooleanSetting SEEKBAR_TAPPING = new BooleanSetting("revanced_seekbar_tapping", FALSE);
|
||||||
@@ -358,6 +356,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final IntegerSetting ANNOUNCEMENT_LAST_ID = new IntegerSetting("revanced_announcement_last_id", -1, false, false);
|
public static final IntegerSetting ANNOUNCEMENT_LAST_ID = new IntegerSetting("revanced_announcement_last_id", -1, false, false);
|
||||||
public static final BooleanSetting LOOP_VIDEO = new BooleanSetting("revanced_loop_video", FALSE);
|
public static final BooleanSetting LOOP_VIDEO = new BooleanSetting("revanced_loop_video", FALSE);
|
||||||
public static final BooleanSetting LOOP_VIDEO_BUTTON = new BooleanSetting("revanced_loop_video_button", FALSE);
|
public static final BooleanSetting LOOP_VIDEO_BUTTON = new BooleanSetting("revanced_loop_video_button", FALSE);
|
||||||
|
public static final BooleanSetting PAUSE_ON_AUDIO_INTERRUPT = new BooleanSetting("revanced_pause_on_audio_interrupt", FALSE, true);
|
||||||
public static final BooleanSetting BYPASS_URL_REDIRECTS = new BooleanSetting("revanced_bypass_url_redirects", TRUE);
|
public static final BooleanSetting BYPASS_URL_REDIRECTS = new BooleanSetting("revanced_bypass_url_redirects", TRUE);
|
||||||
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_CHAPTERS = new BooleanSetting("revanced_disable_haptic_feedback_chapters", FALSE);
|
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_CHAPTERS = new BooleanSetting("revanced_disable_haptic_feedback_chapters", FALSE);
|
||||||
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_PRECISE_SEEKING = new BooleanSetting("revanced_disable_haptic_feedback_precise_seeking", FALSE);
|
public static final BooleanSetting DISABLE_HAPTIC_FEEDBACK_PRECISE_SEEKING = new BooleanSetting("revanced_disable_haptic_feedback_precise_seeking", FALSE);
|
||||||
@@ -477,13 +476,6 @@ public class Settings extends BaseSettings {
|
|||||||
static {
|
static {
|
||||||
// region Migration
|
// region Migration
|
||||||
|
|
||||||
// 20.37+ YT removed parts of the code for the legacy tablet miniplayer.
|
|
||||||
// This check must remain until the Tablet type is eventually removed.
|
|
||||||
if (VersionCheckPatch.IS_20_37_OR_GREATER && MINIPLAYER_TYPE.get() == MiniplayerType.TABLET) {
|
|
||||||
Logger.printInfo(() -> "Resetting miniplayer tablet type");
|
|
||||||
MINIPLAYER_TYPE.resetToDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Migrate renamed change header enums.
|
// Migrate renamed change header enums.
|
||||||
if (HEADER_LOGO.get() == HeaderLogo.REVANCED) {
|
if (HEADER_LOGO.get() == HeaderLogo.REVANCED) {
|
||||||
HEADER_LOGO.save(HeaderLogo.ROUNDED);
|
HEADER_LOGO.save(HeaderLogo.ROUNDED);
|
||||||
@@ -526,14 +518,6 @@ public class Settings extends BaseSettings {
|
|||||||
SPOOF_APP_VERSION.resetToDefault();
|
SPOOF_APP_VERSION.resetToDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!BaseSettings.SETTINGS_DISABLE_BOLD_ICONS.get() && SPOOF_APP_VERSION.get()
|
|
||||||
&& SPOOF_APP_VERSION_TARGET.get().compareTo("19.35.00") <= 0) {
|
|
||||||
Logger.printInfo(() -> "Temporarily disabling bold icons that don't work with old spoof targets");
|
|
||||||
// Don't save and only temporarily overwrite the value so
|
|
||||||
// if spoofing is turned off the old setting value is used.
|
|
||||||
BooleanSetting.privateSetValue(BaseSettings.SETTINGS_DISABLE_BOLD_ICONS, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// VR 1.61 is not selectable in the settings, and it's selected by spoof stream patch if needed.
|
// VR 1.61 is not selectable in the settings, and it's selected by spoof stream patch if needed.
|
||||||
if (SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.ANDROID_VR_1_61_48) {
|
if (SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.ANDROID_VR_1_61_48) {
|
||||||
SPOOF_VIDEO_STREAMS_CLIENT_TYPE.resetToDefault();
|
SPOOF_VIDEO_STREAMS_CLIENT_TYPE.resetToDefault();
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import android.preference.PreferenceFragment;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseActivityHook;
|
import app.revanced.extension.shared.settings.BaseActivityHook;
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
||||||
@@ -16,28 +15,11 @@ import app.revanced.extension.youtube.settings.preference.YouTubePreferenceFragm
|
|||||||
import app.revanced.extension.youtube.settings.search.YouTubeSearchViewController;
|
import app.revanced.extension.youtube.settings.search.YouTubeSearchViewController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hooks LicenseActivity to inject a custom {@link YouTubePreferenceFragment}
|
* Hooks LicenseActivity to inject a custom {@link YouTubePreferenceFragment} with a toolbar and search functionality.
|
||||||
* with a toolbar and search functionality.
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class YouTubeActivityHook extends BaseActivityHook {
|
public class YouTubeActivityHook extends BaseActivityHook {
|
||||||
|
|
||||||
/**
|
|
||||||
* How much time has passed since the first launch of the app. Simple check to prevent
|
|
||||||
* forcing bold icons on first launch where the settings menu is partially broken
|
|
||||||
* due to missing icon resources the client has not yet received.
|
|
||||||
*/
|
|
||||||
private static final long MINIMUM_TIME_AFTER_FIRST_LAUNCH_BEFORE_ALLOWING_BOLD_ICONS = 30 * 1000; // 30 seconds.
|
|
||||||
|
|
||||||
private static final boolean USE_BOLD_ICONS = VersionCheckPatch.IS_20_31_OR_GREATER
|
|
||||||
&& !Settings.SETTINGS_DISABLE_BOLD_ICONS.get()
|
|
||||||
&& (System.currentTimeMillis() - Settings.FIRST_TIME_APP_LAUNCHED.get())
|
|
||||||
> MINIMUM_TIME_AFTER_FIRST_LAUNCH_BEFORE_ALLOWING_BOLD_ICONS;
|
|
||||||
|
|
||||||
static {
|
|
||||||
Utils.setAppIsUsingBoldIcons(USE_BOLD_ICONS);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int currentThemeValueOrdinal = -1; // Must initially be a non-valid enum ordinal value.
|
private static int currentThemeValueOrdinal = -1; // Must initially be a non-valid enum ordinal value.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +44,15 @@ public class YouTubeActivityHook extends BaseActivityHook {
|
|||||||
final var theme = Utils.isDarkModeEnabled()
|
final var theme = Utils.isDarkModeEnabled()
|
||||||
? "Theme.YouTube.Settings.Dark"
|
? "Theme.YouTube.Settings.Dark"
|
||||||
: "Theme.YouTube.Settings";
|
: "Theme.YouTube.Settings";
|
||||||
activity.setTheme(Utils.getResourceIdentifierOrThrow(ResourceType.STYLE, theme));
|
activity.setTheme(Utils.getResourceIdentifierOrThrow(theme, "style"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the resource ID for the YouTube settings layout.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected int getContentViewResourceId() {
|
||||||
|
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -165,12 +155,4 @@ public class YouTubeActivityHook extends BaseActivityHook {
|
|||||||
public static boolean handleBackPress() {
|
public static boolean handleBackPress() {
|
||||||
return YouTubeSearchViewController.handleFinish(searchViewController);
|
return YouTubeSearchViewController.handleFinish(searchViewController);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public static boolean useBoldIcons(boolean original) {
|
|
||||||
return USE_BOLD_ICONS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@@ -74,7 +72,7 @@ public final class NavigationBar {
|
|||||||
*/
|
*/
|
||||||
public static boolean isSearchBarActive() {
|
public static boolean isSearchBarActive() {
|
||||||
View searchbarResults = searchBarResultsRef.get();
|
View searchbarResults = searchBarResultsRef.get();
|
||||||
return searchbarResults != null && searchbarResults.isShown();
|
return searchbarResults != null && searchbarResults.getParent() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBackButtonVisible() {
|
public static boolean isBackButtonVisible() {
|
||||||
@@ -279,14 +277,12 @@ public final class NavigationBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom cairo notification filled icon to fix unpatched app missing resource.
|
* Use the bundled non cairo filled icon instead of a custom icon.
|
||||||
|
* Use the old non cairo filled icon, which is almost identical to
|
||||||
|
* the what would be the filled cairo icon.
|
||||||
*/
|
*/
|
||||||
private static final int fillBellCairoBlack = Utils.getResourceIdentifier(ResourceType.DRAWABLE,
|
private static final int fillBellCairoBlack = Utils.getResourceIdentifier(
|
||||||
// The bold cairo notification filled icon is present,
|
"yt_fill_bell_black_24", "drawable");
|
||||||
// but YT still has not fixed the icon not associated to the enum.
|
|
||||||
VersionCheckPatch.IS_20_31_OR_GREATER && !Settings.SETTINGS_DISABLE_BOLD_ICONS.get()
|
|
||||||
? "yt_fill_experimental_bell_vd_theme_24"
|
|
||||||
: "revanced_fill_bell_cairo_black_24");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
@@ -294,12 +290,13 @@ public final class NavigationBar {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public static void setCairoNotificationFilledIcon(EnumMap enumMap, Enum tabActivityCairo) {
|
public static void setCairoNotificationFilledIcon(EnumMap enumMap, Enum tabActivityCairo) {
|
||||||
// Show a popup informing this fix is no longer needed to those who might care.
|
if (fillBellCairoBlack != 0) {
|
||||||
if (BaseSettings.DEBUG.get() && enumMap.containsKey(tabActivityCairo)) {
|
// Show a popup informing this fix is no longer needed to those who might care.
|
||||||
Logger.printException(() -> "YouTube fixed the notification icons");
|
if (BaseSettings.DEBUG.get() && enumMap.containsKey(tabActivityCairo)) {
|
||||||
|
Logger.printException(() -> "YouTube fixed the cairo notification icons");
|
||||||
|
}
|
||||||
|
enumMap.putIfAbsent(tabActivityCairo, fillBellCairoBlack);
|
||||||
}
|
}
|
||||||
|
|
||||||
enumMap.putIfAbsent(tabActivityCairo, fillBellCairoBlack);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum NavigationButton {
|
public enum NavigationButton {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package app.revanced.extension.youtube.shared
|
|||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import app.revanced.extension.shared.ResourceType
|
|
||||||
import app.revanced.extension.shared.Utils
|
import app.revanced.extension.shared.Utils
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
@@ -20,13 +19,13 @@ class PlayerControlsVisibilityObserverImpl(
|
|||||||
* id of the direct parent of controls_layout, R.id.youtube_controls_overlay
|
* id of the direct parent of controls_layout, R.id.youtube_controls_overlay
|
||||||
*/
|
*/
|
||||||
private val controlsLayoutParentId =
|
private val controlsLayoutParentId =
|
||||||
Utils.getResourceIdentifier(activity, ResourceType.ID, "youtube_controls_overlay")
|
Utils.getResourceIdentifier(activity, "youtube_controls_overlay", "id")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id of R.id.controls_layout
|
* id of R.id.controls_layout
|
||||||
*/
|
*/
|
||||||
private val controlsLayoutId =
|
private val controlsLayoutId =
|
||||||
Utils.getResourceIdentifier(activity, ResourceType.ID, "controls_layout")
|
Utils.getResourceIdentifier(activity, "controls_layout", "id")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reference to the controls layout view
|
* reference to the controls layout view
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package app.revanced.extension.youtube.shared
|
|||||||
|
|
||||||
import app.revanced.extension.shared.Logger
|
import app.revanced.extension.shared.Logger
|
||||||
import app.revanced.extension.youtube.Event
|
import app.revanced.extension.youtube.Event
|
||||||
|
import app.revanced.extension.youtube.patches.VideoInformation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regular player type.
|
* Regular player type.
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -149,9 +150,9 @@ public class SegmentPlaybackController {
|
|||||||
private static long skipSegmentButtonEndTime;
|
private static long skipSegmentButtonEndTime;
|
||||||
@Nullable
|
@Nullable
|
||||||
private static String timeWithoutSegments;
|
private static String timeWithoutSegments;
|
||||||
private static int seekbarAbsoluteLeft;
|
private static int sponsorBarAbsoluteLeft;
|
||||||
private static int seekbarAbsoluteRight;
|
private static int sponsorAbsoluteBarRight;
|
||||||
private static int seekbarThickness;
|
private static int sponsorBarThickness;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static SponsorSegment lastSegmentSkipped;
|
private static SponsorSegment lastSegmentSkipped;
|
||||||
@@ -907,13 +908,31 @@ public class SegmentPlaybackController {
|
|||||||
* injection point.
|
* injection point.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public static void setSeekbarRectangle(Rect seekbarRect) {
|
public static void setSponsorBarRect(Object self) {
|
||||||
final int left = seekbarRect.left;
|
try {
|
||||||
final int right = seekbarRect.right;
|
Field field = self.getClass().getDeclaredField("replaceMeWithsetSponsorBarRect");
|
||||||
if (seekbarAbsoluteLeft != left || seekbarAbsoluteRight != right) {
|
field.setAccessible(true);
|
||||||
Logger.printDebug(() -> "setSeekbarRectangle left: " + left + " right: " + right);
|
Rect rect = (Rect) Objects.requireNonNull(field.get(self));
|
||||||
seekbarAbsoluteLeft = left;
|
setSponsorBarAbsoluteLeft(rect);
|
||||||
seekbarAbsoluteRight = right;
|
setSponsorBarAbsoluteRight(rect);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger.printException(() -> "setSponsorBarRect failure", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setSponsorBarAbsoluteLeft(Rect rect) {
|
||||||
|
final int left = rect.left;
|
||||||
|
if (sponsorBarAbsoluteLeft != left) {
|
||||||
|
Logger.printDebug(() -> "setSponsorBarAbsoluteLeft: " + left);
|
||||||
|
sponsorBarAbsoluteLeft = left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setSponsorBarAbsoluteRight(Rect rect) {
|
||||||
|
final int right = rect.right;
|
||||||
|
if (sponsorAbsoluteBarRight != right) {
|
||||||
|
Logger.printDebug(() -> "setSponsorBarAbsoluteRight: " + right);
|
||||||
|
sponsorAbsoluteBarRight = right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -921,8 +940,8 @@ public class SegmentPlaybackController {
|
|||||||
* injection point.
|
* injection point.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public static void setSeekbarThickness(int thickness) {
|
public static void setSponsorBarThickness(int thickness) {
|
||||||
seekbarThickness = thickness;
|
sponsorBarThickness = thickness;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -932,7 +951,8 @@ public class SegmentPlaybackController {
|
|||||||
public static String appendTimeWithoutSegments(String totalTime) {
|
public static String appendTimeWithoutSegments(String totalTime) {
|
||||||
try {
|
try {
|
||||||
if (Settings.SB_ENABLED.get() && Settings.SB_VIDEO_LENGTH_WITHOUT_SEGMENTS.get()
|
if (Settings.SB_ENABLED.get() && Settings.SB_VIDEO_LENGTH_WITHOUT_SEGMENTS.get()
|
||||||
&& !TextUtils.isEmpty(totalTime) && !TextUtils.isEmpty(timeWithoutSegments)) {
|
&& !TextUtils.isEmpty(totalTime) && !TextUtils.isEmpty(timeWithoutSegments)
|
||||||
|
&& !isAdProgressTextVisible()) {
|
||||||
// Force LTR layout, to match the same LTR video time/length layout YouTube uses for all languages
|
// Force LTR layout, to match the same LTR video time/length layout YouTube uses for all languages
|
||||||
return "\u202D" + totalTime + timeWithoutSegments; // u202D = left to right override
|
return "\u202D" + totalTime + timeWithoutSegments; // u202D = left to right override
|
||||||
}
|
}
|
||||||
@@ -960,7 +980,6 @@ public class SegmentPlaybackController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foundNonhighlightSegments = true;
|
foundNonhighlightSegments = true;
|
||||||
|
|
||||||
long start = segment.start;
|
long start = segment.start;
|
||||||
final long end = segment.end;
|
final long end = segment.end;
|
||||||
// To prevent nested segments from incorrectly counting additional time,
|
// To prevent nested segments from incorrectly counting additional time,
|
||||||
@@ -992,17 +1011,17 @@ public class SegmentPlaybackController {
|
|||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public static void drawSegmentTimeBars(final Canvas canvas, final float posY) {
|
public static void drawSponsorTimeBars(final Canvas canvas, final float posY) {
|
||||||
try {
|
try {
|
||||||
if (segments == null) return;
|
if (segments == null || isAdProgressTextVisible()) return;
|
||||||
final long videoLength = VideoInformation.getVideoLength();
|
final long videoLength = VideoInformation.getVideoLength();
|
||||||
if (videoLength <= 0) return;
|
if (videoLength <= 0) return;
|
||||||
|
|
||||||
final int thicknessDiv2 = seekbarThickness / 2; // Rounds down.
|
final int thicknessDiv2 = sponsorBarThickness / 2; // rounds down
|
||||||
final float top = posY - (seekbarThickness - thicknessDiv2);
|
final float top = posY - (sponsorBarThickness - thicknessDiv2);
|
||||||
final float bottom = posY + thicknessDiv2;
|
final float bottom = posY + thicknessDiv2;
|
||||||
final float videoMillisecondsToPixels = (1f / videoLength) * (seekbarAbsoluteRight - seekbarAbsoluteLeft);
|
final float videoMillisecondsToPixels = (1f / videoLength) * (sponsorAbsoluteBarRight - sponsorBarAbsoluteLeft);
|
||||||
final float leftPadding = seekbarAbsoluteLeft;
|
final float leftPadding = sponsorBarAbsoluteLeft;
|
||||||
|
|
||||||
for (SponsorSegment segment : segments) {
|
for (SponsorSegment segment : segments) {
|
||||||
final float left = leftPadding + segment.start * videoMillisecondsToPixels;
|
final float left = leftPadding + segment.start * videoMillisecondsToPixels;
|
||||||
|
|||||||
@@ -1,26 +1,16 @@
|
|||||||
package app.revanced.extension.youtube.sponsorblock.ui;
|
package app.revanced.extension.youtube.sponsorblock.ui;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
|
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
|
||||||
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
|
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class CreateSegmentButton {
|
public class CreateSegmentButton {
|
||||||
|
|
||||||
private static final int DRAWABLE_SB_LOGO = Utils.getResourceIdentifierOrThrow(
|
|
||||||
ResourceType.DRAWABLE, Utils.appIsUsingBoldIcons()
|
|
||||||
? "revanced_sb_logo_bold"
|
|
||||||
: "revanced_sb_logo"
|
|
||||||
);
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static PlayerControlButton instance;
|
private static PlayerControlButton instance;
|
||||||
|
|
||||||
@@ -41,14 +31,6 @@ public class CreateSegmentButton {
|
|||||||
v -> SponsorBlockViewController.toggleNewSegmentLayoutVisibility(),
|
v -> SponsorBlockViewController.toggleNewSegmentLayoutVisibility(),
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
// FIXME: Bold YT player icons are currently forced off.
|
|
||||||
// Enable this logic when the new player icons are not forced off.
|
|
||||||
ImageView icon = Utils.getChildViewByResourceName(controlsView,
|
|
||||||
"revanced_sb_create_segment_button");
|
|
||||||
if (false) {
|
|
||||||
icon.setImageResource(DRAWABLE_SB_LOGO);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.printException(() -> "initialize failure", ex);
|
Logger.printException(() -> "initialize failure", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import android.widget.ImageButton;
|
|||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ui.Dim;
|
import app.revanced.extension.shared.ui.Dim;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.youtube.patches.VideoInformation;
|
import app.revanced.extension.youtube.patches.VideoInformation;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SponsorBlockUtils;
|
import app.revanced.extension.youtube.sponsorblock.SponsorBlockUtils;
|
||||||
@@ -46,8 +45,8 @@ public final class NewSegmentLayout extends FrameLayout {
|
|||||||
final int defStyleAttr, final int defStyleRes) {
|
final int defStyleAttr, final int defStyleRes) {
|
||||||
super(context, attributeSet, defStyleAttr, defStyleRes);
|
super(context, attributeSet, defStyleAttr, defStyleRes);
|
||||||
|
|
||||||
LayoutInflater.from(context).inflate(getResourceIdentifierOrThrow(context,
|
LayoutInflater.from(context).inflate(
|
||||||
ResourceType.LAYOUT, "revanced_sb_new_segment"), this, true
|
getResourceIdentifierOrThrow(context, "revanced_sb_new_segment", "layout"), this, true
|
||||||
);
|
);
|
||||||
|
|
||||||
initializeButton(
|
initializeButton(
|
||||||
@@ -106,7 +105,7 @@ 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) {
|
||||||
ImageButton button = findViewById(getResourceIdentifierOrThrow(context, ResourceType.ID, resourceIdentifierName));
|
ImageButton button = findViewById(getResourceIdentifierOrThrow(context, resourceIdentifierName, "id"));
|
||||||
|
|
||||||
// Add ripple effect
|
// Add ripple effect
|
||||||
RippleDrawable rippleDrawable = new RippleDrawable(
|
RippleDrawable rippleDrawable = new RippleDrawable(
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import androidx.annotation.NonNull;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
|
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
|
||||||
import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment;
|
import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment;
|
||||||
@@ -58,10 +57,11 @@ public class SkipSponsorButton extends FrameLayout {
|
|||||||
public SkipSponsorButton(Context context, AttributeSet attributeSet, int defStyleAttr, int defStyleRes) {
|
public SkipSponsorButton(Context context, AttributeSet attributeSet, int defStyleAttr, int defStyleRes) {
|
||||||
super(context, attributeSet, defStyleAttr, defStyleRes);
|
super(context, attributeSet, defStyleAttr, defStyleRes);
|
||||||
|
|
||||||
LayoutInflater.from(context).inflate(getResourceIdentifierOrThrow(context, ResourceType.LAYOUT, "revanced_sb_skip_sponsor_button"), this, true); // layout:skip_ad_button
|
LayoutInflater.from(context).inflate(getResourceIdentifierOrThrow(context,
|
||||||
|
"revanced_sb_skip_sponsor_button", "layout"), this, true); // layout:skip_ad_button
|
||||||
setMinimumHeight(getResourceDimensionPixelSize("ad_skip_ad_button_min_height")); // dimen:ad_skip_ad_button_min_height
|
setMinimumHeight(getResourceDimensionPixelSize("ad_skip_ad_button_min_height")); // dimen:ad_skip_ad_button_min_height
|
||||||
skipSponsorBtnContainer = Objects.requireNonNull(findViewById(getResourceIdentifierOrThrow(
|
skipSponsorBtnContainer = Objects.requireNonNull(findViewById(getResourceIdentifierOrThrow(
|
||||||
context, ResourceType.ID, "revanced_sb_skip_sponsor_button_container"))); // id:skip_ad_button_container
|
context, "revanced_sb_skip_sponsor_button_container", "id"))); // id:skip_ad_button_container
|
||||||
|
|
||||||
background = new Paint();
|
background = new Paint();
|
||||||
background.setColor(getResourceColor("skip_ad_button_background_color")); // color:skip_ad_button_background_color);
|
background.setColor(getResourceColor("skip_ad_button_background_color")); // color:skip_ad_button_background_color);
|
||||||
@@ -72,7 +72,7 @@ public class SkipSponsorButton extends FrameLayout {
|
|||||||
border.setStrokeWidth(getResourceDimension("ad_skip_ad_button_border_width")); // dimen:ad_skip_ad_button_border_width);
|
border.setStrokeWidth(getResourceDimension("ad_skip_ad_button_border_width")); // dimen:ad_skip_ad_button_border_width);
|
||||||
border.setStyle(Paint.Style.STROKE);
|
border.setStyle(Paint.Style.STROKE);
|
||||||
|
|
||||||
skipSponsorTextView = Objects.requireNonNull(findViewById(getResourceIdentifier(context, ResourceType.ID, "revanced_sb_skip_sponsor_button_text"))); // id:skip_ad_button_text;
|
skipSponsorTextView = Objects.requireNonNull(findViewById(getResourceIdentifier(context, "revanced_sb_skip_sponsor_button_text", "id"))); // id:skip_ad_button_text;
|
||||||
defaultBottomMargin = getResourceDimensionPixelSize("skip_button_default_bottom_margin"); // dimen:skip_button_default_bottom_margin
|
defaultBottomMargin = getResourceDimensionPixelSize("skip_button_default_bottom_margin"); // dimen:skip_button_default_bottom_margin
|
||||||
ctaBottomMargin = getResourceDimensionPixelSize("skip_button_cta_bottom_margin"); // dimen:skip_button_cta_bottom_margin
|
ctaBottomMargin = getResourceDimensionPixelSize("skip_button_cta_bottom_margin"); // dimen:skip_button_cta_bottom_margin
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +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 static app.revanced.extension.shared.Utils.getResourceIdentifierOrThrow;
|
import static app.revanced.extension.shared.Utils.getResourceIdentifierOrThrow;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -16,7 +15,6 @@ import java.lang.ref.WeakReference;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.shared.PlayerType;
|
import app.revanced.extension.youtube.shared.PlayerType;
|
||||||
import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment;
|
import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment;
|
||||||
@@ -64,17 +62,16 @@ public class SponsorBlockViewController {
|
|||||||
|
|
||||||
Context context = Utils.getContext();
|
Context context = Utils.getContext();
|
||||||
RelativeLayout layout = new RelativeLayout(context);
|
RelativeLayout layout = new RelativeLayout(context);
|
||||||
layout.setLayoutParams(new RelativeLayout.LayoutParams(
|
layout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,RelativeLayout.LayoutParams.MATCH_PARENT));
|
||||||
RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
|
|
||||||
LayoutInflater.from(context).inflate(getResourceIdentifierOrThrow(
|
LayoutInflater.from(context).inflate(getResourceIdentifierOrThrow(
|
||||||
ResourceType.LAYOUT, "revanced_sb_inline_sponsor_overlay"), layout);
|
"revanced_sb_inline_sponsor_overlay", "layout"), layout);
|
||||||
inlineSponsorOverlayRef = new WeakReference<>(layout);
|
inlineSponsorOverlayRef = new WeakReference<>(layout);
|
||||||
|
|
||||||
viewGroup.addView(layout);
|
viewGroup.addView(layout);
|
||||||
viewGroup.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
|
viewGroup.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onChildViewAdded(View parent, View child) {
|
public void onChildViewAdded(View parent, View child) {
|
||||||
// Ensure SB buttons and controls are always on top, otherwise the end-screen cards can cover the skip button.
|
// ensure SB buttons and controls are always on top, otherwise the endscreen cards can cover the skip button
|
||||||
RelativeLayout layout = inlineSponsorOverlayRef.get();
|
RelativeLayout layout = inlineSponsorOverlayRef.get();
|
||||||
if (layout != null) {
|
if (layout != null) {
|
||||||
layout.bringToFront();
|
layout.bringToFront();
|
||||||
@@ -86,14 +83,14 @@ public class SponsorBlockViewController {
|
|||||||
});
|
});
|
||||||
youtubeOverlaysLayoutRef = new WeakReference<>(viewGroup);
|
youtubeOverlaysLayoutRef = new WeakReference<>(viewGroup);
|
||||||
|
|
||||||
skipHighlightButtonRef = new WeakReference<>(Objects.requireNonNull(layout.findViewById(
|
skipHighlightButtonRef = new WeakReference<>(layout.findViewById(getResourceIdentifierOrThrow(
|
||||||
getResourceIdentifier(ResourceType.ID, "revanced_sb_skip_highlight_button"))));
|
"revanced_sb_skip_highlight_button", "id")));
|
||||||
|
|
||||||
skipSponsorButtonRef = new WeakReference<>(Objects.requireNonNull(layout.findViewById(
|
skipSponsorButtonRef = new WeakReference<>(layout.findViewById(getResourceIdentifierOrThrow(
|
||||||
getResourceIdentifier(ResourceType.ID, "revanced_sb_skip_sponsor_button"))));
|
"revanced_sb_skip_sponsor_button", "id")));
|
||||||
|
|
||||||
NewSegmentLayout newSegmentLayout = Objects.requireNonNull(layout.findViewById(
|
NewSegmentLayout newSegmentLayout = layout.findViewById(getResourceIdentifierOrThrow(
|
||||||
getResourceIdentifier(ResourceType.ID, "revanced_sb_new_segment_view")));
|
"revanced_sb_new_segment_view", "id"));
|
||||||
newSegmentLayoutRef = new WeakReference<>(newSegmentLayout);
|
newSegmentLayoutRef = new WeakReference<>(newSegmentLayout);
|
||||||
newSegmentLayout.updateLayout();
|
newSegmentLayout.updateLayout();
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import android.view.MotionEvent
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import app.revanced.extension.shared.Logger.printDebug
|
import app.revanced.extension.shared.Logger.printDebug
|
||||||
import app.revanced.extension.shared.Logger.printException
|
import app.revanced.extension.shared.Logger.printException
|
||||||
import app.revanced.extension.youtube.patches.VersionCheckPatch
|
|
||||||
import app.revanced.extension.youtube.settings.Settings
|
import app.revanced.extension.youtube.settings.Settings
|
||||||
import app.revanced.extension.youtube.shared.PlayerType
|
import app.revanced.extension.youtube.shared.PlayerType
|
||||||
import app.revanced.extension.youtube.swipecontrols.controller.AudioVolumeController
|
import app.revanced.extension.youtube.swipecontrols.controller.AudioVolumeController
|
||||||
@@ -238,8 +237,6 @@ class SwipeControlsHostActivity : Activity() {
|
|||||||
*/
|
*/
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun allowSwipeChangeVideo(original: Boolean): Boolean =
|
fun allowSwipeChangeVideo(original: Boolean): Boolean = Settings.SWIPE_CHANGE_VIDEO.get()
|
||||||
// Feature can cause crashing if forced in newer targets.
|
|
||||||
!VersionCheckPatch.IS_20_22_OR_GREATER && Settings.SWIPE_CHANGE_VIDEO.get()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package app.revanced.extension.youtube.swipecontrols.controller
|
|||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import app.revanced.extension.shared.ResourceType
|
|
||||||
import app.revanced.extension.shared.Utils
|
import app.revanced.extension.shared.Utils
|
||||||
import app.revanced.extension.youtube.swipecontrols.misc.Rectangle
|
import app.revanced.extension.youtube.swipecontrols.misc.Rectangle
|
||||||
import app.revanced.extension.youtube.swipecontrols.misc.applyDimension
|
import app.revanced.extension.youtube.swipecontrols.misc.applyDimension
|
||||||
@@ -57,8 +56,7 @@ class SwipeZonesController(
|
|||||||
/**
|
/**
|
||||||
* id for R.id.player_view
|
* id for R.id.player_view
|
||||||
*/
|
*/
|
||||||
private val playerViewId = Utils.getResourceIdentifier(
|
private val playerViewId = Utils.getResourceIdentifier(host, "player_view", "id")
|
||||||
host, ResourceType.ID, "player_view")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* current bounding rectangle of the player
|
* current bounding rectangle of the player
|
||||||
|
|||||||
@@ -14,13 +14,12 @@ import android.util.AttributeSet
|
|||||||
import android.view.HapticFeedbackConstants
|
import android.view.HapticFeedbackConstants
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import app.revanced.extension.shared.ResourceType
|
|
||||||
import app.revanced.extension.shared.StringRef.str
|
import app.revanced.extension.shared.StringRef.str
|
||||||
import app.revanced.extension.shared.Utils
|
import app.revanced.extension.shared.Utils
|
||||||
import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider
|
import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider
|
||||||
import app.revanced.extension.youtube.swipecontrols.misc.SwipeControlsOverlay
|
import app.revanced.extension.youtube.swipecontrols.misc.SwipeControlsOverlay
|
||||||
import kotlin.math.max
|
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
import kotlin.math.max
|
||||||
import kotlin.math.round
|
import kotlin.math.round
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,7 +53,7 @@ class SwipeControlsOverlayLayout(
|
|||||||
// Function to retrieve drawable resources by name.
|
// Function to retrieve drawable resources by name.
|
||||||
private fun getDrawable(name: String): Drawable {
|
private fun getDrawable(name: String): Drawable {
|
||||||
val drawable = resources.getDrawable(
|
val drawable = resources.getDrawable(
|
||||||
Utils.getResourceIdentifier(context, ResourceType.DRAWABLE, name),
|
Utils.getResourceIdentifier(context, name, "drawable"),
|
||||||
context.theme,
|
context.theme,
|
||||||
)
|
)
|
||||||
drawable.setTint(config.overlayTextColor)
|
drawable.setTint(config.overlayTextColor)
|
||||||
@@ -87,7 +86,7 @@ class SwipeControlsOverlayLayout(
|
|||||||
|
|
||||||
// Initialize horizontal progress bar.
|
// Initialize horizontal progress bar.
|
||||||
val screenWidth = resources.displayMetrics.widthPixels
|
val screenWidth = resources.displayMetrics.widthPixels
|
||||||
val layoutWidth = (screenWidth * 4 / 5) // Cap at ~360dp.
|
val layoutWidth = (screenWidth * 4 / 5).toInt() // Cap at ~360dp.
|
||||||
horizontalProgressView = HorizontalProgressView(
|
horizontalProgressView = HorizontalProgressView(
|
||||||
context,
|
context,
|
||||||
config.overlayBackgroundOpacity,
|
config.overlayBackgroundOpacity,
|
||||||
@@ -631,7 +630,7 @@ class VerticalProgressView(
|
|||||||
if (isMinimalStyle) {
|
if (isMinimalStyle) {
|
||||||
canvas.drawText(displayText, textX, textStartY, textPaint)
|
canvas.drawText(displayText, textX, textStartY, textPaint)
|
||||||
} else {
|
} else {
|
||||||
val progressStartY = (iconEndY + padding)
|
val progressStartY = (iconEndY + padding).toFloat()
|
||||||
val progressEndY = textStartY - textPaint.textSize - padding
|
val progressEndY = textStartY - textPaint.textSize - padding
|
||||||
val progressHeight = progressEndY - progressStartY
|
val progressHeight = progressEndY - progressStartY
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,8 @@ package app.revanced.extension.youtube.videoplayer;
|
|||||||
import static app.revanced.extension.shared.StringRef.str;
|
import static app.revanced.extension.shared.StringRef.str;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@@ -17,9 +14,9 @@ public class LoopVideoButton {
|
|||||||
private static PlayerControlButton instance;
|
private static PlayerControlButton instance;
|
||||||
|
|
||||||
private static final int LOOP_VIDEO_ON = Utils.getResourceIdentifierOrThrow(
|
private static final int LOOP_VIDEO_ON = Utils.getResourceIdentifierOrThrow(
|
||||||
ResourceType.DRAWABLE, "revanced_loop_video_button_on");
|
"revanced_loop_video_button_on", "drawable");
|
||||||
private static final int LOOP_VIDEO_OFF = Utils.getResourceIdentifierOrThrow(
|
private static final int LOOP_VIDEO_OFF = Utils.getResourceIdentifierOrThrow(
|
||||||
ResourceType.DRAWABLE,"revanced_loop_video_button_off");
|
"revanced_loop_video_button_off", "drawable");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.ResourceType;
|
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.youtube.patches.VideoInformation;
|
import app.revanced.extension.youtube.patches.VideoInformation;
|
||||||
import app.revanced.extension.youtube.patches.playback.quality.RememberVideoQualityPatch;
|
import app.revanced.extension.youtube.patches.playback.quality.RememberVideoQualityPatch;
|
||||||
|
|||||||
@@ -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.48.0-dev.4
|
version = 5.48.0
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
[versions]
|
[versions]
|
||||||
revanced-patcher = "22.0.0-local"
|
revanced-patcher = "21.0.0"
|
||||||
# Tracking https://github.com/google/smali/issues/64.
|
# Tracking https://github.com/google/smali/issues/64.
|
||||||
#noinspection GradleDependency
|
#noinspection GradleDependency
|
||||||
smali = "3.0.8"
|
smali = "3.0.5"
|
||||||
# 8.3.0 causes java verifier error: https://github.com/ReVanced/revanced-patches/issues/2818.
|
# 8.3.0 causes java verifier error: https://github.com/ReVanced/revanced-patches/issues/2818.
|
||||||
#noinspection GradleDependency
|
#noinspection GradleDependency
|
||||||
agp = "8.2.2"
|
agp = "8.2.2"
|
||||||
annotation = "1.9.1"
|
annotation = "1.9.1"
|
||||||
appcompat = "1.7.1"
|
appcompat = "1.7.0"
|
||||||
okhttp = "5.3.2"
|
okhttp = "5.0.0-alpha.14"
|
||||||
retrofit = "3.0.0"
|
retrofit = "2.11.0"
|
||||||
guava = "33.5.0-jre"
|
guava = "33.5.0-jre"
|
||||||
protobuf-javalite = "4.33.1"
|
protobuf-javalite = "4.32.0"
|
||||||
protoc = "4.33.1"
|
protoc = "4.32.0"
|
||||||
protobuf = "0.9.5"
|
protobuf = "0.9.5"
|
||||||
antlr4 = "4.13.2"
|
antlr4 = "4.13.2"
|
||||||
nanohttpd = "2.3.1"
|
nanohttpd = "2.3.1"
|
||||||
apksig = "8.12.3"
|
apksig = "8.10.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
|
annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
|
||||||
|
|||||||
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,6 @@
|
|||||||
|
#Mon Jun 16 14:39:32 CEST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -76,6 +76,10 @@ public final class app/revanced/patches/all/misc/debugging/EnableAndroidDebuggin
|
|||||||
public static final fun getEnableAndroidDebuggingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getEnableAndroidDebuggingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/all/misc/directory/ChangeDataDirectoryLocationPatchKt {
|
||||||
|
public static final fun getChangeDataDirectoryLocationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatchKt {
|
public final class app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatchKt {
|
||||||
public static final fun getExportInternalDataDocumentsProviderPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getExportInternalDataDocumentsProviderPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
@@ -100,6 +104,10 @@ public final class app/revanced/patches/all/misc/packagename/ChangePackageNamePa
|
|||||||
public static final fun setPackageNameOption (Lapp/revanced/patcher/patch/Option;)V
|
public static final fun setPackageNameOption (Lapp/revanced/patcher/patch/Option;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/all/misc/playintegrity/DisablePlayIntegrityKt {
|
||||||
|
public static final fun getDisablePlayIntegrityPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/misc/resources/AddResourcesPatchKt {
|
public final class app/revanced/patches/all/misc/resources/AddResourcesPatchKt {
|
||||||
public static final fun addResource (Ljava/lang/String;Lapp/revanced/util/resource/BaseResource;)Z
|
public static final fun addResource (Ljava/lang/String;Lapp/revanced/util/resource/BaseResource;)Z
|
||||||
public static final fun addResources (Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;)Z
|
public static final fun addResources (Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;)Z
|
||||||
@@ -116,6 +124,10 @@ public final class app/revanced/patches/all/misc/screencapture/RemoveScreenCaptu
|
|||||||
public static final fun getRemoveScreenCaptureRestrictionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getRemoveScreenCaptureRestrictionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/all/misc/screenshot/PreventScreenshotDetectionPatchKt {
|
||||||
|
public static final fun getPreventScreenshotDetectionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatchKt {
|
public final class app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatchKt {
|
||||||
public static final fun getRemoveScreenshotRestrictionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getRemoveScreenshotRestrictionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -160,6 +172,10 @@ public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
|
|||||||
public static final fun getAngulusPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getAngulusPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/backdrops/misc/pro/ProUnlockPatchKt {
|
||||||
|
public static final fun getProUnlockPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatchKt {
|
public final class app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatchKt {
|
||||||
public static final fun getRemovePlayLimitsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getRemovePlayLimitsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -248,6 +264,10 @@ public final class app/revanced/patches/googlephotos/misc/gms/GmsCoreSupportPatc
|
|||||||
public static final fun getGmsCoreSupportPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getGmsCoreSupportPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/googlephotos/misc/preferences/RestoreHiddenBackUpWhileChargingTogglePatchKt {
|
||||||
|
public static final fun getRestoreHiddenBackUpWhileChargingTogglePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictionsKt {
|
public final class app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictionsKt {
|
||||||
public static final fun getRemoveDeviceRestrictionsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getRemoveDeviceRestrictionsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -292,6 +312,10 @@ public final class app/revanced/patches/instagram/hide/explore/HideExploreFeedKt
|
|||||||
public static final fun getHideExploreFeedPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideExploreFeedPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/instagram/hide/highlightsTray/HideHighlightsTrayPatchKt {
|
||||||
|
public static final fun getHideHighlightsTrayPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/instagram/hide/navigation/HideNavigationButtonsKt {
|
public final class app/revanced/patches/instagram/hide/navigation/HideNavigationButtonsKt {
|
||||||
public static final fun getHideNavigationButtonsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideNavigationButtonsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -316,6 +340,10 @@ public final class app/revanced/patches/instagram/misc/links/OpenLinksExternally
|
|||||||
public static final fun getOpenLinksExternallyPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getOpenLinksExternallyPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/instagram/misc/removeBuildExpiredPopup/RemoveBuildExpiredPopupPatchKt {
|
||||||
|
public static final fun getRemoveBuildExpiredPopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatchKt {
|
public final class app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatchKt {
|
||||||
public static final fun getChangeLinkSharingDomainPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getChangeLinkSharingDomainPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -340,6 +368,10 @@ public final class app/revanced/patches/letterboxd/ads/HideAdsPatchKt {
|
|||||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatchKt {
|
||||||
|
public static final fun getUnlockAppIconsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatchKt {
|
public final class app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatchKt {
|
||||||
public static final fun getDisableMandatoryLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableMandatoryLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -372,6 +404,14 @@ public final class app/revanced/patches/messenger/inbox/HideInboxSubtabsPatchKt
|
|||||||
public static final fun getHideInboxSubtabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideInboxSubtabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/messenger/inputfield/DisableSwitchingEmojiToStickerPatchKt {
|
||||||
|
public static final fun getDisableSwitchingEmojiToStickerPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/messenger/inputfield/DisableTypingIndicatorPatchKt {
|
||||||
|
public static final fun getDisableTypingIndicatorPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/messenger/layout/HideFacebookButtonPatchKt {
|
public final class app/revanced/patches/messenger/layout/HideFacebookButtonPatchKt {
|
||||||
public static final fun getHideFacebookButtonPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideFacebookButtonPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -384,6 +424,14 @@ public final class app/revanced/patches/messenger/misc/extension/ExtensionPatchK
|
|||||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/messenger/navbar/RemoveMetaAITabPatchKt {
|
||||||
|
public static final fun getRemoveMetaAITabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/meta/ads/HideAdsPatchKt {
|
||||||
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatchKt {
|
public final class app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatchKt {
|
||||||
public static final fun getForceEnglishLocalePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getForceEnglishLocalePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -404,6 +452,10 @@ public final class app/revanced/patches/music/interaction/permanentrepeat/Perman
|
|||||||
public static final fun getPermanentRepeatPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getPermanentRepeatPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/music/interaction/permanentshuffle/PermanentShufflePatchKt {
|
||||||
|
public static final fun getPermanentShufflePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/music/layout/branding/CustomBrandingPatchKt {
|
public final class app/revanced/patches/music/layout/branding/CustomBrandingPatchKt {
|
||||||
public static final fun getCustomBrandingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getCustomBrandingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
@@ -412,6 +464,10 @@ public final class app/revanced/patches/music/layout/buttons/HideButtonsKt {
|
|||||||
public static final fun getHideButtons ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideButtons ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/music/layout/castbutton/HideCastButtonKt {
|
||||||
|
public static final fun getHideCastButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/music/layout/compactheader/HideCategoryBarKt {
|
public final class app/revanced/patches/music/layout/compactheader/HideCategoryBarKt {
|
||||||
public static final fun getHideCategoryBar ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideCategoryBar ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -432,6 +488,11 @@ public final class app/revanced/patches/music/layout/theme/ThemePatchKt {
|
|||||||
public static final fun getThemePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getThemePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/music/layout/upgradebutton/HideUpgradeButtonPatchKt {
|
||||||
|
public static final fun getHideUpgradeButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
public static final fun getRemoveUpgradeButton ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatchKt {
|
public final class app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatchKt {
|
||||||
public static final fun getBypassCertificateChecksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getBypassCertificateChecksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -512,6 +573,10 @@ public final class app/revanced/patches/netguard/broadcasts/removerestriction/Re
|
|||||||
public static final fun getRemoveBroadcastsRestrictionPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getRemoveBroadcastsRestrictionPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/nfctoolsse/misc/pro/UnlockProPatchKt {
|
||||||
|
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/nunl/ads/HideAdsPatchKt {
|
public final class app/revanced/patches/nunl/ads/HideAdsPatchKt {
|
||||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -520,6 +585,10 @@ public final class app/revanced/patches/nunl/firebase/SpoofCertificatePatchKt {
|
|||||||
public static final fun getSpoofCertificatePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSpoofCertificatePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/nyx/misc/pro/UnlockProPatchKt {
|
||||||
|
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatchKt {
|
public final class app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatchKt {
|
||||||
public static final fun getFixCrashPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFixCrashPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -758,11 +827,16 @@ public final class app/revanced/patches/reddit/customclients/sync/syncforreddit/
|
|||||||
public static final fun getFixVideoDownloadsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFixVideoDownloadsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/reddit/customclients/syncforreddit/fix/video/FixVideoDownloadsPatchKt {
|
||||||
|
public static final fun getFixVideoDownloadsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatchKt {
|
public final class app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatchKt {
|
||||||
public static final fun getDisableScreenshotPopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableScreenshotPopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatchKt {
|
public final class app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatchKt {
|
||||||
|
public static final fun getUnlockPremiumIconPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun getUnlockPremiumIconsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getUnlockPremiumIconsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -800,24 +874,27 @@ public final class app/revanced/patches/shared/misc/extension/ExtensionHook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/extension/SharedExtensionPatchKt {
|
public final class app/revanced/patches/shared/misc/extension/SharedExtensionPatchKt {
|
||||||
public static final fun activityOnCreateExtensionHook (Ljava/lang/String;)Lkotlin/jvm/functions/Function0;
|
|
||||||
public static final fun extensionHook (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lapp/revanced/patcher/Fingerprint;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
public static final fun extensionHook (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lapp/revanced/patcher/Fingerprint;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
||||||
public static final fun extensionHook (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function0;
|
public static final fun extensionHook (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
||||||
public static synthetic fun extensionHook$default (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lapp/revanced/patcher/Fingerprint;ILjava/lang/Object;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
public static synthetic fun extensionHook$default (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lapp/revanced/patcher/Fingerprint;ILjava/lang/Object;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
||||||
public static synthetic fun extensionHook$default (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/jvm/functions/Function0;
|
public static synthetic fun extensionHook$default (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patches/shared/misc/extension/ExtensionHook;
|
||||||
public static final fun sharedExtensionPatch (Ljava/lang/String;[Lkotlin/jvm/functions/Function0;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun sharedExtensionPatch (Ljava/lang/String;[Lapp/revanced/patches/shared/misc/extension/ExtensionHook;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun sharedExtensionPatch ([Lkotlin/jvm/functions/Function0;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun sharedExtensionPatch ([Lapp/revanced/patches/shared/misc/extension/ExtensionHook;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/fix/verticalscroll/VerticalScrollPatchKt {
|
public final class app/revanced/patches/shared/misc/fix/verticalscroll/VerticalScrollPatchKt {
|
||||||
public static final fun getVerticalScrollPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getVerticalScrollPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/shared/misc/gms/FingerprintsKt {
|
||||||
|
public static final field GET_GMS_CORE_VENDOR_GROUP_ID_METHOD_NAME Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/gms/GmsCoreSupportPatchKt {
|
public final class app/revanced/patches/shared/misc/gms/GmsCoreSupportPatchKt {
|
||||||
public static final fun gmsCoreSupportPatch (Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/Fingerprint;Ljava/util/Set;Lapp/revanced/patcher/Fingerprint;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun gmsCoreSupportPatch (Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/Fingerprint;Ljava/util/Set;Lapp/revanced/patcher/Fingerprint;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static synthetic fun gmsCoreSupportPatch$default (Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/Fingerprint;Ljava/util/Set;Lapp/revanced/patcher/Fingerprint;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static synthetic fun gmsCoreSupportPatch$default (Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/Fingerprint;Ljava/util/Set;Lapp/revanced/patcher/Fingerprint;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun gmsCoreSupportResourcePatch (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun gmsCoreSupportResourcePatch (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
public static synthetic fun gmsCoreSupportResourcePatch$default (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/ResourcePatch;
|
public static synthetic fun gmsCoreSupportResourcePatch$default (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/hex/HexPatchBuilder : java/util/Set, kotlin/jvm/internal/markers/KMappedMarker {
|
public final class app/revanced/patches/shared/misc/hex/HexPatchBuilder : java/util/Set, kotlin/jvm/internal/markers/KMappedMarker {
|
||||||
@@ -856,82 +933,45 @@ public final class app/revanced/patches/shared/misc/hex/Replacement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/mapping/ResourceElement {
|
public final class app/revanced/patches/shared/misc/mapping/ResourceElement {
|
||||||
public fun <init> (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;J)V
|
public final fun component1 ()Ljava/lang/String;
|
||||||
public final fun component1 ()Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public final fun component2 ()Ljava/lang/String;
|
public final fun component2 ()Ljava/lang/String;
|
||||||
public final fun component3 ()J
|
public final fun component3 ()J
|
||||||
public final fun copy (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;J)Lapp/revanced/patches/shared/misc/mapping/ResourceElement;
|
public final fun copy (Ljava/lang/String;Ljava/lang/String;J)Lapp/revanced/patches/shared/misc/mapping/ResourceElement;
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patches/shared/misc/mapping/ResourceElement;Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;JILjava/lang/Object;)Lapp/revanced/patches/shared/misc/mapping/ResourceElement;
|
public static synthetic fun copy$default (Lapp/revanced/patches/shared/misc/mapping/ResourceElement;Ljava/lang/String;Ljava/lang/String;JILjava/lang/Object;)Lapp/revanced/patches/shared/misc/mapping/ResourceElement;
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
public final fun getId ()J
|
public final fun getId ()J
|
||||||
public final fun getName ()Ljava/lang/String;
|
public final fun getName ()Ljava/lang/String;
|
||||||
public final fun getType ()Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
public final fun getType ()Ljava/lang/String;
|
||||||
public fun hashCode ()I
|
public fun hashCode ()I
|
||||||
public fun toString ()Ljava/lang/String;
|
public fun toString ()Ljava/lang/String;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatchKt {
|
public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatchKt {
|
||||||
public static final fun getResourceElements ()Ljava/util/Collection;
|
public static final fun get (Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)J
|
||||||
public static final fun getResourceId (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;)J
|
|
||||||
public static final fun getResourceMappingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getResourceMappingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
public static final fun hasResourceId (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;)Z
|
public static final fun getResourceMappings ()Ljava/util/List;
|
||||||
public static final fun resourceLiteral (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;Lapp/revanced/patcher/InstructionLocation;)Lapp/revanced/patcher/LiteralFilter;
|
|
||||||
public static synthetic fun resourceLiteral$default (Lapp/revanced/patches/shared/misc/mapping/ResourceType;Ljava/lang/String;Lapp/revanced/patcher/InstructionLocation;ILjava/lang/Object;)Lapp/revanced/patcher/LiteralFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/mapping/ResourceType : java/lang/Enum {
|
|
||||||
public static final field ANIM Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field ANIMATOR Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field ARRAY Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field ATTR Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field BOOL Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field COLOR Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field Companion Lapp/revanced/patches/shared/misc/mapping/ResourceType$Companion;
|
|
||||||
public static final field DIMEN Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field DRAWABLE Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field FONT Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field FRACTION Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field ID Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field INTEGER Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field INTERPOLATOR Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field LAYOUT Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field MENU Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field MIPMAP Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field NAVIGATION Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field PLURALS Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field RAW Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field STRING Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field STYLE Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field STYLEABLE Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field TRANSITION Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field VALUES Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static final field XML Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static fun getEntries ()Lkotlin/enums/EnumEntries;
|
|
||||||
public final fun getValue ()Ljava/lang/String;
|
|
||||||
public static fun valueOf (Ljava/lang/String;)Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
public static fun values ()[Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/mapping/ResourceType$Companion {
|
|
||||||
public final fun fromValue (Ljava/lang/String;)Lapp/revanced/patches/shared/misc/mapping/ResourceType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatchKt {
|
public final class app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatchKt {
|
||||||
public static final fun getDisableLicenseCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableLicenseCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/shared/misc/privacy/DisableSentryTelemetryKt {
|
||||||
|
public static final fun getDisableSentryTelemetryPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/settings/SettingsPatchKt {
|
public final class app/revanced/patches/shared/misc/settings/SettingsPatchKt {
|
||||||
public static final fun overrideThemeColors (Ljava/lang/String;Ljava/lang/String;)V
|
public static final fun overrideThemeColors (Ljava/lang/String;Ljava/lang/String;)V
|
||||||
public static final fun settingsPatch (Ljava/util/List;Ljava/util/Set;)Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun settingsPatch (Ljava/util/List;Ljava/util/Set;)Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
|
public static final fun settingsPatch (Lkotlin/Pair;Ljava/util/Set;)Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
public static synthetic fun settingsPatch$default (Ljava/util/List;Ljava/util/Set;ILjava/lang/Object;)Lapp/revanced/patcher/patch/ResourcePatch;
|
public static synthetic fun settingsPatch$default (Ljava/util/List;Ljava/util/Set;ILjava/lang/Object;)Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public abstract class app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public static final field Companion Lapp/revanced/patches/shared/misc/settings/preference/BasePreference$Companion;
|
public static final field Companion Lapp/revanced/patches/shared/misc/settings/preference/BasePreference$Companion;
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getIcon ()Ljava/lang/String;
|
public final fun getIcon ()Ljava/lang/String;
|
||||||
public final fun getIconBold ()Ljava/lang/String;
|
|
||||||
public final fun getKey ()Ljava/lang/String;
|
public final fun getKey ()Ljava/lang/String;
|
||||||
public final fun getLayout ()Ljava/lang/String;
|
public final fun getLayout ()Ljava/lang/String;
|
||||||
public final fun getSummaryKey ()Ljava/lang/String;
|
public final fun getSummaryKey ()Ljava/lang/String;
|
||||||
@@ -955,10 +995,9 @@ public abstract class app/revanced/patches/shared/misc/settings/preference/BaseP
|
|||||||
|
|
||||||
public abstract class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
public abstract class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getIcon ()Ljava/lang/String;
|
public final fun getIcon ()Ljava/lang/String;
|
||||||
public final fun getIconBold ()Ljava/lang/String;
|
|
||||||
public final fun getKey ()Ljava/lang/String;
|
public final fun getKey ()Ljava/lang/String;
|
||||||
public final fun getLayout ()Ljava/lang/String;
|
public final fun getLayout ()Ljava/lang/String;
|
||||||
public final fun getPreferences ()Ljava/util/Set;
|
public final fun getPreferences ()Ljava/util/Set;
|
||||||
@@ -967,8 +1006,8 @@ public abstract class app/revanced/patches/shared/misc/settings/preference/BaseP
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen : app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
public class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen : app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
||||||
public fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;)V
|
public fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;)V
|
||||||
public synthetic fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun addPreferences ([Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;)V
|
public final fun addPreferences ([Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;)V
|
||||||
public final fun getCategories ()Ljava/util/Set;
|
public final fun getCategories ()Ljava/util/Set;
|
||||||
public synthetic fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;
|
public synthetic fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;
|
||||||
@@ -976,8 +1015,8 @@ public class app/revanced/patches/shared/misc/settings/preference/BasePreference
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen$Category : app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
public class app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen$Category : app/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$BasePreferenceCollection {
|
||||||
public fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)V
|
public fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)V
|
||||||
public synthetic fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun addPreferences ([Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;)V
|
public final fun addPreferences ([Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;)V
|
||||||
public synthetic fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;
|
public synthetic fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreference;
|
||||||
public fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/PreferenceCategory;
|
public fun transform ()Lapp/revanced/patches/shared/misc/settings/preference/PreferenceCategory;
|
||||||
@@ -996,8 +1035,8 @@ public final class app/revanced/patches/shared/misc/settings/preference/InputTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/settings/preference/IntentPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public final class app/revanced/patches/shared/misc/settings/preference/IntentPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
public final fun getIntent ()Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;
|
public final fun getIntent ()Lapp/revanced/patches/shared/misc/settings/preference/IntentPreference$Intent;
|
||||||
public fun hashCode ()I
|
public fun hashCode ()I
|
||||||
@@ -1027,22 +1066,22 @@ public final class app/revanced/patches/shared/misc/settings/preference/ListPref
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/settings/preference/NonInteractivePreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public final class app/revanced/patches/shared/misc/settings/preference/NonInteractivePreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getSelectable ()Z
|
public final fun getSelectable ()Z
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class app/revanced/patches/shared/misc/settings/preference/PreferenceCategory : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public class app/revanced/patches/shared/misc/settings/preference/PreferenceCategory : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getPreferences ()Ljava/util/Set;
|
public final fun getPreferences ()Ljava/util/Set;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class app/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public class app/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/PreferenceScreenPreference$Sorting;Ljava/lang/String;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getPreferences ()Ljava/util/Set;
|
public final fun getPreferences ()Ljava/util/Set;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
@@ -1070,8 +1109,8 @@ public final class app/revanced/patches/shared/misc/settings/preference/SummaryT
|
|||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/settings/preference/SwitchPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public final class app/revanced/patches/shared/misc/settings/preference/SwitchPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getSummaryOffKey ()Ljava/lang/String;
|
public final fun getSummaryOffKey ()Ljava/lang/String;
|
||||||
public final fun getSummaryOnKey ()Ljava/lang/String;
|
public final fun getSummaryOnKey ()Ljava/lang/String;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
@@ -1079,8 +1118,8 @@ public final class app/revanced/patches/shared/misc/settings/preference/SwitchPr
|
|||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/settings/preference/TextPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
public final class app/revanced/patches/shared/misc/settings/preference/TextPreference : app/revanced/patches/shared/misc/settings/preference/BasePreference {
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/InputType;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/InputType;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/InputType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patches/shared/misc/settings/preference/InputType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getInputType ()Lapp/revanced/patches/shared/misc/settings/preference/InputType;
|
public final fun getInputType ()Lapp/revanced/patches/shared/misc/settings/preference/InputType;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
@@ -1117,14 +1156,34 @@ public final class app/revanced/patches/soundcloud/offlinesync/EnableOfflineSync
|
|||||||
public static final fun getEnableOfflineSync ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getEnableOfflineSync ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/layout/hide/createbutton/HideCreateButtonPatchKt {
|
||||||
|
public static final fun getHideCreateButtonPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/spotify/layout/theme/CustomThemePatchKt {
|
public final class app/revanced/patches/spotify/layout/theme/CustomThemePatchKt {
|
||||||
public static final fun getCustomThemePatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getCustomThemePatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/lite/ondemand/OnDemandPatchKt {
|
||||||
|
public static final fun getOnDemandPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/spotify/misc/extension/ExtensionPatchKt {
|
public final class app/revanced/patches/spotify/misc/extension/ExtensionPatchKt {
|
||||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/misc/fix/SpoofClientPatchKt {
|
||||||
|
public static final fun getSpoofClientPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/misc/fix/SpoofPackageInfoPatchKt {
|
||||||
|
public static final fun getSpoofPackageInfoPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/misc/fix/SpoofSignaturePatchKt {
|
||||||
|
public static final fun getSpoofSignaturePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatchKt {
|
public final class app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatchKt {
|
||||||
public static final fun getFixFacebookLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFixFacebookLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1141,6 +1200,10 @@ public final class app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunch
|
|||||||
public static final fun getFixThirdPartyLaunchersWidgets ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFixThirdPartyLaunchersWidgets ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/navbar/PremiumNavbarTabPatchKt {
|
||||||
|
public static final fun getPremiumNavbarTabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/stocard/layout/HideOffersTabPatchKt {
|
public final class app/revanced/patches/stocard/layout/HideOffersTabPatchKt {
|
||||||
public static final fun getHideOffersTabPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getHideOffersTabPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
@@ -1149,14 +1212,34 @@ public final class app/revanced/patches/stocard/layout/HideStoryBubblesPatchKt {
|
|||||||
public static final fun getHideStoryBubblesPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getHideStoryBubblesPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/groupkudos/AddGiveGroupKudosButtonToGroupActivityKt {
|
||||||
|
public static final fun getAddGiveGroupKudosButtonToGroupActivity ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/media/download/AddMediaDownloadPatchKt {
|
||||||
|
public static final fun getAddMediaDownloadPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/media/upload/OverwriteMediaUploadParametersPatchKt {
|
||||||
|
public static final fun getOverwriteMediaUploadParametersPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/misc/extension/SharedExtensionPatchKt {
|
||||||
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/strava/password/EnablePasswordLoginPatchKt {
|
public final class app/revanced/patches/strava/password/EnablePasswordLoginPatchKt {
|
||||||
public static final fun getEnablePasswordLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getEnablePasswordLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/strava/snowplow/BlockSnowplowTrackingPatchKt {
|
public final class app/revanced/patches/strava/privacy/BlockSnowplowTrackingPatchKt {
|
||||||
public static final fun getBlockSnowplowTrackingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getBlockSnowplowTrackingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/quickedit/DisableQuickEditPatchKt {
|
||||||
|
public static final fun getDisableQuickEditPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatchKt {
|
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatchKt {
|
||||||
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1365,6 +1448,10 @@ public final class app/revanced/patches/twitter/misc/links/ChangeLinkSharingDoma
|
|||||||
public static final fun getChangeLinkSharingDomainPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getChangeLinkSharingDomainPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/twitter/misc/links/OpenLinksWithAppChooserPatchKt {
|
||||||
|
public static final fun getOpenLinksWithAppChooserPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatchKt {
|
public final class app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatchKt {
|
||||||
public static final fun getSanitizeSharingLinksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSanitizeSharingLinksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1377,6 +1464,10 @@ public final class app/revanced/patches/viber/misc/navbar/HideNavigationButtonsK
|
|||||||
public static final fun getHideNavigationButtonsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideNavigationButtonsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/vsco/misc/pro/UnlockProPatchKt {
|
||||||
|
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/warnwetter/misc/firebasegetcert/FirebaseGetCertPatchKt {
|
public final class app/revanced/patches/warnwetter/misc/firebasegetcert/FirebaseGetCertPatchKt {
|
||||||
public static final fun getFirebaseGetCertPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFirebaseGetCertPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1385,6 +1476,10 @@ public final class app/revanced/patches/warnwetter/misc/promocode/PromoCodeUnloc
|
|||||||
public static final fun getPromoCodeUnlockPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getPromoCodeUnlockPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/windyapp/misc/unlockpro/UnlockProPatchKt {
|
||||||
|
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/ad/general/HideAdsPatchKt {
|
public final class app/revanced/patches/youtube/ad/general/HideAdsPatchKt {
|
||||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1406,6 +1501,7 @@ public final class app/revanced/patches/youtube/interaction/dialog/RemoveViewerD
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatchKt {
|
public final class app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatchKt {
|
||||||
|
public static final fun getDisableChapterSkipDoubleTapPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun getDisableDoubleTapActionsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableDoubleTapActionsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1482,7 +1578,15 @@ public final class app/revanced/patches/youtube/layout/hide/fullscreenambientmod
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatchKt {
|
public final class app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatchKt {
|
||||||
|
public static final fun getAlbumCardId ()J
|
||||||
|
public static final fun getBarContainerHeightId ()J
|
||||||
|
public static final fun getCrowdfundingBoxId ()J
|
||||||
|
public static final fun getExpandButtonDownId ()J
|
||||||
|
public static final fun getFabButtonId ()J
|
||||||
|
public static final fun getFilterBarHeightId ()J
|
||||||
public static final fun getHideLayoutComponentsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideLayoutComponentsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
public static final fun getRelatedChipCloudMarginId ()J
|
||||||
|
public static final fun getYouTubeLogo ()J
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatchKt {
|
public final class app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatchKt {
|
||||||
@@ -1501,6 +1605,10 @@ public final class app/revanced/patches/youtube/layout/hide/rollingnumber/Disabl
|
|||||||
public static final fun getDisableRollingNumberAnimationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableRollingNumberAnimationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatchKt {
|
||||||
|
public static final fun getHideSeekbarPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatchKt {
|
public final class app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatchKt {
|
||||||
public static final fun getHideShortsComponentsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideShortsComponentsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1509,6 +1617,10 @@ public final class app/revanced/patches/youtube/layout/hide/signintotvpopup/Disa
|
|||||||
public static final fun getDisableSignInToTvPopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableSignInToTvPopupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatchKt {
|
||||||
|
public static final fun getDisableSuggestedVideoEndScreenPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/hide/time/HideTimestampPatchKt {
|
public final class app/revanced/patches/youtube/layout/hide/time/HideTimestampPatchKt {
|
||||||
public static final fun getHideTimestampPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getHideTimestampPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1521,6 +1633,14 @@ public final class app/revanced/patches/youtube/layout/panels/popup/PlayerPopupP
|
|||||||
public static final fun getPlayerPopupPanelsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getPlayerPopupPanelsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatchKt {
|
||||||
|
public static final fun getPlayerControlsBackgroundPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenKt {
|
||||||
|
public static final fun getOpenVideosFullscreen ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatchKt {
|
public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatchKt {
|
||||||
public static final fun getOpenVideosFullscreenPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getOpenVideosFullscreenPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1575,6 +1695,15 @@ public final class app/revanced/patches/youtube/layout/startupshortsreset/Disabl
|
|||||||
public static final fun getDisableResumingShortsOnStartupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableResumingShortsOnStartupPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/tablet/EnableTabletLayoutPatchKt {
|
||||||
|
public static final fun getEnableTabletLayoutPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/layout/theme/LithoColorHookPatchKt {
|
||||||
|
public static final fun getLithoColorHookPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
public static final fun getLithoColorOverrideHook ()Lkotlin/jvm/functions/Function2;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/theme/ThemePatchKt {
|
public final class app/revanced/patches/youtube/layout/theme/ThemePatchKt {
|
||||||
public static final fun getThemePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getThemePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1591,6 +1720,14 @@ public final class app/revanced/patches/youtube/misc/announcements/Announcements
|
|||||||
public static final fun getAnnouncementsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getAnnouncementsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/misc/audiofocus/PauseOnAudioInterruptPatchKt {
|
||||||
|
public static final fun getPauseOnAudioInterruptPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatchKt {
|
||||||
|
public static final fun getAutoRepeatPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatchKt {
|
public final class app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatchKt {
|
||||||
public static final fun getBackgroundPlaybackPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getBackgroundPlaybackPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1611,6 +1748,14 @@ public final class app/revanced/patches/youtube/misc/extension/SharedExtensionPa
|
|||||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/misc/fix/playback/SpoofVideoStreamsPatchKt {
|
||||||
|
public static final fun getSpoofVideoStreamsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/misc/fix/playback/UserAgentClientSpoofPatchKt {
|
||||||
|
public static final fun getUserAgentClientSpoofPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/fix/playbackspeed/FIxPlaybackSpeedWhilePlayingPatchKt {
|
public final class app/revanced/patches/youtube/misc/fix/playbackspeed/FIxPlaybackSpeedWhilePlayingPatchKt {
|
||||||
public static final fun getFixPlaybackSpeedWhilePlayingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getFixPlaybackSpeedWhilePlayingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1662,6 +1807,7 @@ public final class app/revanced/patches/youtube/misc/playercontrols/PlayerContro
|
|||||||
public final class app/revanced/patches/youtube/misc/playercontrols/PlayerControlsPatchKt {
|
public final class app/revanced/patches/youtube/misc/playercontrols/PlayerControlsPatchKt {
|
||||||
public static final fun getAddBottomControl ()Lkotlin/jvm/functions/Function1;
|
public static final fun getAddBottomControl ()Lkotlin/jvm/functions/Function1;
|
||||||
public static final fun getPlayerControlsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getPlayerControlsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
public static final fun getPlayerControlsResourcePatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
public static final fun initializeBottomControl (Ljava/lang/String;)V
|
public static final fun initializeBottomControl (Ljava/lang/String;)V
|
||||||
public static final fun injectVisibilityCheckCall (Ljava/lang/String;)V
|
public static final fun injectVisibilityCheckCall (Ljava/lang/String;)V
|
||||||
}
|
}
|
||||||
@@ -1672,6 +1818,9 @@ public final class app/revanced/patches/youtube/misc/playertype/PlayerTypeHookPa
|
|||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPatchKt {
|
public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPatchKt {
|
||||||
public static final fun getVersionCheckPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getVersionCheckPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
|
public static final fun is_19_03_or_greater ()Z
|
||||||
|
public static final fun is_19_04_or_greater ()Z
|
||||||
|
public static final fun is_19_16_or_greater ()Z
|
||||||
public static final fun is_19_17_or_greater ()Z
|
public static final fun is_19_17_or_greater ()Z
|
||||||
public static final fun is_19_18_or_greater ()Z
|
public static final fun is_19_18_or_greater ()Z
|
||||||
public static final fun is_19_23_or_greater ()Z
|
public static final fun is_19_23_or_greater ()Z
|
||||||
@@ -1696,20 +1845,10 @@ public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPat
|
|||||||
public static final fun is_20_10_or_greater ()Z
|
public static final fun is_20_10_or_greater ()Z
|
||||||
public static final fun is_20_14_or_greater ()Z
|
public static final fun is_20_14_or_greater ()Z
|
||||||
public static final fun is_20_15_or_greater ()Z
|
public static final fun is_20_15_or_greater ()Z
|
||||||
public static final fun is_20_19_or_greater ()Z
|
}
|
||||||
public static final fun is_20_20_or_greater ()Z
|
|
||||||
public static final fun is_20_21_or_greater ()Z
|
public final class app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatchKt {
|
||||||
public static final fun is_20_22_or_greater ()Z
|
public static final fun getRemoveTrackingQueryParameterPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun is_20_26_or_greater ()Z
|
|
||||||
public static final fun is_20_28_or_greater ()Z
|
|
||||||
public static final fun is_20_30_or_greater ()Z
|
|
||||||
public static final fun is_20_31_or_greater ()Z
|
|
||||||
public static final fun is_20_34_or_greater ()Z
|
|
||||||
public static final fun is_20_37_or_greater ()Z
|
|
||||||
public static final fun is_20_39_or_greater ()Z
|
|
||||||
public static final fun is_20_41_or_greater ()Z
|
|
||||||
public static final fun is_20_45_or_greater ()Z
|
|
||||||
public static final fun is_20_46_or_greater ()Z
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/privacy/SanitizeSharingLinksPatchKt {
|
public final class app/revanced/patches/youtube/misc/privacy/SanitizeSharingLinksPatchKt {
|
||||||
@@ -1751,6 +1890,10 @@ public final class app/revanced/patches/youtube/misc/spoof/UserAgentClientSpoofP
|
|||||||
public static final fun getUserAgentClientSpoofPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getUserAgentClientSpoofPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/misc/zoomhaptics/ZoomHapticsPatchKt {
|
||||||
|
public static final fun getZoomHapticsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatchKt {
|
public final class app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatchKt {
|
||||||
public static final fun getForceOriginalAudioPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getForceOriginalAudioPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1759,6 +1902,10 @@ public final class app/revanced/patches/youtube/video/codecs/DisableVideoCodecsP
|
|||||||
public static final fun getDisableVideoCodecsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getDisableVideoCodecsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/video/hdr/DisableHdrPatchKt {
|
||||||
|
public static final fun getDisableHdrPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/video/information/VideoInformationPatchKt {
|
public final class app/revanced/patches/youtube/video/information/VideoInformationPatchKt {
|
||||||
public static final fun getVideoInformationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getVideoInformationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun userSelectedPlaybackSpeedHook (Ljava/lang/String;Ljava/lang/String;)V
|
public static final fun userSelectedPlaybackSpeedHook (Ljava/lang/String;Ljava/lang/String;)V
|
||||||
@@ -1815,6 +1962,14 @@ public final class app/revanced/patches/youtube/video/videoid/VideoIdPatchKt {
|
|||||||
public static final fun hookVideoId (Ljava/lang/String;)V
|
public static final fun hookVideoId (Ljava/lang/String;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatchKt {
|
||||||
|
public static final fun getRestoreOldVideoQualityMenuPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/yuka/misc/unlockpremium/UnlockPremiumPatchKt {
|
||||||
|
public static final fun getUnlockPremiumPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/util/BytecodeUtilsKt {
|
public final class app/revanced/util/BytecodeUtilsKt {
|
||||||
public static final fun addInstructionsAtControlFlowLabel (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;ILjava/lang/String;)V
|
public static final fun addInstructionsAtControlFlowLabel (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;ILjava/lang/String;)V
|
||||||
public static final fun addInstructionsAtControlFlowLabel (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;ILjava/lang/String;[Lapp/revanced/patcher/util/smali/ExternalLabel;)V
|
public static final fun addInstructionsAtControlFlowLabel (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;ILjava/lang/String;[Lapp/revanced/patcher/util/smali/ExternalLabel;)V
|
||||||
@@ -1872,7 +2027,6 @@ public final class app/revanced/util/BytecodeUtilsKt {
|
|||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;I)V
|
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;I)V
|
||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;J)V
|
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;J)V
|
||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/String;)V
|
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/String;)V
|
||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/Void;)V
|
|
||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;S)V
|
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;S)V
|
||||||
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Z)V
|
public static final fun returnEarly (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Z)V
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;B)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;B)V
|
||||||
@@ -1882,7 +2036,6 @@ public final class app/revanced/util/BytecodeUtilsKt {
|
|||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;I)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;I)V
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;J)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;J)V
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/String;)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/String;)V
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/Void;)V
|
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;S)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;S)V
|
||||||
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Z)V
|
public static final fun returnLate (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Z)V
|
||||||
public static final fun transformMethods (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;Lkotlin/jvm/functions/Function1;)V
|
public static final fun transformMethods (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;Lkotlin/jvm/functions/Function1;)V
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ patches {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
gradlePluginPortal()
|
|
||||||
google()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Required due to smali, or build fails. Can be removed once smali is bumped.
|
// Required due to smali, or build fails. Can be removed once smali is bumped.
|
||||||
implementation(libs.guava)
|
implementation(libs.guava)
|
||||||
@@ -56,12 +50,9 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "GitHubPackages"
|
name = "githubPackages"
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patches")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patches")
|
||||||
credentials {
|
credentials(PasswordCredentials::class)
|
||||||
username = System.getenv("GITHUB_ACTOR")
|
|
||||||
password = System.getenv("GITHUB_TOKEN")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.all.misc.adb
|
package app.revanced.patches.all.misc.adb
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.all.misc.transformation.transformInstructionsPatch
|
import app.revanced.patches.all.misc.transformation.transformInstructionsPatch
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.all.misc.build
|
package app.revanced.patches.all.misc.build
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.all.misc.transformation.transformInstructionsPatch
|
import app.revanced.patches.all.misc.transformation.transformInstructionsPatch
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user