This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
304 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/src/main/java/app/revanced/integrations/patches/DisableFullscreenAmbientModePatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package app.revanced.integrations.patches; | ||
|
||
import app.revanced.integrations.settings.SettingsEnum; | ||
|
||
/** @noinspection unused*/ | ||
public final class DisableFullscreenAmbientModePatch { | ||
public static boolean enableFullScreenAmbientMode() { | ||
return !SettingsEnum.DISABLE_FULLSCREEN_AMBIENT_MODE.getBoolean(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/src/main/java/app/revanced/integrations/patches/DisableSuggestedVideoEndScreenPatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package app.revanced.integrations.patches; | ||
|
||
import android.annotation.SuppressLint; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ImageView; | ||
import app.revanced.integrations.settings.SettingsEnum; | ||
|
||
/** @noinspection unused*/ | ||
public final class DisableSuggestedVideoEndScreenPatch { | ||
@SuppressLint("StaticFieldLeak") | ||
private static View lastView; | ||
|
||
public static void closeEndScreen(final ImageView imageView) { | ||
if (!SettingsEnum.DISABLE_SUGGESTED_VIDEO_END_SCREEN.getBoolean()) return; | ||
|
||
// Get the view which can be listened to for layout changes. | ||
final var parent = imageView.getParent().getParent(); | ||
|
||
// Prevent adding the listener multiple times. | ||
if (lastView == parent) return; | ||
|
||
lastView = (ViewGroup)parent; | ||
lastView.addOnLayoutChangeListener((view, i, i1, i2, i3, i4, i5, i6, i7) -> imageView.performClick()); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/app/revanced/integrations/patches/EnableOldSeekbarThumbnailsPatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.revanced.integrations.patches; | ||
|
||
import app.revanced.integrations.settings.SettingsEnum; | ||
|
||
public final class EnableOldSeekbarThumbnailsPatch { | ||
public static boolean enableOldSeekbarThumbnails() { | ||
return !SettingsEnum.ENABLE_OLD_SEEKBAR_THUMBNAILS.getBoolean(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.