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
70 Commits
v0.108.1-d
...
v0.112.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e78ef6df9c | ||
|
|
f69492819e | ||
|
|
59850b2c04 | ||
|
|
cfc7081971 | ||
|
|
6f0248cc1a | ||
|
|
789e0c8bcb | ||
|
|
e783142741 | ||
|
|
dec7348203 | ||
|
|
7b61cc8567 | ||
|
|
b8b9edad64 | ||
|
|
be3955fee4 | ||
|
|
3da3ce9e9a | ||
|
|
ea7ee56276 | ||
|
|
8b01ca0c0e | ||
|
|
170685b920 | ||
|
|
f46cbaa3fe | ||
|
|
e9947fd66a | ||
|
|
d947de2e03 | ||
|
|
e9f797824e | ||
|
|
8afe82c0e0 | ||
|
|
bb9120ebae | ||
|
|
bc91b35994 | ||
|
|
f3f8026c1e | ||
|
|
12f3f97552 | ||
|
|
b4c0619abb | ||
|
|
328ecff18b | ||
|
|
40c07769e2 | ||
|
|
d7a3973ef1 | ||
|
|
db9b0e312d | ||
|
|
190481cb39 | ||
|
|
4f4a096318 | ||
|
|
be9c948ce6 | ||
|
|
4f66d05573 | ||
|
|
b47a214067 | ||
|
|
007eaa0729 | ||
|
|
80fb3a31dd | ||
|
|
4536133bdc | ||
|
|
56970b356a | ||
|
|
efc2b9b6a3 | ||
|
|
8d0d5f9659 | ||
|
|
bdce0298c4 | ||
|
|
e2fa445c3f | ||
|
|
9952581a32 | ||
|
|
4aab2a1af6 | ||
|
|
309cda8848 | ||
|
|
eb658298b8 | ||
|
|
add120348a | ||
|
|
0654c1b42e | ||
|
|
26b6d47101 | ||
|
|
fd86684f73 | ||
|
|
ccc93adae9 | ||
|
|
7eb209d853 | ||
|
|
aa72125317 | ||
|
|
b5a71a843e | ||
|
|
4c77e7f3f7 | ||
|
|
f951897944 | ||
|
|
b1aa59c882 | ||
|
|
1c3d0bed32 | ||
|
|
023ccbfec6 | ||
|
|
25925085ad | ||
|
|
85e776dc63 | ||
|
|
f13a99351c | ||
|
|
4d7c62bb6d | ||
|
|
1714700fb1 | ||
|
|
f7a940ca06 | ||
|
|
40def9e036 | ||
|
|
8ff9ebc592 | ||
|
|
f5df20134c | ||
|
|
592e7ed85b | ||
|
|
31251f0214 |
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
54
.github/workflows/release.yml
vendored
54
.github/workflows/release.yml
vendored
@@ -16,28 +16,32 @@ jobs:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Make sure the release step uses its own credentials:
|
||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: 'npm'
|
||||
- name: Setup semantic-release
|
||||
run: npm install
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
run: npm exec semantic-release
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Make sure the release step uses its own credentials:
|
||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ runner.home }}/.gradle/caches
|
||||
${{ runner.home }}/.gradle/wrapper
|
||||
.gradle
|
||||
build
|
||||
node_modules
|
||||
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
||||
- name: Setup Java
|
||||
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
|
||||
- name: Build with Gradle
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew clean --no-daemon
|
||||
- name: Setup semantic-release
|
||||
run: npm install
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
run: npm exec semantic-release
|
||||
|
||||
253
CHANGELOG.md
253
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
package app.revanced.all.screencapture.removerestriction;
|
||||
|
||||
import android.media.AudioAttributes;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
public final class RemoveScreencaptureRestrictionPatch {
|
||||
// Member of AudioAttributes.Builder
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
public static AudioAttributes.Builder setAllowedCapturePolicy(final AudioAttributes.Builder builder, final int capturePolicy) {
|
||||
builder.setAllowedCapturePolicy(AudioAttributes.ALLOW_CAPTURE_BY_ALL);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
// Member of AudioManager static class
|
||||
public static void setAllowedCapturePolicy(final int capturePolicy) {
|
||||
// Ignore request
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,16 @@ package app.revanced.integrations.patches;
|
||||
|
||||
import static app.revanced.integrations.utils.ReVancedUtils.containsAny;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.shared.PlayerType;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import app.revanced.integrations.utils.ReVancedUtils;
|
||||
|
||||
public class SpoofSignatureVerificationPatch {
|
||||
/**
|
||||
* Enable/disable all workarounds that are required due to signature spoofing.
|
||||
*/
|
||||
private static final boolean WORKAROUND = true;
|
||||
|
||||
/**
|
||||
* Protobuf parameters used for autoplay in scrim.
|
||||
* Prepend this parameter to mute video playback (for autoplay in feed)
|
||||
@@ -18,10 +19,12 @@ public class SpoofSignatureVerificationPatch {
|
||||
private static final String PROTOBUF_PARAMETER_SCRIM = "SAFgAXgB";
|
||||
|
||||
/**
|
||||
* Protobuf parameter of shorts and YouTube stories.
|
||||
* Protobuf parameter also used by
|
||||
* <a href="https://github.com/yt-dlp/yt-dlp/blob/81ca451480051d7ce1a31c017e005358345a9149/yt_dlp/extractor/youtube.py#L3602">yt-dlp</a>
|
||||
* <br>
|
||||
* Known issue: captions are positioned on upper area in the player.
|
||||
*/
|
||||
private static final String PROTOBUF_PARAMETER_SHORTS = "8AEB"; // "8AEByAMTuAQP"
|
||||
private static final String PROTOBUF_PLAYER_PARAMS = "CgIQBg==";
|
||||
|
||||
/**
|
||||
* Target Protobuf parameters.
|
||||
@@ -31,28 +34,6 @@ public class SpoofSignatureVerificationPatch {
|
||||
"SAFg" // Autoplay in scrim
|
||||
};
|
||||
|
||||
/**
|
||||
* On app first start, the first video played usually contains a single non-default window setting value
|
||||
* and all other subtitle settings for the video are (incorrect) default shorts window settings.
|
||||
* For this situation, the shorts settings must be replaced.
|
||||
*
|
||||
* But some videos use multiple text positions on screen (such as https://youtu.be/3hW1rMNC89o),
|
||||
* and by chance many of the subtitles uses window positions that match a default shorts position.
|
||||
* To handle these videos, selectively allowing the shorts specific window settings to 'pass thru' unchanged,
|
||||
* but only if the video contains multiple non-default subtitle window positions.
|
||||
*
|
||||
* Do not enable 'pass thru mode' until this many non default subtitle settings are observed for a single video.
|
||||
*/
|
||||
private static final int NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU = 2;
|
||||
|
||||
/**
|
||||
* The number of non default subtitle settings encountered for the current video.
|
||||
*/
|
||||
private static int numberOfNonDefaultSettingsObserved;
|
||||
|
||||
@Nullable
|
||||
private static String currentVideoId;
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
@@ -66,17 +47,18 @@ public class SpoofSignatureVerificationPatch {
|
||||
|
||||
LogHelper.printDebug(() -> "Original protobuf parameter value: " + originalValue);
|
||||
|
||||
// Video is Short or Story.
|
||||
var isPlayingShorts = originalValue.contains(PROTOBUF_PARAMETER_SHORTS);
|
||||
if (isPlayingShorts) return originalValue;
|
||||
if (!WORKAROUND) return PROTOBUF_PLAYER_PARAMS;
|
||||
|
||||
var isPlayingVideo = originalValue.contains(PROTOBUF_PLAYER_PARAMS);
|
||||
if (isPlayingVideo) return originalValue;
|
||||
|
||||
boolean isPlayingFeed = containsAny(originalValue, PROTOBUF_PARAMETER_TARGETS) && PlayerType.getCurrent() == PlayerType.INLINE_MINIMAL;
|
||||
if (isPlayingFeed) {
|
||||
// Videos in feed won't autoplay with sound.
|
||||
return PROTOBUF_PARAMETER_SCRIM + PROTOBUF_PARAMETER_SHORTS;
|
||||
return PROTOBUF_PARAMETER_SCRIM + PROTOBUF_PLAYER_PARAMS;
|
||||
} else {
|
||||
// Spoof the parameter to prevent playback issues.
|
||||
return PROTOBUF_PARAMETER_SHORTS;
|
||||
return PROTOBUF_PLAYER_PARAMS;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(() -> "overrideProtobufParameter failure", ex);
|
||||
@@ -85,140 +67,4 @@ public class SpoofSignatureVerificationPatch {
|
||||
return originalValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Injection point. Runs off the main thread.
|
||||
* <p>
|
||||
* Used to check the response code of video playback requests made by YouTube.
|
||||
* Response code of interest is 403 that indicate a signature verification failure for the current request
|
||||
*
|
||||
* @param responseCode HTTP status code of the completed YouTube connection
|
||||
*/
|
||||
public static void onResponse(int responseCode) {
|
||||
try {
|
||||
if (responseCode < 400 || responseCode >= 500) {
|
||||
return; // everything normal
|
||||
}
|
||||
LogHelper.printDebug(() -> "YouTube HTTP status code: " + responseCode);
|
||||
|
||||
if (SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.getBoolean()) {
|
||||
return; // already enabled
|
||||
}
|
||||
|
||||
SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.saveValue(true);
|
||||
ReVancedUtils.showToastLong("Spoofing app signature to prevent playback issues");
|
||||
// it would be great if the video could be forcefully reloaded, but currently there is no code to do this
|
||||
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(() -> "onResponse failure", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Last WindowsSetting constructor values. Values are checked for changes to reduce log spam.
|
||||
*/
|
||||
private static int lastAp, lastAh, lastAv;
|
||||
private static boolean lastVs, lastSd;
|
||||
|
||||
/**
|
||||
* Injection point. Overrides values passed into SubtitleWindowSettings constructor.
|
||||
*
|
||||
* @param ap anchor position. A bitmask with 6 bit fields, that appears to indicate the layout position on screen
|
||||
* @param ah anchor horizontal. A percentage [0, 100], that appears to be a horizontal text anchor point
|
||||
* @param av anchor vertical. A percentage [0, 100], that appears to be a vertical text anchor point
|
||||
* @param vs appears to indicate if subtitles exist, and the value is always true.
|
||||
* @param sd function is not entirely clear
|
||||
*/
|
||||
public static int[] getSubtitleWindowSettingsOverride(int ap, int ah, int av, boolean vs, boolean sd) {
|
||||
final boolean signatureSpoofing = SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.getBoolean();
|
||||
if (SettingsEnum.DEBUG.getBoolean()) {
|
||||
if (ap != lastAp || ah != lastAh || av != lastAv || vs != lastVs || sd != lastSd) {
|
||||
LogHelper.printDebug(() -> "video: " + VideoInformation.getVideoId() + " spoof: " + signatureSpoofing
|
||||
+ " ap:" + ap + " ah:" + ah + " av:" + av + " vs:" + vs + " sd:" + sd);
|
||||
lastAp = ap;
|
||||
lastAh = ah;
|
||||
lastAv = av;
|
||||
lastVs = vs;
|
||||
lastSd = sd;
|
||||
}
|
||||
}
|
||||
|
||||
// Videos with custom captions that specify screen positions appear to always have correct screen positions (even with spoofing).
|
||||
// But for auto generated and most other captions, the spoof incorrectly gives various default Shorts caption settings.
|
||||
// Check for these known default shorts captions parameters, and replace with the known correct values.
|
||||
//
|
||||
// If a regular video uses a custom subtitle setting that match a default short setting,
|
||||
// then this will incorrectly replace the setting.
|
||||
// But, if the video uses multiple subtitles in different screen locations, then detect the non-default values
|
||||
// and do not replace any window settings for the video (regardless if they match a shorts default).
|
||||
if (signatureSpoofing && !PlayerType.getCurrent().isNoneOrHidden()
|
||||
&& numberOfNonDefaultSettingsObserved < NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU) {
|
||||
for (SubtitleWindowReplacementSettings setting : SubtitleWindowReplacementSettings.values()) {
|
||||
if (setting.match(ap, ah, av, vs, sd)) {
|
||||
return setting.replacementSetting();
|
||||
}
|
||||
}
|
||||
|
||||
numberOfNonDefaultSettingsObserved++;
|
||||
LogHelper.printDebug(() ->
|
||||
numberOfNonDefaultSettingsObserved < NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU
|
||||
? "Non default subtitle found."
|
||||
: "Multiple non default subtitles found. Allowing all subtitles for this video to pass thru unchanged.");
|
||||
}
|
||||
|
||||
return new int[]{ap, ah, av};
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static void setCurrentVideoId(@NonNull String videoId) {
|
||||
try {
|
||||
if (videoId.equals(currentVideoId)) {
|
||||
return;
|
||||
}
|
||||
currentVideoId = videoId;
|
||||
numberOfNonDefaultSettingsObserved = 0;
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(() -> "setCurrentVideoId failure", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Known incorrect default Shorts subtitle parameters, and the corresponding correct (non-Shorts) values.
|
||||
*/
|
||||
private enum SubtitleWindowReplacementSettings {
|
||||
DEFAULT_SHORTS_PARAMETERS_1(10, 50, 0, true, false,
|
||||
34, 50, 95),
|
||||
DEFAULT_SHORTS_PARAMETERS_2(9, 20, 0, true, false,
|
||||
34, 50, 90),
|
||||
DEFAULT_SHORTS_PARAMETERS_3(9, 20, 0, true, true,
|
||||
33, 20, 100);
|
||||
|
||||
// original values
|
||||
final int ap, ah, av;
|
||||
final boolean vs, sd;
|
||||
|
||||
// replacement int values
|
||||
final int[] replacement;
|
||||
|
||||
SubtitleWindowReplacementSettings(int ap, int ah, int av, boolean vs, boolean sd,
|
||||
int replacementAp, int replacementAh, int replacementAv) {
|
||||
this.ap = ap;
|
||||
this.ah = ah;
|
||||
this.av = av;
|
||||
this.vs = vs;
|
||||
this.sd = sd;
|
||||
this.replacement = new int[]{replacementAp, replacementAh, replacementAv};
|
||||
}
|
||||
|
||||
boolean match(int ap, int ah, int av, boolean vs, boolean sd) {
|
||||
return this.ap == ap && this.ah == ah && this.av == av && this.vs == vs && this.sd == sd;
|
||||
}
|
||||
|
||||
int[] replacementSetting() {
|
||||
return replacement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public final class VideoInformation {
|
||||
@NonNull
|
||||
private static String videoId = "";
|
||||
private static long videoLength = 0;
|
||||
private static volatile long videoTime = -1; // must be volatile. Value is set off main thread from high precision patch hook
|
||||
private static long videoTime = -1;
|
||||
/**
|
||||
* The current playback speed
|
||||
*/
|
||||
@@ -98,17 +98,17 @@ public final class VideoInformation {
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
* Called off the main thread approximately every 50ms to 100ms
|
||||
* Called on the main thread every 1000ms.
|
||||
*
|
||||
* @param currentPlaybackTime The current playback time of the video in milliseconds.
|
||||
*/
|
||||
public static void setVideoTimeHighPrecision(final long currentPlaybackTime) {
|
||||
public static void setVideoTime(final long currentPlaybackTime) {
|
||||
videoTime = currentPlaybackTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek on the current video.
|
||||
* Does not function for playback of Shorts or Stories.
|
||||
* Does not function for playback of Shorts.
|
||||
*
|
||||
* Caution: If called from a videoTimeHook() callback,
|
||||
* this will cause a recursive call into the same videoTimeHook() callback.
|
||||
@@ -118,11 +118,6 @@ public final class VideoInformation {
|
||||
*/
|
||||
public static boolean seekTo(final long millisecond) {
|
||||
ReVancedUtils.verifyOnMainThread();
|
||||
if (seekMethod == null) {
|
||||
LogHelper.printException(() -> "seekMethod was null");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
LogHelper.printDebug(() -> "Seeking to " + millisecond);
|
||||
return (Boolean) seekMethod.invoke(playerControllerRef.get(), millisecond);
|
||||
@@ -137,7 +132,7 @@ public final class VideoInformation {
|
||||
}
|
||||
|
||||
/**
|
||||
* Id of the current video playing. Includes Shorts and YouTube Stories.
|
||||
* Id of the current video playing. Includes Shorts.
|
||||
*
|
||||
* @return The id of the video. Empty string if not set yet.
|
||||
*/
|
||||
@@ -154,7 +149,7 @@ public final class VideoInformation {
|
||||
}
|
||||
|
||||
/**
|
||||
* Length of the current video playing. Includes Shorts and YouTube Stories.
|
||||
* Length of the current video playing. Includes Shorts.
|
||||
*
|
||||
* @return The length of the video in milliseconds.
|
||||
* If the video is not yet loaded, or if the video is playing in the background with no video visible,
|
||||
@@ -165,14 +160,14 @@ public final class VideoInformation {
|
||||
}
|
||||
|
||||
/**
|
||||
* Playback time of the current video playing.
|
||||
* Value can lag up to approximately 100ms behind the actual current video playback time.
|
||||
* Playback time of the current video playing. Includes Shorts.
|
||||
*
|
||||
* Note: Code inside a videoTimeHook patch callback
|
||||
* should use the callback video time and avoid using this method
|
||||
* (in situations of recursive hook callbacks, the value returned here may be outdated).
|
||||
* Value will lag behind the actual playback time by a variable amount based on the playback speed.
|
||||
*
|
||||
* Includes Shorts and YouTube Stories.
|
||||
* If playback speed is 2.0x, this value may be up to 2000ms behind the actual playback time.
|
||||
* If playback speed is 1.0x, this value may be up to 1000ms behind the actual playback time.
|
||||
* If playback speed is 0.5x, this value may be up to 500ms behind the actual playback time.
|
||||
* Etc.
|
||||
*
|
||||
* @return The time of the video in milliseconds. -1 if not set yet.
|
||||
*/
|
||||
@@ -192,7 +187,7 @@ public final class VideoInformation {
|
||||
* @see VideoState
|
||||
*/
|
||||
public static boolean isAtEndOfVideo() {
|
||||
return videoTime > 0 && videoLength > 0 && videoTime >= videoLength;
|
||||
return videoTime >= videoLength && videoLength > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
package app.revanced.integrations.patches.components;
|
||||
|
||||
final class DummyFilter extends Filter { }
|
||||
@@ -0,0 +1,180 @@
|
||||
package app.revanced.integrations.patches.components;
|
||||
|
||||
|
||||
import android.os.Build;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.ReVancedUtils;
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public final class LayoutComponentsFilter extends Filter {
|
||||
private final String[] exceptions;
|
||||
|
||||
private final CustomFilterGroup custom;
|
||||
|
||||
private static final ByteArrayAsStringFilterGroup mixPlaylists = new ByteArrayAsStringFilterGroup(
|
||||
SettingsEnum.HIDE_MIX_PLAYLISTS,
|
||||
"&list="
|
||||
);
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public LayoutComponentsFilter() {
|
||||
exceptions = new String[]{
|
||||
"home_video_with_context",
|
||||
"related_video_with_context",
|
||||
"comment_thread", // skip filtering anything in the comments
|
||||
"|comment.", // skip filtering anything in the comments replies
|
||||
"library_recent_shelf",
|
||||
};
|
||||
|
||||
custom = new CustomFilterGroup(
|
||||
SettingsEnum.CUSTOM_FILTER,
|
||||
SettingsEnum.CUSTOM_FILTER_STRINGS
|
||||
);
|
||||
|
||||
final var communityPosts = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_COMMUNITY_POSTS,
|
||||
"post_base_wrapper"
|
||||
);
|
||||
|
||||
final var communityGuidelines = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_COMMUNITY_GUIDELINES,
|
||||
"community_guidelines"
|
||||
);
|
||||
|
||||
final var subscribersCommunityGuidelines = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_SUBSCRIBERS_COMMUNITY_GUIDELINES,
|
||||
"sponsorships_comments_upsell"
|
||||
);
|
||||
|
||||
|
||||
final var channelMemberShelf = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_CHANNEL_MEMBER_SHELF,
|
||||
"member_recognition_shelf"
|
||||
);
|
||||
|
||||
final var compactBanner = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_COMPACT_BANNER,
|
||||
"compact_banner"
|
||||
);
|
||||
|
||||
final var inFeedSurvey = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_FEED_SURVEY,
|
||||
"in_feed_survey",
|
||||
"slimline_survey"
|
||||
);
|
||||
|
||||
final var medicalPanel = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_MEDICAL_PANELS,
|
||||
"medical_panel"
|
||||
);
|
||||
|
||||
final var paidContent = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_PAID_CONTENT,
|
||||
"paid_content_overlay"
|
||||
);
|
||||
|
||||
final var infoPanel = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_HIDE_INFO_PANELS,
|
||||
"publisher_transparency_panel",
|
||||
"single_item_information_panel"
|
||||
);
|
||||
|
||||
final var latestPosts = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_HIDE_LATEST_POSTS,
|
||||
"post_shelf"
|
||||
);
|
||||
|
||||
final var channelGuidelines = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_HIDE_CHANNEL_GUIDELINES,
|
||||
"channel_guidelines_entry_banner"
|
||||
);
|
||||
|
||||
final var audioTrackButton = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_AUDIO_TRACK_BUTTON,
|
||||
"multi_feed_icon_button"
|
||||
);
|
||||
|
||||
final var artistCard = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_ARTIST_CARDS,
|
||||
"official_card"
|
||||
);
|
||||
|
||||
final var expandableMetadata = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_EXPANDABLE_CHIP,
|
||||
"inline_expander"
|
||||
);
|
||||
|
||||
final var chapters = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_CHAPTERS,
|
||||
"macro_markers_carousel"
|
||||
);
|
||||
|
||||
final var channelBar = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_CHANNEL_BAR,
|
||||
"channel_bar"
|
||||
);
|
||||
|
||||
final var relatedVideos = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_RELATED_VIDEOS,
|
||||
"fullscreen_related_videos"
|
||||
);
|
||||
|
||||
final var quickActions = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_QUICK_ACTIONS,
|
||||
"quick_actions"
|
||||
);
|
||||
|
||||
final var imageShelf = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_IMAGE_SHELF,
|
||||
"image_shelf"
|
||||
);
|
||||
|
||||
final var graySeparator = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_GRAY_SEPARATOR,
|
||||
"cell_divider" // layout residue (gray line above the buttoned ad),
|
||||
);
|
||||
|
||||
this.pathFilterGroups.addAll(
|
||||
channelBar,
|
||||
communityPosts,
|
||||
paidContent,
|
||||
latestPosts,
|
||||
chapters,
|
||||
communityGuidelines,
|
||||
quickActions,
|
||||
expandableMetadata,
|
||||
relatedVideos,
|
||||
compactBanner,
|
||||
inFeedSurvey,
|
||||
medicalPanel,
|
||||
infoPanel,
|
||||
channelGuidelines,
|
||||
audioTrackButton,
|
||||
artistCard,
|
||||
imageShelf,
|
||||
subscribersCommunityGuidelines,
|
||||
channelMemberShelf
|
||||
);
|
||||
|
||||
this.identifierFilterGroups.addAll(graySeparator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFiltered(final String path, final String identifier, final byte[] _protobufBufferArray) {
|
||||
if (custom.isEnabled() && custom.check(path).isFiltered())
|
||||
return true;
|
||||
|
||||
if (ReVancedUtils.containsAny(path, exceptions))
|
||||
return false; // Exceptions are not filtered.
|
||||
|
||||
return super.isFiltered(path, identifier, _protobufBufferArray);
|
||||
}
|
||||
|
||||
|
||||
// Called from a different place then the other filters.
|
||||
public static boolean filterMixPlaylists(final byte[] bytes) {
|
||||
return mixPlaylists.isEnabled() && mixPlaylists.check(bytes).isFiltered();
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ abstract class FilterGroup<T> {
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return setting.getBoolean();
|
||||
return setting == null || setting.getBoolean();
|
||||
}
|
||||
|
||||
public abstract FilterGroupResult check(final T stack);
|
||||
@@ -85,9 +85,10 @@ final class CustomFilterGroup extends StringFilterGroup {
|
||||
class ByteArrayFilterGroup extends FilterGroup<byte[]> {
|
||||
// Modified implementation from https://stackoverflow.com/a/1507813
|
||||
private int indexOf(final byte[] data, final byte[] pattern) {
|
||||
if (data.length == 0)
|
||||
return -1;
|
||||
// Computes the failure function using a boot-strapping process,
|
||||
// where the pattern is matched against itself.
|
||||
|
||||
final int[] failure = new int[pattern.length];
|
||||
|
||||
int j = 0;
|
||||
@@ -105,7 +106,6 @@ class ByteArrayFilterGroup extends FilterGroup<byte[]> {
|
||||
// KMP matching algorithm.
|
||||
|
||||
j = 0;
|
||||
if (data.length == 0) return -1;
|
||||
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
while (j > 0 && pattern[j] != data[i]) {
|
||||
@@ -132,7 +132,8 @@ class ByteArrayFilterGroup extends FilterGroup<byte[]> {
|
||||
public FilterGroupResult check(final byte[] bytes) {
|
||||
var matched = false;
|
||||
for (byte[] filter : filters) {
|
||||
if (indexOf(bytes, filter) == -1) continue;
|
||||
if (indexOf(bytes, filter) == -1)
|
||||
continue;
|
||||
|
||||
matched = true;
|
||||
break;
|
||||
@@ -183,7 +184,8 @@ abstract class FilterGroupList<V, T extends FilterGroup<V>> implements Iterable<
|
||||
|
||||
protected boolean contains(final V stack) {
|
||||
for (T filterGroup : this) {
|
||||
if (!filterGroup.isEnabled()) continue;
|
||||
if (!filterGroup.isEnabled())
|
||||
continue;
|
||||
|
||||
var result = filterGroup.check(stack);
|
||||
if (result.isFiltered()) {
|
||||
@@ -207,7 +209,8 @@ abstract class Filter {
|
||||
final protected ByteArrayFilterGroupList protobufBufferFilterGroups = new ByteArrayFilterGroupList();
|
||||
|
||||
/**
|
||||
* Check if the given path, identifier or protobuf buffer is filtered by any {@link FilterGroup}.
|
||||
* Check if the given path, identifier or protobuf buffer is filtered by any
|
||||
* {@link FilterGroup}. Method is called off the main thread.
|
||||
*
|
||||
* @return True if filtered, false otherwise.
|
||||
*/
|
||||
@@ -234,30 +237,41 @@ abstract class Filter {
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@SuppressWarnings("unused")
|
||||
public final class LithoFilterPatch {
|
||||
private static final Filter[] filters = new Filter[]{
|
||||
new AdsFilter(),
|
||||
new ButtonsFilter(),
|
||||
new CommentsFilter(),
|
||||
new ShortsFilter()
|
||||
private static final Filter[] filters = new Filter[] {
|
||||
new DummyFilter() // Replaced by patch.
|
||||
};
|
||||
|
||||
/**
|
||||
* Injection point. Called off the main thread.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public static boolean filter(final StringBuilder pathBuilder, final String identifier, final ByteBuffer protobufBuffer) {
|
||||
public static boolean filter(final StringBuilder pathBuilder, final String identifier,
|
||||
final ByteBuffer protobufBuffer) {
|
||||
// TODO: Maybe this can be moved to the Filter class, to prevent unnecessary
|
||||
// string creation
|
||||
// because some filters might not need the path.
|
||||
var path = pathBuilder.toString();
|
||||
|
||||
// It is assumed that protobufBuffer is empty as well in this case.
|
||||
if (path.isEmpty()) return false;
|
||||
if (path.isEmpty())
|
||||
return false;
|
||||
|
||||
LogHelper.printDebug(() -> String.format(
|
||||
"Searching (ID: %s, Buffer-size: %s): %s",
|
||||
identifier, protobufBuffer.remaining(), path
|
||||
));
|
||||
identifier, protobufBuffer.remaining(), path));
|
||||
|
||||
var protobufBufferArray = protobufBuffer.array();
|
||||
|
||||
// check if any filter-group
|
||||
for (var filter : filters)
|
||||
if (filter.isFiltered(path, identifier, protobufBufferArray)) return true;
|
||||
for (var filter : filters) {
|
||||
var filtered = filter.isFiltered(path, identifier, protobufBufferArray);
|
||||
|
||||
LogHelper.printDebug(
|
||||
() -> String.format("%s (ID: %s): %s", filtered ? "Filtered" : "Unfiltered", identifier, path));
|
||||
|
||||
if (filtered)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,11 @@ public final class ShortsFilter extends Filter {
|
||||
"reel_channel_bar"
|
||||
);
|
||||
|
||||
private final StringFilterGroup infoPanel = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_SHORTS_INFO_PANEL,
|
||||
"shorts_info_panel_overview"
|
||||
);
|
||||
|
||||
public ShortsFilter() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) return;
|
||||
|
||||
@@ -38,23 +43,38 @@ public final class ShortsFilter extends Filter {
|
||||
"sponsor_button"
|
||||
);
|
||||
|
||||
final var soundButton = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_SHORTS_SOUND_BUTTON,
|
||||
"reel_pivot_button"
|
||||
);
|
||||
|
||||
final var channelBar = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_SHORTS_CHANNEL_BAR,
|
||||
"reel_channel_bar"
|
||||
);
|
||||
|
||||
final var shorts = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_SHORTS,
|
||||
"shorts_shelf",
|
||||
"inline_shorts",
|
||||
"shorts_grid"
|
||||
"shorts_grid",
|
||||
"shorts_video_cell"
|
||||
);
|
||||
|
||||
this.pathFilterGroups.addAll(joinButton, subscribeButton);
|
||||
this.pathFilterGroups.addAll(joinButton, subscribeButton, soundButton, channelBar);
|
||||
this.identifierFilterGroups.addAll(shorts, thanksButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isFiltered(final String path, final String identifier, final byte[] protobufBufferArray) {
|
||||
boolean isFiltered(final String path, final String identifier,
|
||||
final byte[] protobufBufferArray) {
|
||||
// Filter the path only when reelChannelBar is visible.
|
||||
if (reelChannelBar.check(path).isFiltered())
|
||||
if (this.pathFilterGroups.contains(path)) return true;
|
||||
|
||||
// Shorts info panel path appears outside of reelChannelBar path.
|
||||
if (infoPanel.isEnabled() && infoPanel.check(path).isFiltered()) return true;
|
||||
|
||||
return this.identifierFilterGroups.contains(identifier);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package app.revanced.integrations.patches.components;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
// Abuse LithoFilter for OldVideoQualityMenuPatch.
|
||||
public final class VideoQualityMenuFilterPatch extends Filter {
|
||||
// Must be volatile or synchronized, as litho filtering runs off main thread and this field is then access from the main thread.
|
||||
public static volatile boolean isVideoQualityMenuVisible;
|
||||
|
||||
public VideoQualityMenuFilterPatch() {
|
||||
pathFilterGroups.addAll(new StringFilterGroup(
|
||||
SettingsEnum.SHOW_OLD_VIDEO_QUALITY_MENU,
|
||||
"quick_quality_sheet_content.eml-js"
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isFiltered(final String path, final String identifier, final byte[] protobufBufferArray) {
|
||||
isVideoQualityMenuVisible = super.isFiltered(path, identifier, protobufBufferArray);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package app.revanced.integrations.patches.components;
|
||||
|
||||
// Abuse LithoFilter for CustomVideoSpeedPatch.
|
||||
public final class VideoSpeedMenuFilterPatch extends Filter {
|
||||
// Must be volatile or synchronized, as litho filtering runs off main thread and this field is then access from the main thread.
|
||||
public static volatile boolean isVideoSpeedMenuVisible;
|
||||
|
||||
public VideoSpeedMenuFilterPatch() {
|
||||
pathFilterGroups.addAll(new StringFilterGroup(
|
||||
null,
|
||||
"playback_speed_sheet_content.eml-js"
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isFiltered(final String path, final String identifier, final byte[] protobufBufferArray) {
|
||||
isVideoSpeedMenuVisible = super.isFiltered(path, identifier, protobufBufferArray);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package app.revanced.integrations.patches.playback.quality;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
public class OldQualityLayoutPatch {
|
||||
public static void showOldQualityMenu(ListView listView)
|
||||
{
|
||||
if (!SettingsEnum.SHOW_OLD_VIDEO_MENU.getBoolean()) return;
|
||||
|
||||
listView.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
|
||||
@Override
|
||||
public void onChildViewAdded(View parent, View child) {
|
||||
LogHelper.printDebug(() -> "Added: " + child);
|
||||
|
||||
parent.setVisibility(View.GONE);
|
||||
|
||||
final var indexOfAdvancedQualityMenuItem = 4;
|
||||
if (listView.indexOfChild(child) != indexOfAdvancedQualityMenuItem) return;
|
||||
|
||||
LogHelper.printDebug(() -> "Found advanced menu: " + child);
|
||||
|
||||
final var qualityItemMenuPosition = 4;
|
||||
listView.performItemClick(null, qualityItemMenuPosition, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChildViewRemoved(View parent, View child) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package app.revanced.integrations.patches.playback.quality;
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import app.revanced.integrations.patches.components.VideoQualityMenuFilterPatch;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import com.facebook.litho.ComponentHost;
|
||||
import kotlin.Deprecated;
|
||||
|
||||
// This patch contains the logic to show the old video quality menu.
|
||||
// Two methods are required, because the quality menu is a RecyclerView in the new YouTube version
|
||||
// and a ListView in the old one.
|
||||
public final class OldVideoQualityMenuPatch {
|
||||
|
||||
public static void onFlyoutMenuCreate(final LinearLayout linearLayout) {
|
||||
if (!SettingsEnum.SHOW_OLD_VIDEO_QUALITY_MENU.getBoolean()) return;
|
||||
|
||||
// The quality menu is a RecyclerView with 3 children. The third child is the "Advanced" quality menu.
|
||||
addRecyclerListener(linearLayout, 3, 2, recyclerView -> {
|
||||
// Check if the current view is the quality menu.
|
||||
if (VideoQualityMenuFilterPatch.isVideoQualityMenuVisible) {// Hide the video quality menu.
|
||||
linearLayout.setVisibility(View.GONE);
|
||||
|
||||
// Click the "Advanced" quality menu to show the "old" quality menu.
|
||||
((ComponentHost) recyclerView.getChildAt(0)).getChildAt(3).performClick();
|
||||
LogHelper.printDebug(() -> "Advanced quality menu in new type of quality menu clicked");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void addRecyclerListener(@NonNull LinearLayout linearLayout,
|
||||
int expectedLayoutChildCount, int recyclerViewIndex,
|
||||
@NonNull RecyclerViewGlobalLayoutListener listener) {
|
||||
if (linearLayout.getChildCount() != expectedLayoutChildCount) return;
|
||||
|
||||
var layoutChild = linearLayout.getChildAt(recyclerViewIndex);
|
||||
if (!(layoutChild instanceof RecyclerView)) return;
|
||||
final var recyclerView = (RecyclerView) layoutChild;
|
||||
|
||||
recyclerView.getViewTreeObserver().addOnGlobalLayoutListener(
|
||||
new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
try {
|
||||
listener.recyclerOnGlobalLayout(recyclerView);
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(() -> "addRecyclerListener failure", ex);
|
||||
} finally {
|
||||
// Remove the listener because it will be added again.
|
||||
recyclerView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public interface RecyclerViewGlobalLayoutListener {
|
||||
void recyclerOnGlobalLayout(@NonNull RecyclerView recyclerView);
|
||||
}
|
||||
|
||||
@Deprecated(message = "This patch is deprecated because the quality menu is not a ListView anymore")
|
||||
public static void showOldVideoQualityMenu(final ListView listView) {
|
||||
if (!SettingsEnum.SHOW_OLD_VIDEO_QUALITY_MENU.getBoolean()) return;
|
||||
|
||||
listView.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
|
||||
@Override
|
||||
public void onChildViewAdded(View parent, View child) {
|
||||
LogHelper.printDebug(() -> "Added listener to old type of quality menu");
|
||||
|
||||
parent.setVisibility(View.GONE);
|
||||
|
||||
final var indexOfAdvancedQualityMenuItem = 4;
|
||||
if (listView.indexOfChild(child) != indexOfAdvancedQualityMenuItem) return;
|
||||
|
||||
LogHelper.printDebug(() -> "Found advanced menu item in old type of quality menu");
|
||||
|
||||
final var qualityItemMenuPosition = 4;
|
||||
listView.performItemClick(null, qualityItemMenuPosition, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChildViewRemoved(View parent, View child) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -38,13 +38,8 @@ public class RememberVideoQualityPatch {
|
||||
private static List<Integer> videoQualities;
|
||||
|
||||
private static void changeDefaultQuality(int defaultQuality) {
|
||||
NetworkType networkType = ReVancedUtils.getNetworkType();
|
||||
if (networkType == NetworkType.NONE) {
|
||||
ReVancedUtils.showToastShort("No internet connection");
|
||||
return;
|
||||
}
|
||||
String networkTypeMessage;
|
||||
if (networkType == NetworkType.MOBILE) {
|
||||
if (ReVancedUtils.getNetworkType() == NetworkType.MOBILE) {
|
||||
mobileQualitySetting.saveValue(defaultQuality);
|
||||
networkTypeMessage = "mobile";
|
||||
} else {
|
||||
@@ -139,15 +134,24 @@ public class RememberVideoQualityPatch {
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
* Injection point. Old quality menu.
|
||||
*/
|
||||
public static void userChangedQuality(int selectedQuality) {
|
||||
public static void userChangedQuality(int selectedQualityIndex) {
|
||||
if (!SettingsEnum.REMEMBER_VIDEO_QUALITY_LAST_SELECTED.getBoolean()) return;
|
||||
|
||||
userSelectedQualityIndex = selectedQuality;
|
||||
userSelectedQualityIndex = selectedQualityIndex;
|
||||
userChangedDefaultQuality = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point. New quality menu.
|
||||
*/
|
||||
public static void userChangedQualityInNewFlyout(int selectedQuality) {
|
||||
if (!SettingsEnum.REMEMBER_VIDEO_QUALITY_LAST_SELECTED.getBoolean()) return;
|
||||
|
||||
changeDefaultQuality(selectedQuality); // Quality is human readable resolution (ie: 1080).
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
package app.revanced.integrations.patches.playback.speed;
|
||||
|
||||
import static app.revanced.integrations.patches.playback.quality.OldVideoQualityMenuPatch.addRecyclerListener;
|
||||
|
||||
import android.preference.ListPreference;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.facebook.litho.ComponentHost;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import app.revanced.integrations.patches.components.VideoSpeedMenuFilterPatch;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import app.revanced.integrations.utils.ReVancedUtils;
|
||||
@@ -37,7 +45,7 @@ public class CustomVideoSpeedPatch {
|
||||
private static String[] preferenceListEntries, preferenceListEntryValues;
|
||||
|
||||
static {
|
||||
loadSpeeds();
|
||||
loadCustomSpeeds();
|
||||
}
|
||||
|
||||
private static void resetCustomSpeeds(@NonNull String toastMessage) {
|
||||
@@ -45,7 +53,7 @@ public class CustomVideoSpeedPatch {
|
||||
SettingsEnum.CUSTOM_PLAYBACK_SPEEDS.saveValue(SettingsEnum.CUSTOM_PLAYBACK_SPEEDS.defaultValue);
|
||||
}
|
||||
|
||||
private static void loadSpeeds() {
|
||||
private static void loadCustomSpeeds() {
|
||||
try {
|
||||
String[] speedStrings = SettingsEnum.CUSTOM_PLAYBACK_SPEEDS.getString().split("\\s+");
|
||||
Arrays.sort(speedStrings);
|
||||
@@ -61,7 +69,7 @@ public class CustomVideoSpeedPatch {
|
||||
if (speed >= MAXIMUM_PLAYBACK_SPEED) {
|
||||
resetCustomSpeeds("Custom speeds must be less than " + MAXIMUM_PLAYBACK_SPEED
|
||||
+ ". Using default values.");
|
||||
loadSpeeds();
|
||||
loadCustomSpeeds();
|
||||
return;
|
||||
}
|
||||
minVideoSpeed = Math.min(minVideoSpeed, speed);
|
||||
@@ -71,7 +79,7 @@ public class CustomVideoSpeedPatch {
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printInfo(() -> "parse error", ex);
|
||||
resetCustomSpeeds("Invalid custom video speeds. Using default values.");
|
||||
loadSpeeds();
|
||||
loadCustomSpeeds();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,4 +108,32 @@ public class CustomVideoSpeedPatch {
|
||||
preference.setEntries(preferenceListEntries);
|
||||
preference.setEntryValues(preferenceListEntryValues);
|
||||
}
|
||||
|
||||
/*
|
||||
* To reduce copy paste between two similar code paths.
|
||||
*/
|
||||
public static void onFlyoutMenuCreate(final LinearLayout linearLayout) {
|
||||
// The playback rate menu is a RecyclerView with 2 children. The third child is the "Advanced" quality menu.
|
||||
addRecyclerListener(linearLayout, 2, 1, recyclerView -> {
|
||||
if (VideoSpeedMenuFilterPatch.isVideoSpeedMenuVisible &&
|
||||
recyclerView.getChildCount() == 1 &&
|
||||
recyclerView.getChildAt(0) instanceof ComponentHost
|
||||
) {
|
||||
linearLayout.setVisibility(View.GONE);
|
||||
|
||||
// Close the new video speed menu and instead show the old one.
|
||||
showOldVideoSpeedMenu();
|
||||
|
||||
// DismissView [R.id.touch_outside] is the 1st ChildView of the 3rd ParentView.
|
||||
((ViewGroup) linearLayout.getParent().getParent().getParent())
|
||||
.getChildAt(0).performClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void showOldVideoSpeedMenu() {
|
||||
LogHelper.printDebug(() -> "Old video quality menu shown");
|
||||
|
||||
// Rest of the implementation added by patch.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ProgressBarDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(@NonNull Canvas canvas) {
|
||||
if (SettingsEnum.HIDE_SEEKBAR.getBoolean()) {
|
||||
if (SettingsEnum.HIDE_SEEKBAR_THUMBNAIL.getBoolean()) {
|
||||
return;
|
||||
}
|
||||
paint.setColor(SeekbarColorPatch.getCustomSeekbarColor());
|
||||
|
||||
@@ -51,12 +51,31 @@ public final class SeekbarColorPatch {
|
||||
return customSeekbarColor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
* Overrides color when seekbar is clicked, and all Litho components that use the YouTube seekbar color.
|
||||
* Overrides all Litho components that use the YouTube seekbar color.
|
||||
* Used only for the video thumbnails seekbar.
|
||||
*
|
||||
* If {@link SettingsEnum#HIDE_SEEKBAR_THUMBNAIL} is enabled, this returns a fully transparent color.
|
||||
*/
|
||||
public static int getSeekbarColorOverride(int colorValue) {
|
||||
public static int getLithoColor(int colorValue) {
|
||||
if (colorValue == ORIGINAL_SEEKBAR_COLOR) {
|
||||
if (SettingsEnum.HIDE_SEEKBAR_THUMBNAIL.getBoolean()) {
|
||||
return 0x00000000;
|
||||
}
|
||||
return getSeekbarColorValue(ORIGINAL_SEEKBAR_COLOR);
|
||||
}
|
||||
return colorValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
* Overrides color when video player seekbar is clicked.
|
||||
*/
|
||||
public static int getVideoPlayerSeekbarClickedColor(int colorValue) {
|
||||
return colorValue == ORIGINAL_SEEKBAR_COLOR
|
||||
? getSeekbarColorValue(ORIGINAL_SEEKBAR_COLOR)
|
||||
: colorValue;
|
||||
@@ -65,18 +84,20 @@ public final class SeekbarColorPatch {
|
||||
/**
|
||||
* Injection point.
|
||||
*
|
||||
* If {@link SettingsEnum#HIDE_SEEKBAR} is enabled, this returns a fully transparent color.
|
||||
*
|
||||
* Otherwise the original color is changed to the custom seekbar color, while retaining
|
||||
* Overrides color used for the video player seekbar.
|
||||
*/
|
||||
public static int getVideoPlayerSeekbarColor(int originalColor) {
|
||||
return getSeekbarColorValue(originalColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Color parameter is changed to the custom seekbar color, while retaining
|
||||
* the brightness and alpha changes of the parameter value compared to the original seekbar color.
|
||||
*/
|
||||
public static int getSeekbarColorValue(int originalColor) {
|
||||
private static int getSeekbarColorValue(int originalColor) {
|
||||
try {
|
||||
if (SettingsEnum.HIDE_SEEKBAR.getBoolean()) {
|
||||
return 0x00000000;
|
||||
}
|
||||
if (customSeekbarColor == ORIGINAL_SEEKBAR_COLOR) {
|
||||
return originalColor; // Nothing to do
|
||||
return originalColor; // nothing to do
|
||||
}
|
||||
final int alphaDifference = Color.alpha(originalColor) - Color.alpha(ORIGINAL_SEEKBAR_COLOR);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -180,6 +180,11 @@ public class ReVancedSettingsFragment extends PreferenceFragment {
|
||||
if (entryIndex >= 0) {
|
||||
listPreference.setSummary(listPreference.getEntries()[entryIndex]);
|
||||
listPreference.setValue(objectStringValue);
|
||||
} else {
|
||||
// Value is not an available option.
|
||||
// User manually edited import data, or options changed and current selection is no longer available.
|
||||
// Still show the value in the summary so it's clear that something is selected.
|
||||
listPreference.setSummary(objectStringValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -427,16 +427,6 @@ public class SponsorBlockSettingsFragment extends PreferenceFragment {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
Preference preference = new Preference(context);
|
||||
category.addPreference(preference);
|
||||
preference.setSummary(str("sb_about_made_by"));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
preference.setSingleLineTitle(false);
|
||||
}
|
||||
preference.setSelectable(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void openGuidelines() {
|
||||
|
||||
@@ -8,15 +8,16 @@ import app.revanced.integrations.utils.LogHelper
|
||||
*/
|
||||
enum class PlayerType {
|
||||
/**
|
||||
* Includes Shorts and Stories playback.
|
||||
* Either no video, or a Short is playing.
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* A Shorts or Stories, if a regular video is minimized and a Short/Story is then opened.
|
||||
* A Short is playing. Occurs if a regular video is first opened
|
||||
* and then a Short is opened (without first closing the regular video).
|
||||
*/
|
||||
HIDDEN,
|
||||
/**
|
||||
* When spoofing to an old version of YouTube, and watching a short with a regular video in the background,
|
||||
* When spoofing to 16.x YouTube and watching a short with a regular video in the background,
|
||||
* the type will be this (and not [HIDDEN]).
|
||||
*/
|
||||
WATCH_WHILE_MINIMIZED,
|
||||
@@ -76,7 +77,7 @@ enum class PlayerType {
|
||||
* Useful to check if a short is currently playing.
|
||||
*
|
||||
* Does not include the first moment after a short is opened when a regular video is minimized on screen,
|
||||
* or while watching a short with a regular video present on a spoofed old version of YouTube.
|
||||
* or while watching a short with a regular video present on a spoofed 16.x version of YouTube.
|
||||
* To include those situations instead use [isNoneHiddenOrMinimized].
|
||||
*/
|
||||
fun isNoneOrHidden(): Boolean {
|
||||
@@ -84,12 +85,13 @@ enum class PlayerType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current player type is [NONE], [HIDDEN], [WATCH_WHILE_MINIMIZED], [WATCH_WHILE_SLIDING_MINIMIZED_DISMISSED].
|
||||
* Check if the current player type is
|
||||
* [NONE], [HIDDEN], [WATCH_WHILE_MINIMIZED], [WATCH_WHILE_SLIDING_MINIMIZED_DISMISSED].
|
||||
*
|
||||
* Useful to check if a Short is being played,
|
||||
* although can return false positive if the player is minimized.
|
||||
* although will return false positive if a regular video is opened and minimized (and no short is playing).
|
||||
*
|
||||
* @return If nothing, a Short, a Story,
|
||||
* @return If nothing, a Short,
|
||||
* or a regular video is minimized video or sliding off screen to a dismissed or hidden state.
|
||||
*/
|
||||
fun isNoneHiddenOrMinimized(): Boolean {
|
||||
|
||||
@@ -58,6 +58,7 @@ public class SegmentPlaybackController {
|
||||
/**
|
||||
* Because loading can take time, show the skip to highlight for a few seconds after the segments load.
|
||||
* This is the system time (in milliseconds) to no longer show the initial display skip to highlight.
|
||||
* Value will be zero if no highlight segment exists, or if the system time to show the highlight has passed.
|
||||
*/
|
||||
private static long highlightSegmentInitialShowEndTime;
|
||||
|
||||
@@ -198,7 +199,7 @@ public class SegmentPlaybackController {
|
||||
return;
|
||||
}
|
||||
if (PlayerType.getCurrent().isNoneOrHidden()) {
|
||||
LogHelper.printDebug(() -> "ignoring short or story");
|
||||
LogHelper.printDebug(() -> "ignoring Short");
|
||||
return;
|
||||
}
|
||||
if (!ReVancedUtils.isNetworkConnected()) {
|
||||
@@ -238,14 +239,20 @@ public class SegmentPlaybackController {
|
||||
setSegments(segments);
|
||||
|
||||
final long videoTime = VideoInformation.getVideoTime();
|
||||
// if the current video time is before the highlight
|
||||
if (highlightSegment != null && videoTime < highlightSegment.end) {
|
||||
if (highlightSegment.shouldAutoSkip()) {
|
||||
skipSegment(highlightSegment, false);
|
||||
return;
|
||||
if (highlightSegment != null) {
|
||||
// If the current video time is before the highlight.
|
||||
final long timeUntilHighlight = highlightSegment.start - videoTime;
|
||||
if (timeUntilHighlight > 0) {
|
||||
if (highlightSegment.shouldAutoSkip()) {
|
||||
skipSegment(highlightSegment, false);
|
||||
return;
|
||||
}
|
||||
highlightSegmentInitialShowEndTime = System.currentTimeMillis() + Math.min(
|
||||
(long) (timeUntilHighlight / VideoInformation.getPlaybackSpeed()),
|
||||
DURATION_TO_SHOW_SKIP_BUTTON);
|
||||
}
|
||||
highlightSegmentInitialShowEndTime = System.currentTimeMillis() + DURATION_TO_SHOW_SKIP_BUTTON;
|
||||
}
|
||||
|
||||
// check for any skips now, instead of waiting for the next update to setVideoTime()
|
||||
setVideoTime(videoTime);
|
||||
});
|
||||
@@ -262,7 +269,7 @@ public class SegmentPlaybackController {
|
||||
public static void setVideoTime(long millis) {
|
||||
try {
|
||||
if (!SettingsEnum.SB_ENABLED.getBoolean()
|
||||
|| PlayerType.getCurrent().isNoneOrHidden() // shorts playback
|
||||
|| PlayerType.getCurrent().isNoneOrHidden() // Shorts playback.
|
||||
|| segments == null || segments.length == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -270,11 +277,17 @@ public class SegmentPlaybackController {
|
||||
|
||||
updateHiddenSegments(millis);
|
||||
|
||||
// to debug the timing logic, set this to a very large value (5000 or more)
|
||||
// then try manually seeking just playback reaches a skip/hide of different segments
|
||||
final long lookAheadMilliseconds = 1500; // must be larger than the average time between calls to this method
|
||||
final float playbackSpeed = VideoInformation.getPlaybackSpeed();
|
||||
final long startTimerLookAheadThreshold = millis + (long)(playbackSpeed * lookAheadMilliseconds);
|
||||
// Amount of time to look ahead for the next segment,
|
||||
// and the threshold to determine if a scheduled show/hide is at the correct video time when it's run.
|
||||
//
|
||||
// This value must be greater than largest time between calls to this method (1000ms),
|
||||
// and must be adjusted for the video speed.
|
||||
//
|
||||
// To debug the stale skip logic, set this to a very large value (5000 or more)
|
||||
// then try manually seeking just before playback reaches a segment skip.
|
||||
final long speedAdjustedTimeThreshold = (long)(playbackSpeed * 1200);
|
||||
final long startTimerLookAheadThreshold = millis + speedAdjustedTimeThreshold;
|
||||
|
||||
SponsorSegment foundSegmentCurrentlyPlaying = null;
|
||||
SponsorSegment foundUpcomingSegment = null;
|
||||
@@ -344,9 +357,11 @@ public class SegmentPlaybackController {
|
||||
}
|
||||
|
||||
if (highlightSegment != null) {
|
||||
if (millis < DURATION_TO_SHOW_SKIP_BUTTON || System.currentTimeMillis() < highlightSegmentInitialShowEndTime) {
|
||||
if (millis < DURATION_TO_SHOW_SKIP_BUTTON || (highlightSegmentInitialShowEndTime != 0
|
||||
&& System.currentTimeMillis() < highlightSegmentInitialShowEndTime)) {
|
||||
SponsorBlockViewController.showSkipHighlightButton(highlightSegment);
|
||||
} else {
|
||||
highlightSegmentInitialShowEndTime = 0;
|
||||
SponsorBlockViewController.hideSkipHighlightButton();
|
||||
}
|
||||
}
|
||||
@@ -361,12 +376,9 @@ public class SegmentPlaybackController {
|
||||
SponsorBlockViewController.hideSkipSegmentButton();
|
||||
}
|
||||
|
||||
// must be greater than the average time between updates to VideoInformation time
|
||||
final long videoInformationTimeUpdateThresholdMilliseconds = 250;
|
||||
|
||||
// schedule a hide, only if the segment end is near
|
||||
final SponsorSegment segmentToHide =
|
||||
(foundSegmentCurrentlyPlaying != null && foundSegmentCurrentlyPlaying.endIsNear(millis, lookAheadMilliseconds))
|
||||
(foundSegmentCurrentlyPlaying != null && foundSegmentCurrentlyPlaying.endIsNear(millis, speedAdjustedTimeThreshold))
|
||||
? foundSegmentCurrentlyPlaying
|
||||
: null;
|
||||
|
||||
@@ -384,9 +396,13 @@ public class SegmentPlaybackController {
|
||||
return;
|
||||
}
|
||||
scheduledHideSegment = null;
|
||||
if (VideoState.getCurrent() != VideoState.PLAYING) {
|
||||
LogHelper.printDebug(() -> "Ignoring scheduled hide segment as video is paused: " + segmentToHide);
|
||||
return;
|
||||
}
|
||||
|
||||
final long videoTime = VideoInformation.getVideoTime();
|
||||
if (!segmentToHide.endIsNear(videoTime, videoInformationTimeUpdateThresholdMilliseconds)) {
|
||||
if (!segmentToHide.endIsNear(videoTime, speedAdjustedTimeThreshold)) {
|
||||
// current video time is not what's expected. User paused playback
|
||||
LogHelper.printDebug(() -> "Ignoring outdated scheduled hide: " + segmentToHide
|
||||
+ " videoInformation time: " + videoTime);
|
||||
@@ -419,10 +435,13 @@ public class SegmentPlaybackController {
|
||||
return;
|
||||
}
|
||||
scheduledUpcomingSegment = null;
|
||||
if (VideoState.getCurrent() != VideoState.PLAYING) {
|
||||
LogHelper.printDebug(() -> "Ignoring scheduled hide segment as video is paused: " + segmentToSkip);
|
||||
return;
|
||||
}
|
||||
|
||||
final long videoTime = VideoInformation.getVideoTime();
|
||||
if (!segmentToSkip.startIsNear(videoTime,
|
||||
videoInformationTimeUpdateThresholdMilliseconds)) {
|
||||
if (!segmentToSkip.startIsNear(videoTime, speedAdjustedTimeThreshold)) {
|
||||
// current video time is not what's expected. User paused playback
|
||||
LogHelper.printDebug(() -> "Ignoring outdated scheduled segment: " + segmentToSkip
|
||||
+ " videoInformation time: " + videoTime);
|
||||
@@ -488,10 +507,10 @@ public class SegmentPlaybackController {
|
||||
SponsorBlockViewController.hideSkipHighlightButton();
|
||||
SponsorBlockViewController.hideSkipSegmentButton();
|
||||
|
||||
// If trying to seek to end of the video, YouTube can seek just short of the actual end.
|
||||
// If trying to seek to end of the video, YouTube can seek just before of the actual end.
|
||||
// (especially if the video does not end on a whole second boundary).
|
||||
// This causes additional segment skip attempts, even though it cannot seek any closer to the desired time.
|
||||
// Check for and ignore repeated skip attempts of the same segment over a short time period.
|
||||
// Check for and ignore repeated skip attempts of the same segment over a small time period.
|
||||
final long now = System.currentTimeMillis();
|
||||
final long minimumMillisecondsBetweenSkippingSameSegment = 500;
|
||||
if ((lastSegmentSkipped == segmentToSkip) && (now - lastSegmentSkippedTime < minimumMillisecondsBetweenSkippingSameSegment)) {
|
||||
|
||||
@@ -45,7 +45,7 @@ class SwipeControlsConfigurationProvider(
|
||||
*/
|
||||
val overwriteVolumeKeyControls: Boolean
|
||||
get() = isFullscreenVideo && enableVolumeControls
|
||||
//endregioin
|
||||
//endregion
|
||||
|
||||
//region gesture adjustments
|
||||
/**
|
||||
@@ -94,5 +94,15 @@ class SwipeControlsConfigurationProvider(
|
||||
val overlayForegroundColor: Int
|
||||
get() = Color.WHITE
|
||||
|
||||
//endregion
|
||||
|
||||
//region behaviour
|
||||
|
||||
/**
|
||||
* should the brightness be saved and restored when exiting or entering fullscreen
|
||||
*/
|
||||
val shouldSaveAndRestoreBrightness: Boolean
|
||||
get() = SettingsEnum.SWIPE_SAVE_AND_RESTORE_BRIGHTNESS.boolean
|
||||
|
||||
//endregion
|
||||
}
|
||||
@@ -168,13 +168,14 @@ class SwipeControlsHostActivity : Activity() {
|
||||
* @param type the new player type
|
||||
*/
|
||||
private fun onPlayerTypeChanged(type: PlayerType) {
|
||||
when (type) {
|
||||
PlayerType.WATCH_WHILE_FULLSCREEN -> screen?.restore()
|
||||
else -> {
|
||||
screen?.save()
|
||||
screen?.restoreDefaultBrightness()
|
||||
if (config.shouldSaveAndRestoreBrightness)
|
||||
when (type) {
|
||||
PlayerType.WATCH_WHILE_FULLSCREEN -> screen?.restore()
|
||||
else -> {
|
||||
screen?.save()
|
||||
screen?.restoreDefaultBrightness()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package app.revanced.reddit.patches;
|
||||
|
||||
import com.reddit.domain.model.ILink;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class FilterPromotedLinksPatch {
|
||||
/**
|
||||
* Filters list from promoted links.
|
||||
**/
|
||||
public static List<?> filterChildren(final Iterable<?> links) {
|
||||
final List<Object> filteredList = new ArrayList<>();
|
||||
|
||||
for (Object item : links) {
|
||||
if (item instanceof ILink && ((ILink) item).getPromoted()) continue;
|
||||
|
||||
filteredList.add(item);
|
||||
}
|
||||
|
||||
return filteredList;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package app.revanced.reddit.patches;
|
||||
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
public final class SanitizeUrlQueryPatch {
|
||||
/**
|
||||
* Strip query parameters from a given URL string.
|
||||
*
|
||||
* @param urlString URL string to strip query parameters from.
|
||||
* @return URL string without query parameters if possible, otherwise the original string.
|
||||
*/
|
||||
public static String stripQueryParameters(final String urlString) {
|
||||
try {
|
||||
final var url = new URL(urlString);
|
||||
|
||||
return url.getProtocol() + "://" + url.getHost() + url.getPath();
|
||||
} catch (MalformedURLException e) {
|
||||
LogHelper.printException(() -> "Can not parse URL", e);
|
||||
return urlString;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.0.1")
|
||||
classpath("com.android.tools.build:gradle:7.4.2")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package android.support.v7.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
public class RecyclerView extends View {
|
||||
|
||||
public RecyclerView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public View getChildAt(@SuppressWarnings("unused") final int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
10
dummy/src/main/java/com/facebook/litho/ComponentHost.java
Normal file
10
dummy/src/main/java/com/facebook/litho/ComponentHost.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.facebook.litho;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
||||
public final class ComponentHost extends RecyclerView {
|
||||
public ComponentHost(Context context) {
|
||||
super(context);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user