mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-25 10:24:08 +01:00
Compare commits
10 Commits
v5.27.0-de
...
v5.27.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad416f4aa7 | ||
|
|
adfac8a1f2 | ||
|
|
498488d45b | ||
|
|
f8e31c820a | ||
|
|
826a391591 | ||
|
|
af827e2f1a | ||
|
|
97cd31509e | ||
|
|
c0448dece4 | ||
|
|
f00a95c0d8 | ||
|
|
7a432e5741 |
35
CHANGELOG.md
35
CHANGELOG.md
@@ -1,3 +1,38 @@
|
||||
# [5.27.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.6...v5.27.0-dev.7) (2025-06-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide player overlay buttons:** Add in app setting for "Hide player control buttons background" ([#5147](https://github.com/ReVanced/revanced-patches/issues/5147)) ([dd8afa2](https://github.com/ReVanced/revanced-patches/commit/dd8afa2b07b50be24d764c0f6ddc9e1bbdb91bf1))
|
||||
|
||||
# [5.27.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.5...v5.27.0-dev.6) (2025-06-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide Shorts components:** Add hide 'New posts' button ([ac6b916](https://github.com/ReVanced/revanced-patches/commit/ac6b916c0c212167c4645e2110500dc811b3e54a))
|
||||
|
||||
# [5.27.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.4...v5.27.0-dev.5) (2025-06-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Google Photos:** Add `Enable DCIM folders backup control` patch ([#5138](https://github.com/ReVanced/revanced-patches/issues/5138)) ([328d232](https://github.com/ReVanced/revanced-patches/commit/328d232fe77406fa93a14768fc66e7b998506fba))
|
||||
|
||||
# [5.27.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.3...v5.27.0-dev.4) (2025-06-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Bandcamp - Remove play limits:** Support latest app version ([#5124](https://github.com/ReVanced/revanced-patches/issues/5124)) ([863e92b](https://github.com/ReVanced/revanced-patches/commit/863e92b20ad6682f10524e475ed18f879048ecae))
|
||||
|
||||
# [5.27.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.2...v5.27.0-dev.3) (2025-06-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Spotify:** `Hide Create button` patch failing in edge cases ([#5131](https://github.com/ReVanced/revanced-patches/issues/5131)) ([0923600](https://github.com/ReVanced/revanced-patches/commit/0923600739a126329fc62100b500216860d7005e))
|
||||
|
||||
# [5.27.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.1...v5.27.0-dev.2) (2025-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -3,23 +3,29 @@ package app.revanced.extension.spotify.layout.hide.createbutton;
|
||||
import java.util.List;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.spotify.shared.ComponentFilters.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class HideCreateButtonPatch {
|
||||
|
||||
/**
|
||||
* A list of ids of resources which contain the Create button title.
|
||||
* A list of component filters that match whether a navigation bar item is the Create button.
|
||||
* The main approach used is matching the resource id for the Create button title.
|
||||
*/
|
||||
private static final List<String> CREATE_BUTTON_TITLE_RES_ID_LIST = List.of(
|
||||
Integer.toString(Utils.getResourceIdentifier("navigationbar_musicappitems_create_title", "string"))
|
||||
private static final List<ComponentFilter> CREATE_BUTTON_COMPONENT_FILTERS = List.of(
|
||||
new ResourceIdComponentFilter("navigationbar_musicappitems_create_title", "string"),
|
||||
// Temporary fallback and fix for APKs merged with AntiSplit-M not having resources properly encoded,
|
||||
// and thus getting the resource identifier for the Create button title always return 0.
|
||||
// FIXME: Remove this once the above issue is no longer relevant.
|
||||
new StringComponentFilter("spotify:create-menu")
|
||||
);
|
||||
|
||||
/**
|
||||
* The old id of the resource which contained the Create button title. Used in older versions of the app.
|
||||
* A component filter for the old id of the resource which contained the Create button title.
|
||||
* Used in older versions of the app.
|
||||
*/
|
||||
private static final int OLD_CREATE_BUTTON_TITLE_RES_ID =
|
||||
Utils.getResourceIdentifier("bottom_navigation_bar_create_tab_title", "string");
|
||||
private static final ResourceIdComponentFilter OLD_CREATE_BUTTON_COMPONENT_FILTER =
|
||||
new ResourceIdComponentFilter("bottom_navigation_bar_create_tab_title", "string");
|
||||
|
||||
/**
|
||||
* Injection point. This method is called on every navigation bar item to check whether it is the Create button.
|
||||
@@ -33,28 +39,20 @@ public final class HideCreateButtonPatch {
|
||||
|
||||
String stringifiedNavigationBarItem = navigationBarItem.toString();
|
||||
|
||||
boolean isCreateButton = false;
|
||||
String matchedTitleResId = null;
|
||||
|
||||
for (String titleResId : CREATE_BUTTON_TITLE_RES_ID_LIST) {
|
||||
// In case the resource id has not been found.
|
||||
if (titleResId.equals("0")) {
|
||||
for (ComponentFilter componentFilter : CREATE_BUTTON_COMPONENT_FILTERS) {
|
||||
if (componentFilter.filterUnavailable()) {
|
||||
Logger.printInfo(() -> "returnNullIfIsCreateButton: Filter " +
|
||||
componentFilter.getFilterRepresentation() + " not available, skipping");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stringifiedNavigationBarItem.contains(titleResId)) {
|
||||
isCreateButton = true;
|
||||
matchedTitleResId = titleResId;
|
||||
if (stringifiedNavigationBarItem.contains(componentFilter.getFilterValue())) {
|
||||
Logger.printInfo(() -> "Hiding Create button because the navigation bar item " + navigationBarItem +
|
||||
" matched the filter " + componentFilter.getFilterRepresentation());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (isCreateButton) {
|
||||
String finalMatchedTitleResId = matchedTitleResId;
|
||||
Logger.printInfo(() -> "Hiding Create button because the navigation bar item " + navigationBarItem +
|
||||
" matched the title resource id " + finalMatchedTitleResId);
|
||||
return null;
|
||||
}
|
||||
|
||||
return navigationBarItem;
|
||||
}
|
||||
|
||||
@@ -63,16 +61,15 @@ public final class HideCreateButtonPatch {
|
||||
* Create button.
|
||||
*/
|
||||
public static boolean isOldCreateButton(int oldNavigationBarItemTitleResId) {
|
||||
// In case the resource id has not been found.
|
||||
if (OLD_CREATE_BUTTON_TITLE_RES_ID == 0) {
|
||||
if (OLD_CREATE_BUTTON_COMPONENT_FILTER.filterUnavailable()) {
|
||||
Logger.printInfo(() -> "Skipping hiding old Create button because the resource id for " +
|
||||
OLD_CREATE_BUTTON_COMPONENT_FILTER.resourceName + " is not available");
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isCreateButton = oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_TITLE_RES_ID;
|
||||
|
||||
if (isCreateButton) {
|
||||
if (oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_COMPONENT_FILTER.getResourceId()) {
|
||||
Logger.printInfo(() -> "Hiding old Create button because the navigation bar item title resource id" +
|
||||
" matched " + OLD_CREATE_BUTTON_TITLE_RES_ID);
|
||||
" matched " + OLD_CREATE_BUTTON_COMPONENT_FILTER.getFilterRepresentation());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package app.revanced.extension.spotify.shared;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
|
||||
public final class ComponentFilters {
|
||||
|
||||
public interface ComponentFilter {
|
||||
String getFilterValue();
|
||||
String getFilterRepresentation();
|
||||
default boolean filterUnavailable() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static final class ResourceIdComponentFilter implements ComponentFilter {
|
||||
|
||||
public final String resourceName;
|
||||
public final String resourceType;
|
||||
// Android resources are always positive, so -1 is a valid sentinel value to indicate it has not been loaded.
|
||||
// 0 is returned when a resource has not been found.
|
||||
private int resourceId = -1;
|
||||
private String stringfiedResourceId = null;
|
||||
|
||||
public ResourceIdComponentFilter(String resourceName, String resourceType) {
|
||||
this.resourceName = resourceName;
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public int getResourceId() {
|
||||
if (resourceId == -1) {
|
||||
resourceId = Utils.getResourceIdentifier(resourceName, resourceType);
|
||||
}
|
||||
return resourceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilterValue() {
|
||||
if (stringfiedResourceId == null) {
|
||||
stringfiedResourceId = Integer.toString(getResourceId());
|
||||
}
|
||||
return stringfiedResourceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilterRepresentation() {
|
||||
boolean resourceFound = getResourceId() != 0;
|
||||
return (resourceFound ? getFilterValue() + " (" : "") + resourceName + (resourceFound ? ")" : "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterUnavailable() {
|
||||
boolean resourceNotFound = getResourceId() == 0;
|
||||
if (resourceNotFound) {
|
||||
Logger.printInfo(() -> "Resource id for " + resourceName + " was not found");
|
||||
}
|
||||
return resourceNotFound;
|
||||
}
|
||||
}
|
||||
|
||||
public static final class StringComponentFilter implements ComponentFilter {
|
||||
|
||||
public final String string;
|
||||
|
||||
public StringComponentFilter(String string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilterValue() {
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilterRepresentation() {
|
||||
return string;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.revanced.extension.youtube.patches;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
@@ -58,6 +59,22 @@ public final class HidePlayerOverlayButtonsPatch {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static void hidePlayerControlButtonsBackground(View rootView) {
|
||||
try {
|
||||
if (!Settings.HIDE_PLAYER_CONTROL_BUTTONS_BACKGROUND.get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Each button is an ImageView with a background set to another drawable.
|
||||
removeImageViewsBackgroundRecursive(rootView);
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "removePlayerControlButtonsBackground failure", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void hideView(View parentView, int resourceId) {
|
||||
View nextPreviousButton = parentView.findViewById(resourceId);
|
||||
|
||||
@@ -69,4 +86,16 @@ public final class HidePlayerOverlayButtonsPatch {
|
||||
Logger.printDebug(() -> "Hiding previous/next button");
|
||||
Utils.hideViewByRemovingFromParentUnderCondition(true, nextPreviousButton);
|
||||
}
|
||||
|
||||
private static void removeImageViewsBackgroundRecursive(View currentView) {
|
||||
if (currentView instanceof ImageView imageView) {
|
||||
imageView.setBackground(null);
|
||||
}
|
||||
|
||||
if (currentView instanceof ViewGroup viewGroup) {
|
||||
for (int i = 0; i < viewGroup.getChildCount(); i++) {
|
||||
removeImageViewsBackgroundRecursive(viewGroup.getChildAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +267,10 @@ public final class ShortsFilter extends Filter {
|
||||
Settings.HIDE_SHORTS_GREEN_SCREEN_BUTTON,
|
||||
"greenscreen_temp"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_NEW_POSTS_BUTTON,
|
||||
"yt_outline_box_pencil"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_HASHTAG_BUTTON,
|
||||
"yt_outline_hashtag_"
|
||||
|
||||
@@ -135,6 +135,7 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_AUTOPLAY_BUTTON = new BooleanSetting("revanced_hide_autoplay_button", TRUE, true);
|
||||
public static final BooleanSetting HIDE_CAPTIONS_BUTTON = new BooleanSetting("revanced_hide_captions_button", FALSE);
|
||||
public static final BooleanSetting HIDE_CAST_BUTTON = new BooleanSetting("revanced_hide_cast_button", TRUE, true);
|
||||
public static final BooleanSetting HIDE_PLAYER_CONTROL_BUTTONS_BACKGROUND = new BooleanSetting("revanced_hide_player_control_buttons_background", FALSE, true);
|
||||
public static final BooleanSetting HIDE_CHANNEL_BAR = new BooleanSetting("revanced_hide_channel_bar", FALSE);
|
||||
public static final BooleanSetting HIDE_CHANNEL_MEMBER_SHELF = new BooleanSetting("revanced_hide_channel_member_shelf", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMUNITY_GUIDELINES = new BooleanSetting("revanced_hide_community_guidelines", TRUE);
|
||||
@@ -262,6 +263,7 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_SHORTS_DISLIKE_BUTTON = new BooleanSetting("revanced_hide_shorts_dislike_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_FULL_VIDEO_LINK_LABEL = new BooleanSetting("revanced_hide_shorts_full_video_link_label", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_NEW_POSTS_BUTTON = new BooleanSetting("revanced_hide_shorts_new_posts_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_HISTORY = new BooleanSetting("revanced_hide_shorts_history", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_HOME = new BooleanSetting("revanced_hide_shorts_home", FALSE);
|
||||
|
||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
||||
org.gradle.parallel = true
|
||||
android.useAndroidX = true
|
||||
kotlin.code.style = official
|
||||
version = 5.27.0-dev.2
|
||||
version = 5.27.0-dev.7
|
||||
|
||||
@@ -192,6 +192,10 @@ public final class app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatchK
|
||||
public static final fun getGmsCoreSupportPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatchKt {
|
||||
public static final fun getEnableDCIMFoldersBackupControlPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/googlephotos/misc/extension/ExtensionPatchKt {
|
||||
public static final fun getExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package app.revanced.patches.bandcamp.limitations
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val handlePlaybackLimitsFingerprint = fingerprint {
|
||||
strings("play limits processing track", "found play_count")
|
||||
strings("track_id", "play_count")
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.bandcamp.limitations
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val removePlayLimitsPatch = bytecodePatch(
|
||||
@@ -11,6 +11,6 @@ val removePlayLimitsPatch = bytecodePatch(
|
||||
compatibleWith("com.bandcamp.android")
|
||||
|
||||
execute {
|
||||
handlePlaybackLimitsFingerprint.method.addInstructions(0, "return-void")
|
||||
handlePlaybackLimitsFingerprint.method.returnEarly()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package app.revanced.patches.googlephotos.misc.backup
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val enableDCIMFoldersBackupControlPatch = bytecodePatch(
|
||||
name = "Enable DCIM folders backup control",
|
||||
description = "Disables always on backup for the Camera and other DCIM folders, allowing you to control backup " +
|
||||
"for each folder individually. This will make the app default to having no folders backed up.",
|
||||
use = false,
|
||||
) {
|
||||
compatibleWith("com.google.android.apps.photos")
|
||||
|
||||
execute {
|
||||
isDCIMFolderBackupControlDisabled.method.returnEarly(false)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.googlephotos.misc.backup
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val isDCIMFolderBackupControlDisabled = fingerprint {
|
||||
returns("Z")
|
||||
strings("/dcim", "/mars_files/")
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package app.revanced.patches.youtube.layout.buttons.overlay
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.containsLiteralInstruction
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val playerControlsPreviousNextOverlayTouchFingerprint = fingerprint {
|
||||
@@ -20,3 +21,10 @@ internal val mediaRouteButtonFingerprint = fingerprint {
|
||||
methodDef.definingClass.endsWith("/MediaRouteButton;") && methodDef.name == "setVisibility"
|
||||
}
|
||||
}
|
||||
|
||||
internal val inflateControlsGroupLayoutStubFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
returns("V")
|
||||
literal { controlsButtonGroupLayoutStub }
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ internal var playerControlPreviousButtonTouchArea = -1L
|
||||
private set
|
||||
internal var playerControlNextButtonTouchArea = -1L
|
||||
private set
|
||||
internal var controlsButtonGroupLayoutStub = -1L
|
||||
private set
|
||||
|
||||
private val hidePlayerOverlayButtonsResourcePatch = resourcePatch {
|
||||
dependsOn(resourceMappingPatch)
|
||||
@@ -35,6 +37,7 @@ private val hidePlayerOverlayButtonsResourcePatch = resourcePatch {
|
||||
execute {
|
||||
playerControlPreviousButtonTouchArea = resourceMappings["id", "player_control_previous_button_touch_area"]
|
||||
playerControlNextButtonTouchArea = resourceMappings["id", "player_control_next_button_touch_area"]
|
||||
controlsButtonGroupLayoutStub = resourceMappings["id", "youtube_controls_button_group_layout_stub"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +46,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
|
||||
val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
||||
name = "Hide player overlay buttons",
|
||||
description = "Adds options to hide the player Cast, Autoplay, Captions, and Previous & Next buttons.",
|
||||
description = "Adds options to hide the player Cast, Autoplay, Captions, Previous & Next buttons, and the player " +
|
||||
"control buttons background.",
|
||||
) {
|
||||
dependsOn(
|
||||
sharedExtensionPatch,
|
||||
@@ -72,6 +76,7 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
||||
SwitchPreference("revanced_hide_cast_button"),
|
||||
SwitchPreference("revanced_hide_captions_button"),
|
||||
SwitchPreference("revanced_hide_autoplay_button"),
|
||||
SwitchPreference("revanced_hide_player_control_buttons_background"),
|
||||
)
|
||||
|
||||
// region Hide player next/previous button.
|
||||
@@ -147,5 +152,32 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region Hide player control buttons background.
|
||||
|
||||
inflateControlsGroupLayoutStubFingerprint.method.apply {
|
||||
val controlsButtonGroupLayoutStubResIdConstIndex =
|
||||
indexOfFirstLiteralInstructionOrThrow(controlsButtonGroupLayoutStub)
|
||||
val inflateControlsGroupLayoutStubIndex =
|
||||
indexOfFirstInstruction(controlsButtonGroupLayoutStubResIdConstIndex) {
|
||||
getReference<MethodReference>()?.name == "inflate"
|
||||
}
|
||||
|
||||
val freeRegister = findFreeRegister(inflateControlsGroupLayoutStubIndex)
|
||||
val hidePlayerControlButtonsBackgroundDescriptor =
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->hidePlayerControlButtonsBackground(Landroid/view/View;)V"
|
||||
|
||||
addInstructions(
|
||||
inflateControlsGroupLayoutStubIndex + 1,
|
||||
"""
|
||||
# Move the inflated layout to a temporary register.
|
||||
# The result of the inflate method is by default not moved to a register after the method is called.
|
||||
move-result-object v$freeRegister
|
||||
invoke-static { v$freeRegister }, $hidePlayerControlButtonsBackgroundDescriptor
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
// endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ private val hideShortsComponentsResourcePatch = resourcePatch {
|
||||
SwitchPreference("revanced_hide_shorts_upcoming_button"),
|
||||
SwitchPreference("revanced_hide_shorts_green_screen_button"),
|
||||
SwitchPreference("revanced_hide_shorts_hashtag_button"),
|
||||
SwitchPreference("revanced_hide_shorts_new_posts_button"),
|
||||
SwitchPreference("revanced_hide_shorts_shop_button"),
|
||||
SwitchPreference("revanced_hide_shorts_tagged_products"),
|
||||
SwitchPreference("revanced_hide_shorts_search_suggestions"),
|
||||
|
||||
@@ -1,37 +1,12 @@
|
||||
package app.revanced.patches.youtube.layout.player.background
|
||||
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.util.doRecursively
|
||||
import org.w3c.dom.Element
|
||||
import app.revanced.patches.youtube.layout.buttons.overlay.hidePlayerOverlayButtonsPatch
|
||||
|
||||
@Suppress("unused")
|
||||
@Deprecated("Functionality added to hidePlayerOverlayButtonsPatch", ReplaceWith("hidePlayerOverlayButtonsPatch"))
|
||||
val playerControlsBackgroundPatch = resourcePatch(
|
||||
name = "Remove player controls background",
|
||||
description = "Removes the dark background surrounding the video player controls.",
|
||||
use = false,
|
||||
description = "Removes the dark background surrounding the video player control buttons.",
|
||||
) {
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.16.39",
|
||||
"19.25.37",
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
)
|
||||
)
|
||||
|
||||
execute {
|
||||
document("res/drawable/player_button_circle_background.xml").use { document ->
|
||||
|
||||
document.doRecursively node@{ node ->
|
||||
if (node !is Element) return@node
|
||||
|
||||
node.getAttributeNode("android:color")?.let { attribute ->
|
||||
attribute.textContent = "@android:color/transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dependsOn(hidePlayerOverlayButtonsPatch)
|
||||
}
|
||||
|
||||
@@ -743,6 +743,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
|
||||
<string name="revanced_hide_autoplay_button_title">Hide Autoplay button</string>
|
||||
<string name="revanced_hide_autoplay_button_summary_on">Autoplay button is hidden</string>
|
||||
<string name="revanced_hide_autoplay_button_summary_off">Autoplay button is shown</string>
|
||||
<string name="revanced_hide_player_control_buttons_background_title">Hide player control buttons background</string>
|
||||
<string name="revanced_hide_player_control_buttons_background_summary_on">Player control buttons background is hidden</string>
|
||||
<string name="revanced_hide_player_control_buttons_background_summary_off">Player control buttons background is shown</string>
|
||||
</patch>
|
||||
<patch id="layout.hide.endscreencards.hideEndscreenCardsResourcePatch">
|
||||
<string name="revanced_hide_endscreen_cards_title">Hide end screen cards</string>
|
||||
@@ -827,6 +830,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
|
||||
<string name="revanced_hide_shorts_green_screen_button_title">Hide Green screen button</string>
|
||||
<string name="revanced_hide_shorts_green_screen_button_summary_on">Green screen button is hidden</string>
|
||||
<string name="revanced_hide_shorts_green_screen_button_summary_off">Green screen button is shown</string>
|
||||
<string name="revanced_hide_shorts_new_posts_button_title">Hide New posts button</string>
|
||||
<string name="revanced_hide_shorts_new_posts_button_summary_off">New posts button is shown</string>
|
||||
<string name="revanced_hide_shorts_new_posts_button_summary_on">New posts button is hidden</string>
|
||||
<string name="revanced_hide_shorts_hashtag_button_title">Hide hashtag button</string>
|
||||
<string name="revanced_hide_shorts_hashtag_button_summary_on">Hashtag button is hidden</string>
|
||||
<string name="revanced_hide_shorts_hashtag_button_summary_off">Hashtag button is shown</string>
|
||||
|
||||
Reference in New Issue
Block a user