You've already forked revanced-integrations
mirror of
https://github.com/revanced/revanced-integrations
synced 2025-11-19 03:23:27 +01:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d300cf0888 | ||
|
|
95b9406701 | ||
|
|
ac9e239b16 | ||
|
|
ad1e42eb01 | ||
|
|
669cb295a1 | ||
|
|
2c2bdf6186 | ||
|
|
8a0029c81c | ||
|
|
636fae622a | ||
|
|
56eaef0670 | ||
|
|
9a5ed589d8 | ||
|
|
e2d962355c | ||
|
|
5ff47b7fcc | ||
|
|
577a7348fe | ||
|
|
feab35e76c | ||
|
|
ea581d48e2 | ||
|
|
51016efcb7 | ||
|
|
530949657f | ||
|
|
7314032a38 | ||
|
|
134d7e33bd | ||
|
|
fcabebf3a7 | ||
|
|
376ffc0844 | ||
|
|
7de199421c | ||
|
|
e2a1bb7ce8 | ||
|
|
391ce64c25 | ||
|
|
f346ed6122 | ||
|
|
4d12729306 | ||
|
|
9a8ddc9ca6 | ||
|
|
fabc4e0548 | ||
|
|
7f64a8bcab | ||
|
|
1f29541aa7 | ||
|
|
605124bc60 | ||
|
|
f74a11523f | ||
|
|
bf7f138615 | ||
|
|
f29c608808 | ||
|
|
7da963cf8e | ||
|
|
d7161938f3 | ||
|
|
b944f6bd59 | ||
|
|
eb41894d0a | ||
|
|
1dcbed7eaf | ||
|
|
7c559bb13c | ||
|
|
fe8f7cb62f | ||
|
|
9c981f7203 | ||
|
|
ada1ac160c | ||
|
|
0476299570 | ||
|
|
7bd3b07559 | ||
|
|
4e27c9f88c | ||
|
|
a1ecb48442 | ||
|
|
3c0408fa09 | ||
|
|
2710d50f66 | ||
|
|
6c42c7588d | ||
|
|
ecb708898e | ||
|
|
b55cd0153c | ||
|
|
382c6aa36f | ||
|
|
20310146dd | ||
|
|
0ce6aa854c | ||
|
|
3a2655b38b | ||
|
|
7fe30d550e | ||
|
|
cfb4132ed1 | ||
|
|
7a9c61b71b | ||
|
|
aecafc5380 | ||
|
|
d9268bc0fa | ||
|
|
9b1dce42ed | ||
|
|
0938f6c59f | ||
|
|
a2bb4a5f03 | ||
|
|
773357d6e6 | ||
|
|
d26b9339fb | ||
|
|
61ed39722e | ||
|
|
54baa3c2e5 | ||
|
|
5dd10f6978 | ||
|
|
9bf804219e | ||
|
|
d7631f371b | ||
|
|
a30776f69f | ||
|
|
dcfcc36fb8 | ||
|
|
8ff5f0e68d | ||
|
|
468c72e2a5 | ||
|
|
94c2c9d6e6 | ||
|
|
40857b1b34 | ||
|
|
a96bbe6469 | ||
|
|
4fd2abc409 | ||
|
|
d007deedd2 | ||
|
|
a27ec45be8 | ||
|
|
8fb1a251a2 | ||
|
|
30724583e3 |
25
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report on the integrations. Do not submit suggestions for patches
|
||||
here.
|
||||
title: 'problem: some problem'
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 🐞 Issue
|
||||
|
||||
<!-- Describe your issue in detail here -->
|
||||
|
||||
## ⚙ Reproduce
|
||||
|
||||
<!-- Include your environment and steps to reproduce the issue as detailed as possible -->
|
||||
|
||||
## 🛠 Solution
|
||||
|
||||
<!-- If applicable, add a possible solution -->
|
||||
|
||||
## ⚠ Additional context
|
||||
|
||||
<!-- Add any other context about the problem here -->
|
||||
25
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a change on the integrations. Do not submit suggestions for patches
|
||||
here.
|
||||
title: 'feat: some feature'
|
||||
labels: feature-request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 🐞 Issue
|
||||
|
||||
<!-- Explain here, what the current problem is and why it leads you to request a feature change -->
|
||||
|
||||
## ❗ Solution
|
||||
|
||||
<!-- Explain how your current issue can be solved -->
|
||||
|
||||
## ❓ Motivation
|
||||
|
||||
<!-- Explain why your feature should be considered -->
|
||||
|
||||
## ⚠ Additional context
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here -->
|
||||
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@@ -1,12 +1,15 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -16,34 +19,22 @@ jobs:
|
||||
uses: styfle/cancel-workflow-action@0.9.0
|
||||
with:
|
||||
access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew --no-daemon build
|
||||
|
||||
- name: Github Tag Bump
|
||||
uses: anothrNick/github-tag-action@1.39.0
|
||||
- name: Setup semantic-release
|
||||
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WITH_V: true
|
||||
id: bump_version
|
||||
|
||||
- name: Upload APKs to Release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./app/build/outputs/apk/release/*.apk
|
||||
tag: ${{ steps.bump_version.outputs.new_tag }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file_glob: true
|
||||
run: npx semantic-release
|
||||
38
.releaserc
Normal file
38
.releaserc
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"branches": [
|
||||
"main",
|
||||
{
|
||||
"name": "dev",
|
||||
"prerelease": true
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
["@semantic-release/commit-analyzer", {
|
||||
"releaseRules": [
|
||||
{"type": "build", "release": "patch"}
|
||||
]
|
||||
}],
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"gradle-semantic-release-plugin",
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": [
|
||||
"CHANGELOG.md",
|
||||
"gradle.properties"
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
"assets": [
|
||||
{
|
||||
"path": "app/build/outputs/apk/release/*.apk"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
161
CHANGELOG.md
Normal file
161
CHANGELOG.md
Normal file
@@ -0,0 +1,161 @@
|
||||
## [0.24.2](https://github.com/revanced/revanced-integrations/compare/v0.24.1...v0.24.2) (2022-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* set debug to false by default ([95b9406](https://github.com/revanced/revanced-integrations/commit/95b940670190c155ba14b1f0a56db3647201e601))
|
||||
|
||||
## [0.24.1](https://github.com/revanced/revanced-integrations/compare/v0.24.0...v0.24.1) (2022-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `swipe-controls` with active engagement panel ([#82](https://github.com/revanced/revanced-integrations/issues/82)) ([669cb29](https://github.com/revanced/revanced-integrations/commit/669cb295a1621d2da2ee2b4a5801228a3e2e62ff))
|
||||
|
||||
# [0.24.0](https://github.com/revanced/revanced-integrations/compare/v0.23.2...v0.24.0) (2022-07-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `force-vp9-codec` integrations ([#76](https://github.com/revanced/revanced-integrations/issues/76)) ([8a0029c](https://github.com/revanced/revanced-integrations/commit/8a0029c81cfd29788b1d556cdd31feacc152b3c1))
|
||||
|
||||
## [0.23.2](https://github.com/revanced/revanced-integrations/compare/v0.23.1...v0.23.2) (2022-07-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* untangle RYD from SB. fixes [#79](https://github.com/revanced/revanced-integrations/issues/79) ([56eaef0](https://github.com/revanced/revanced-integrations/commit/56eaef0670121cd262de51862c8d23fd34724999))
|
||||
|
||||
## [0.23.1](https://github.com/revanced/revanced-integrations/compare/v0.23.0...v0.23.1) (2022-07-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* crash when buffer value is less than 1 ([e2d9623](https://github.com/revanced/revanced-integrations/commit/e2d962355cf34dccfd233f65f475acbb8b895694))
|
||||
|
||||
# [0.23.0](https://github.com/revanced/revanced-integrations/compare/v0.22.1...v0.23.0) (2022-07-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* use `getLong` instead of `getFloat` ([577a734](https://github.com/revanced/revanced-integrations/commit/577a7348fe023aba4858cceb0830062ee0a653d1))
|
||||
* wrong description for issue templates ([ea581d4](https://github.com/revanced/revanced-integrations/commit/ea581d48e29b3f40d12e82448788a1151d4892d1))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* added issue templates. ([#77](https://github.com/revanced/revanced-integrations/issues/77)) ([51016ef](https://github.com/revanced/revanced-integrations/commit/51016efcb7c7fcc73f25ecfab48ffa96fbae4f47))
|
||||
|
||||
## [0.22.1](https://github.com/revanced/revanced-integrations/compare/v0.22.0...v0.22.1) (2022-07-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `hdr-auto-brightness` patch ([#74](https://github.com/revanced/revanced-integrations/issues/74)) ([7314032](https://github.com/revanced/revanced-integrations/commit/7314032a38f2c70f4e56326b592c5a01be218f88))
|
||||
|
||||
# [0.22.0](https://github.com/revanced/revanced-integrations/compare/v0.21.9...v0.22.0) (2022-07-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `swipe-controls` rewrite ([#64](https://github.com/revanced/revanced-integrations/issues/64)) ([fcabebf](https://github.com/revanced/revanced-integrations/commit/fcabebf3a74fd517e7ac72d3231cb68fad37b8cd))
|
||||
|
||||
## [0.21.9](https://github.com/revanced/revanced-integrations/compare/v0.21.8...v0.21.9) (2022-07-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove int argument from buffer functions ([#71](https://github.com/revanced/revanced-integrations/issues/71)) ([7de1994](https://github.com/revanced/revanced-integrations/commit/7de199421c37b3fd77488f60bbd5d492e3bd810e))
|
||||
|
||||
## [0.21.8](https://github.com/revanced/revanced-integrations/compare/v0.21.7...v0.21.8) (2022-07-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Block some more movies in adblocker ([#69](https://github.com/revanced/revanced-integrations/issues/69)) ([391ce64](https://github.com/revanced/revanced-integrations/commit/391ce64c252cf6fa858b26334dd4563b42672f67))
|
||||
|
||||
## [0.21.7](https://github.com/revanced/revanced-integrations/compare/v0.21.6...v0.21.7) (2022-07-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* enable wide-search-bar by default ([#67](https://github.com/revanced/revanced-integrations/issues/67)) ([fabc4e0](https://github.com/revanced/revanced-integrations/commit/fabc4e0548faa3a8d4d2a894a9f452a770b8bbb7))
|
||||
|
||||
## [0.21.6](https://github.com/revanced/revanced-integrations/compare/v0.21.5...v0.21.6) (2022-07-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* use Log.d for debugging ([#66](https://github.com/revanced/revanced-integrations/issues/66)) ([605124b](https://github.com/revanced/revanced-integrations/commit/605124bc607952eb91e57c2b3e3594fb62464534))
|
||||
|
||||
## [0.21.5](https://github.com/revanced/revanced-integrations/compare/v0.21.4...v0.21.5) (2022-07-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* don't enable debug log by default ([bf7f138](https://github.com/revanced/revanced-integrations/commit/bf7f138615fed0e336174559282ed1a058646985))
|
||||
|
||||
## [0.21.4](https://github.com/revanced/revanced-integrations/compare/v0.21.3...v0.21.4) (2022-07-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* change overlay time of swipe-controls ([#60](https://github.com/revanced/revanced-integrations/issues/60)) ([7da963c](https://github.com/revanced/revanced-integrations/commit/7da963cf8ebdf25e7498b4a2fc9a76c9f8c59bad))
|
||||
|
||||
## [0.21.3](https://github.com/revanced/revanced-integrations/compare/v0.21.2...v0.21.3) (2022-07-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Reduce padding DPI for swipe zones ([b944f6b](https://github.com/revanced/revanced-integrations/commit/b944f6bd5928c42658987e7dbbc56feb404e2a76))
|
||||
|
||||
## [0.21.2](https://github.com/revanced/revanced-integrations/compare/v0.21.1...v0.21.2) (2022-07-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove long-press from swipe-controls ([7c559bb](https://github.com/revanced/revanced-integrations/commit/7c559bb13c6c5c0292a67bf2c0fdf4d5f8b04823))
|
||||
|
||||
## [0.21.1](https://github.com/revanced/revanced-integrations/compare/v0.21.0...v0.21.1) (2022-07-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix build not creating new release ([9c981f7](https://github.com/revanced/revanced-integrations/commit/9c981f72034a6e8c20df764ee19428ca4306a183))
|
||||
|
||||
# [0.21.0](https://github.com/revanced/revanced-integrations/compare/v0.20.1...v0.21.0) (2022-07-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `swipe-controls` ([#50](https://github.com/revanced/revanced-integrations/issues/50)) ([4e27c9f](https://github.com/revanced/revanced-integrations/commit/4e27c9f88c4fe9381e1ba1833da1252828a1627e))
|
||||
|
||||
## [0.20.1](https://github.com/revanced/revanced-integrations/compare/v0.20.0...v0.20.1) (2022-07-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix NPE when opening video from different App ([#53](https://github.com/revanced/revanced-integrations/issues/53)) ([3c0408f](https://github.com/revanced/revanced-integrations/commit/3c0408fa09793cbab335065c323ec57eb2a591d2))
|
||||
|
||||
# [0.20.0](https://github.com/revanced/revanced-integrations/compare/v0.19.1...v0.20.0) (2022-07-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* block suggestions ([#46](https://github.com/revanced/revanced-integrations/issues/46)) ([ecb7088](https://github.com/revanced/revanced-integrations/commit/ecb708898e62adb02efe3650fbc85cd2b5cece95))
|
||||
|
||||
## [0.19.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1) (2022-07-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing dummy task `publish` ([3a2655b](https://github.com/revanced/revanced-integrations/commit/3a2655b38b7e2994ece550ccefadbc70a31f7fa4))
|
||||
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([0ce6aa8](https://github.com/revanced/revanced-integrations/commit/0ce6aa854ce6248c5eb37b1207023f4127a137be))
|
||||
|
||||
## [0.19.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1-dev.1) (2022-07-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing dummy task `publish` ([3a2655b](https://github.com/revanced/revanced-integrations/commit/3a2655b38b7e2994ece550ccefadbc70a31f7fa4))
|
||||
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([b2d08e9](https://github.com/revanced/revanced-integrations/commit/b2d08e9e9fbb1df69ceb5234d3f092027904c1e1))
|
||||
@@ -1 +1,9 @@
|
||||
# ReVanced Integrations
|
||||
|
||||
# How to use debugging:
|
||||
- Include the enable-debugging patch
|
||||
- Set ```DEBUG_BOOLEAN("revanced_debug_enabled", false),``` to ```true```
|
||||
- Usage on Windows: ```adb logcat | findstr "ReVanced" > log.txt```
|
||||
- Usage on Linux: ```adb logcat | grep --line-buffered "ReVanced" > log.txt```
|
||||
|
||||
This will write the log to a file called log.txt which you can view then.
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
namespace 'app.revanced.integrations'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "revanced.integrationspp"
|
||||
applicationId "app.revanced.integrations"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 31
|
||||
targetSdkVersion 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
multiDexEnabled false
|
||||
@@ -26,13 +28,13 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.annotation:annotation:1.3.0'
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
||||
compileOnly 'androidx.annotation:annotation:1.4.0'
|
||||
compileOnly 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="vanced.integrations">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package app.revanced.integrations;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
public class Globals {
|
||||
public static Context context;
|
||||
|
||||
public static Context getAppContext() {
|
||||
if (context != null) {
|
||||
return context;
|
||||
}
|
||||
Log.e("Globals", "Context is null!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package app.revanced.integrations.adremover;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Toolbar;
|
||||
|
||||
import app.revanced.integrations.patches.HideShortsButtonPatch;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
public class AdRemoverAPI {
|
||||
|
||||
/**
|
||||
* Removes Reels and Home ads
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
//ToDo: refactor this
|
||||
public static void HideViewWithLayout1dp(View view) {
|
||||
if (view instanceof LinearLayout) {
|
||||
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(1, 1);
|
||||
view.setLayoutParams(layoutParams);
|
||||
} else if (view instanceof FrameLayout) {
|
||||
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(1, 1);
|
||||
view.setLayoutParams(layoutParams2);
|
||||
} else if (view instanceof RelativeLayout) {
|
||||
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(1, 1);
|
||||
view.setLayoutParams(layoutParams3);
|
||||
} else if (view instanceof Toolbar) {
|
||||
Toolbar.LayoutParams layoutParams4 = new Toolbar.LayoutParams(1, 1);
|
||||
view.setLayoutParams(layoutParams4);
|
||||
} else if (view instanceof ViewGroup) {
|
||||
ViewGroup.LayoutParams layoutParams5 = new ViewGroup.LayoutParams(1, 1);
|
||||
view.setLayoutParams(layoutParams5);
|
||||
} else {
|
||||
LogHelper.debug(AdRemoverAPI.class, "HideViewWithLayout1dp - Id: " + view.getId() + " Type: " + view.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class AutoRepeatPatch {
|
||||
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.autorepeat.patch.AutoRepeatPatch
|
||||
public static boolean shouldAutoRepeat() {
|
||||
return SettingsEnum.PREFERRED_AUTO_REPEAT.getBoolean();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class BrandingWaterMarkPatch {
|
||||
|
||||
//Used by: app.revanced.patches.youtube.layout.watermark.patch.HideWatermarkPatch
|
||||
public static boolean isBrandingWatermarkShown() {
|
||||
return SettingsEnum.BRANDING_SHOWN.getBoolean();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class DisableAutoCaptions {
|
||||
|
||||
//ToDo: Write Patch for it
|
||||
public static boolean autoCaptionsEnabled() {
|
||||
return SettingsEnum.AUTO_CAPTIONS_ENABLED.getBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class ForceCodecPatch {
|
||||
|
||||
public static String getManufacturer() {
|
||||
return SettingsEnum.CODEC_OVERRIDE.getBoolean() ? "samsung" : Build.MANUFACTURER;
|
||||
}
|
||||
|
||||
public static String getModel() {
|
||||
return SettingsEnum.CODEC_OVERRIDE.getBoolean() ? "SM-G920F" : Build.MODEL;
|
||||
}
|
||||
|
||||
public static boolean shouldForceVP9() {
|
||||
return SettingsEnum.CODEC_OVERRIDE.getBoolean();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
public class GeneralBytecodeAdsPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.ad.general.bytecode.patch.GeneralBytecodeAdsPatch
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public static boolean containsAd(String value, ByteBuffer buffer) {
|
||||
return containsLithoAd(value, buffer);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
private static boolean containsLithoAd(String value, ByteBuffer buffer) {
|
||||
boolean enabled = false;
|
||||
for (SettingsEnum setting : SettingsEnum.getAdRemovalSettings()) {
|
||||
if (setting.getBoolean()) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (value == null || value.isEmpty() || !enabled) return false;
|
||||
LogHelper.debug(GeneralBytecodeAdsPatch.class, "Searching for AD: " + value);
|
||||
|
||||
List<String> blockList = new ArrayList<>();
|
||||
List<String> bufferBlockList = new ArrayList<>();
|
||||
|
||||
if (SettingsEnum.ADREMOVER_AD_REMOVAL.getBoolean()) {
|
||||
blockList.add("_ad");
|
||||
blockList.add("ad_badge");
|
||||
blockList.add("ads_video_with_context");
|
||||
blockList.add("cell_divider");
|
||||
blockList.add("reels_player_overlay");
|
||||
blockList.add("shelf_header");
|
||||
blockList.add("text_search_ad_with_description_first");
|
||||
blockList.add("watch_metadata_app_promo");
|
||||
|
||||
bufferBlockList.add("ad_cpn");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_SUGGESTED_FOR_YOU_REMOVAL.getBoolean()) {
|
||||
bufferBlockList.add("watch-vrecH");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_MOVIE_REMOVAL.getBoolean()) {
|
||||
blockList.add("browsy_bar");
|
||||
blockList.add("compact_movie");
|
||||
blockList.add("horizontal_movie_shelf");
|
||||
blockList.add("movie_and_show_upsell_card");
|
||||
|
||||
bufferBlockList.add("YouTube Movies");
|
||||
}
|
||||
if (containsAny(value, "home_video_with_context", "related_video_with_context") &&
|
||||
bufferBlockList.stream().anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains)
|
||||
) return true;
|
||||
|
||||
if (SettingsEnum.ADREMOVER_COMMENTS_REMOVAL.getBoolean()) {
|
||||
blockList.add("comments_");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_COMMUNITY_GUIDELINES.getBoolean()) {
|
||||
blockList.add("community_guidelines");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_COMPACT_BANNER_REMOVAL.getBoolean()) {
|
||||
blockList.add("compact_banner");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_EMERGENCY_BOX_REMOVAL.getBoolean()) {
|
||||
blockList.add("emergency_onebox");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_FEED_SURVEY_REMOVAL.getBoolean()) {
|
||||
blockList.add("in_feed_survey");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_MEDICAL_PANEL_REMOVAL.getBoolean()) {
|
||||
blockList.add("medical_panel");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_PAID_CONTECT_REMOVAL.getBoolean()) {
|
||||
blockList.add("paid_content_overlay");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_COMMUNITY_POSTS_REMOVAL.getBoolean()) {
|
||||
blockList.add("post_base_wrapper");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_MERCHANDISE_REMOVAL.getBoolean()) {
|
||||
blockList.add("product_carousel");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_SHORTS_SHELF.getBoolean()) {
|
||||
blockList.add("shorts_shelf");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_INFO_PANEL_REMOVAL.getBoolean()) {
|
||||
blockList.add("publisher_transparency_panel");
|
||||
blockList.add("single_item_information_panel");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_HIDE_SUGGESTIONS.getBoolean()) {
|
||||
blockList.add("horizontal_video_shelf");
|
||||
}
|
||||
if (SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS.getBoolean()) {
|
||||
blockList.add("post_shelf");
|
||||
}
|
||||
|
||||
if (containsAny(value,
|
||||
"home_video_with_context",
|
||||
"related_video_with_context",
|
||||
"search_video_with_context",
|
||||
"menu",
|
||||
"root",
|
||||
"-count",
|
||||
"-space",
|
||||
"-button"
|
||||
)) return false;
|
||||
|
||||
if (blockList.stream().anyMatch(value::contains)) {
|
||||
LogHelper.debug(GeneralBytecodeAdsPatch.class, "Blocking ad: " + value);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (SettingsEnum.DEBUG.getBoolean()) {
|
||||
if (value.contains("related_video_with_context")) {
|
||||
LogHelper.debug(GeneralBytecodeAdsPatch.class, value + " | " + bytesToHex(buffer.array()));
|
||||
return false;
|
||||
}
|
||||
LogHelper.debug(GeneralBytecodeAdsPatch.class, value + " returns false.");
|
||||
}
|
||||
return false;
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(GeneralBytecodeAdsPatch.class, ex.getMessage(), ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean containsAny(String value, String... targets) {
|
||||
for (String string : targets)
|
||||
if (value.contains(string)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static String bytesToHex(byte[] bytes) {
|
||||
StringBuilder builder = new StringBuilder(bytes.length * 2);
|
||||
for (byte b : bytes)
|
||||
builder.append(String.format("%02x", b));
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.WindowManager;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.swipecontrols.views.SwipeControlsHostLayout;
|
||||
|
||||
/**
|
||||
* Patch class for 'hdr-max-brightness' patch
|
||||
*
|
||||
* @usedBy app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch
|
||||
* @smali app/revanced/integrations/patches/HDRMaxBrightnessPatch
|
||||
*/
|
||||
public class HDRMaxBrightnessPatch {
|
||||
/**
|
||||
* get brightness override for HDR brightness
|
||||
*
|
||||
* @param original brightness youtube would normally set
|
||||
* @return brightness to set on HRD video
|
||||
* @smali getHDRBrightness(F)F
|
||||
*/
|
||||
public static float getHDRBrightness(float original) {
|
||||
// do nothing if disabled
|
||||
if (!SettingsEnum.USE_HDR_AUTO_BRIGHTNESS.getBoolean()) {
|
||||
return original;
|
||||
}
|
||||
|
||||
// override with brightness set by swipe-controls
|
||||
// only when swipe-controls is active and has overridden the brightness
|
||||
final SwipeControlsHostLayout swipeControlsHost = SwipeControlsPatch.CURRENT_HOST.get();
|
||||
if (swipeControlsHost != null
|
||||
&& swipeControlsHost.getScreen() != null
|
||||
&& swipeControlsHost.getConfig().getEnableBrightnessControl()
|
||||
&& !swipeControlsHost.getScreen().isDefaultBrightness()) {
|
||||
return swipeControlsHost.getScreen().getRawScreenBrightness();
|
||||
}
|
||||
|
||||
// otherwise, set the brightness to auto
|
||||
return WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class HideCastButtonPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.castbutton.patch.HideCastButonPatch
|
||||
public static int getCastButtonOverrideV2(int original) {
|
||||
return SettingsEnum.CAST_BUTTON_SHOWN.getBoolean() ? original : View.GONE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
public class HideCreateButtonPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.createbutton.patch.CreateButtonRemoverPatch
|
||||
public static void hideCreateButton(View view) {
|
||||
boolean show = SettingsEnum.CREATE_BUTTON_SHOWN.getBoolean();
|
||||
String message = show ? "Create button: Shown" : "Create button: Hidden";
|
||||
LogHelper.debug(HideCreateButtonPatch.class, message);
|
||||
view.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class HideHomeAdsPatch {
|
||||
|
||||
/**
|
||||
* Used by package app.revanced.extensions.Extensions
|
||||
* @param view
|
||||
*/
|
||||
public static void HideHomeAds(View view) {
|
||||
if (!SettingsEnum.HOME_ADS_SHOWN.getBoolean()) {
|
||||
AdRemoverAPI.HideViewWithLayout1dp(view);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class HideInfoCardSuggestionsPatch {
|
||||
|
||||
public static int hideInfoCardSuggestions() {
|
||||
return SettingsEnum.INFO_CARDS_SHOWN.getBoolean() ? View.VISIBLE : View.GONE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class HideReelsPatch {
|
||||
|
||||
/**
|
||||
* Used by app.revanced.patches.youtube.layout.reels.patch.HideReelsPatch
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
public static void HideReel(View view) {
|
||||
if (!SettingsEnum.REEL_BUTTON_SHOWN.getBoolean()) {
|
||||
AdRemoverAPI.HideViewWithLayout1dp(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
public class HideShortsButtonPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.shorts.button.patch.ShortsButtonRemoverPatch
|
||||
public static void hideShortsButton(View view) {
|
||||
if (lastPivotTab != null && lastPivotTab.name() == "TAB_SHORTS") {
|
||||
boolean show = SettingsEnum.SHORTS_BUTTON_SHOWN.getBoolean();
|
||||
String message = show ? "Shorts button: shown" : "Shorts button: hidden";
|
||||
LogHelper.debug(HideShortsButtonPatch.class, message);
|
||||
if (!show) {
|
||||
view.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Needed for the ShortsButtonRemoverPatch
|
||||
public static Enum lastPivotTab;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class MiniplayerOverridePatch {
|
||||
|
||||
//ToDo: Write Patch for it.
|
||||
//See https://drive.google.com/file/d/1G7jn2EdWgNls0Htgs-wPPjjObZL1emzK/view?usp=sharing
|
||||
//And https://drive.google.com/file/d/1-QlgSiKzqQ5lHXQnvRUpijk0GH9T1Sn7/view?usp=sharing
|
||||
// for where it needs to be used.
|
||||
public static boolean getTabletMiniplayerOverride() {
|
||||
return SettingsEnum.USE_TABLET_MINIPLAYER.getBoolean();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class NewActionbarPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.widesearchbar.patch.WideSearchbarPatch
|
||||
public static boolean getNewActionBar() {
|
||||
return SettingsEnum.USE_NEW_ACTIONBAR.getBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class OldStyleQualityPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.layout.oldqualitylayout.patch.OldQualityLayoutPatch
|
||||
public static boolean useOldStyleQualitySettings() {
|
||||
return SettingsEnum.OLD_STYLE_QUALITY_SETTINGS.getBoolean();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class OverrideCodecPatch {
|
||||
|
||||
//ToDo: Write Patch for it.
|
||||
//See https://drive.google.com/file/d/14d2R-5JF97gOZggoobVEVazPWbORbZVp/view?usp=sharing for where it needs to be used.
|
||||
public static boolean isOverrideCodedUsed() {
|
||||
return SettingsEnum.CODEC_OVERRIDE.getBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.integrations.shared.PlayerOverlays;
|
||||
|
||||
/**
|
||||
* Hook receiver class for 'player-overlays-hook' patch
|
||||
*
|
||||
* @usedBy app.revanced.patches.youtube.misc.playeroverlay.patch.PlayerOverlaysHookPatch
|
||||
* @smali Lapp/revanced/integrations/patches/PlayerOverlaysHookPatch;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerOverlaysHookPatch {
|
||||
/**
|
||||
* Hook into YouTubePlayerOverlaysLayout.onFinishInflate() method
|
||||
*
|
||||
* @param thisRef reference to the view
|
||||
* @smali YouTubePlayerOverlaysLayout_onFinishInflateHook(Ljava / lang / Object ;)V
|
||||
*/
|
||||
public static void YouTubePlayerOverlaysLayout_onFinishInflateHook(@Nullable Object thisRef) {
|
||||
if (thisRef == null) return;
|
||||
if (thisRef instanceof ViewGroup) {
|
||||
PlayerOverlays.attach((ViewGroup) thisRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import app.revanced.integrations.shared.PlayerType;
|
||||
|
||||
/**
|
||||
* Hook receiver class for 'player-type-hook' patch
|
||||
*
|
||||
* @usedBy app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
* @smali Lapp/revanced/integrations/patches/PlayerTypeHookPatch;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerTypeHookPatch {
|
||||
/**
|
||||
* Hook into YouTubePlayerOverlaysLayout.updatePlayerLayout() method
|
||||
*
|
||||
* @param type the new player type
|
||||
* @smali YouTubePlayerOverlaysLayout_updatePlayerTypeHookEX(Ljava/lang/Object;)V
|
||||
*/
|
||||
public static void YouTubePlayerOverlaysLayout_updatePlayerTypeHookEX(@Nullable Object type) {
|
||||
if (type == null) return;
|
||||
|
||||
// update current player type
|
||||
final PlayerType newType = PlayerType.safeParseFromString(type.toString());
|
||||
if (newType != null) {
|
||||
PlayerType.setCurrent(newType);
|
||||
LogHelper.debug(PlayerTypeHookPatch.class, "YouTubePlayerOverlaysLayout player type was updated to " + newType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class SeekbarTappingPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.interaction.seekbar.patch.EnableSeekbarTappingPatch
|
||||
public static boolean isTapSeekingEnabled() {
|
||||
return SettingsEnum.TAP_SEEKING_ENABLED.getBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import app.revanced.integrations.swipecontrols.views.SwipeControlsHostLayout;
|
||||
|
||||
/**
|
||||
* Hook receiver class for 'swipe-controls' patch
|
||||
*
|
||||
* @usedBy app.revanced.patches.youtube.interaction.swipecontrols.patch.SwipeControlsPatch
|
||||
* @smali Lapp/revanced/integrations/patches/SwipeControlsPatch;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class SwipeControlsPatch {
|
||||
|
||||
/**
|
||||
* the currently active swipe controls host.
|
||||
* the reference may be null!
|
||||
*/
|
||||
@NonNull
|
||||
public static WeakReference<SwipeControlsHostLayout> CURRENT_HOST = new WeakReference<>(null);
|
||||
|
||||
/**
|
||||
* Hook into the main activity lifecycle
|
||||
* (using onStart here, but really anything up until onResume should be fine)
|
||||
*
|
||||
* @param thisRef reference to the WatchWhileActivity instance
|
||||
* @smali WatchWhileActivity_onStartHookEX(Ljava / lang / Object ;)V
|
||||
*/
|
||||
public static void WatchWhileActivity_onStartHookEX(@Nullable Object thisRef) {
|
||||
if (thisRef == null) return;
|
||||
if (thisRef instanceof Activity) {
|
||||
SwipeControlsHostLayout swipeControlsHost = SwipeControlsHostLayout.attachTo((Activity) thisRef, false);
|
||||
CURRENT_HOST = new WeakReference<>(swipeControlsHost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.whitelist.Whitelist;
|
||||
|
||||
public class VideoAdsPatch {
|
||||
|
||||
//Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch
|
||||
//depends on Whitelist Patch. Still needs to be written
|
||||
public static boolean shouldShowAds() {
|
||||
return SettingsEnum.VIDEO_ADS_SHOWN.getBoolean() && Whitelist.shouldShowAds();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class VideoBufferPatch {
|
||||
|
||||
public static int getMaxBuffer() {
|
||||
int confVal = SettingsEnum.MAX_BUFFER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
public static int getPlaybackBuffer() {
|
||||
int confVal = SettingsEnum.PLAYBACK_MAX_BUFFER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
public static int getReBuffer() {
|
||||
int confVal = SettingsEnum.MAX_PLAYBACK_BUFFER_AFTER_REBUFFER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user