Skip to content

Commit 0fca3e8

Browse files
author
LisoUseInAIKyrios
authored
chore: Merge branch dev to main (#5115)
2 parents a2eae0b + c09255e commit 0fca3e8

File tree

84 files changed

+1307
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1307
-467
lines changed

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
1+
# [5.27.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.8...v5.27.0-dev.9) (2025-06-09)
2+
3+
4+
### Features
5+
6+
* **Messenger:** Add `Hide Facebook button` patch ([#5057](https://github.com/ReVanced/revanced-patches/issues/5057)) ([9175b23](https://github.com/ReVanced/revanced-patches/commit/9175b23e8360d13c8c1c9c8602ca0b5931d13627))
7+
8+
# [5.27.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v5.27.0-dev.7...v5.27.0-dev.8) (2025-06-09)
9+
10+
11+
### Features
12+
13+
* Add `Hide app icon` patch ([#4977](https://github.com/ReVanced/revanced-patches/issues/4977)) ([92311b8](https://github.com/ReVanced/revanced-patches/commit/92311b8e5675f3d4b80ed690d34b699fb847e3cd))
14+
15+
# [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)
16+
17+
18+
### Features
19+
20+
* **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))
21+
22+
# [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)
23+
24+
25+
### Features
26+
27+
* **YouTube - Hide Shorts components:** Add hide 'New posts' button ([ac6b916](https://github.com/ReVanced/revanced-patches/commit/ac6b916c0c212167c4645e2110500dc811b3e54a))
28+
29+
# [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)
30+
31+
32+
### Features
33+
34+
* **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))
35+
36+
# [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)
37+
38+
39+
### Bug Fixes
40+
41+
* **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))
42+
43+
# [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)
44+
45+
46+
### Bug Fixes
47+
48+
* **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))
49+
50+
# [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)
51+
52+
53+
### Bug Fixes
54+
55+
* **YouTube - Video quality:** Remove non-functional Shorts 144p default quality ([3113cd6](https://github.com/ReVanced/revanced-patches/commit/3113cd6d092952c8657454452f34c0ae85358ec9))
56+
57+
# [5.27.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.26.1-dev.3...v5.27.0-dev.1) (2025-06-05)
58+
59+
60+
### Features
61+
62+
* **YouTube - Theme:** Add option for black and white splash screen animation ([#5119](https://github.com/ReVanced/revanced-patches/issues/5119)) ([42db0c2](https://github.com/ReVanced/revanced-patches/commit/42db0c2e36fefccdbeaa072edcec48b1e05b6270))
63+
64+
## [5.26.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.26.1-dev.2...v5.26.1-dev.3) (2025-06-05)
65+
66+
67+
### Bug Fixes
68+
69+
* **Spotify:** Prevent hiding all navigation bar buttons ([#5122](https://github.com/ReVanced/revanced-patches/issues/5122)) ([8afbef0](https://github.com/ReVanced/revanced-patches/commit/8afbef01343c1e3e6e7e4a4cec6319aebfa4b11c))
70+
71+
## [5.26.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.26.1-dev.1...v5.26.1-dev.2) (2025-06-05)
72+
73+
74+
### Bug Fixes
75+
76+
* **YouTube - Hide layout components:** Remove broken option 'Hide comments emoji picker' ([#5121](https://github.com/ReVanced/revanced-patches/issues/5121)) ([9a6a639](https://github.com/ReVanced/revanced-patches/commit/9a6a639c4905b00d6dffb0923c839c8e3ae54d0c))
77+
78+
## [5.26.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.26.0...v5.26.1-dev.1) (2025-06-05)
79+
80+
81+
### Bug Fixes
82+
83+
* **YouTube - Hide Shorts components:** Disable A/B player flags that prevents hiding buttons ([bef0dac](https://github.com/ReVanced/revanced-patches/commit/bef0dacac54caf1ca9511d7bc19b19140ccb4eaf))
84+
185
# [5.26.0](https://github.com/ReVanced/revanced-patches/compare/v5.25.0...v5.26.0) (2025-06-04)
286

387

extensions/messenger/src/main/java/app/revanced/extension/messenger/metaai/RemoveMetaAIPatch.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
@SuppressWarnings("unused")
44
public class RemoveMetaAIPatch {
5-
public static boolean overrideConfigBool(long id, boolean value) {
6-
// It seems like all configs starting with 363219 are related to Meta AI.
7-
// A list of specific ones that need disabling would probably be better,
8-
// but these config numbers seem to change slightly with each update.
9-
// These first 6 digits don't though.
10-
if (Long.toString(id).startsWith("363219"))
5+
public static boolean overrideBooleanFlag(long id, boolean value) {
6+
// This catches all flag IDs related to Meta AI.
7+
// The IDs change slightly with every update,
8+
// so to work around this, IDs from different versions were compared
9+
// to find what they have in common, which turned out to be those first bits.
10+
// TODO: Find the specific flags that we care about and patch the code they control instead.
11+
if ((id & 0x7FFFFFC000000000L) == 0x810A8000000000L) {
1112
return false;
13+
}
1214

1315
return value;
1416
}

extensions/spotify/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66

77
android {
88
defaultConfig {
9-
minSdk = 24
9+
minSdk = 21
1010
}
1111

1212
compileOptions {

extensions/spotify/src/main/java/app/revanced/extension/spotify/layout/hide/createbutton/HideCreateButtonPatch.java

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,30 @@
22

33
import java.util.List;
44

5-
import app.revanced.extension.shared.Utils;
5+
import app.revanced.extension.shared.Logger;
6+
import app.revanced.extension.spotify.shared.ComponentFilters.*;
67

78
@SuppressWarnings("unused")
89
public final class HideCreateButtonPatch {
910

1011
/**
11-
* A list of ids of resources which contain the Create button title.
12+
* A list of component filters that match whether a navigation bar item is the Create button.
13+
* The main approach used is matching the resource id for the Create button title.
1214
*/
13-
private static final List<String> CREATE_BUTTON_TITLE_RES_ID_LIST = List.of(
14-
Integer.toString(Utils.getResourceIdentifier("navigationbar_musicappitems_create_title", "string"))
15+
private static final List<ComponentFilter> CREATE_BUTTON_COMPONENT_FILTERS = List.of(
16+
new ResourceIdComponentFilter("navigationbar_musicappitems_create_title", "string"),
17+
// Temporary fallback and fix for APKs merged with AntiSplit-M not having resources properly encoded,
18+
// and thus getting the resource identifier for the Create button title always return 0.
19+
// FIXME: Remove this once the above issue is no longer relevant.
20+
new StringComponentFilter("spotify:create-menu")
1521
);
1622

1723
/**
18-
* The old id of the resource which contained the Create button title. Used in older versions of the app.
24+
* A component filter for the old id of the resource which contained the Create button title.
25+
* Used in older versions of the app.
1926
*/
20-
private static final int OLD_CREATE_BUTTON_TITLE_RES_ID =
21-
Utils.getResourceIdentifier("bottom_navigation_bar_create_tab_title", "string");
27+
private static final ResourceIdComponentFilter OLD_CREATE_BUTTON_COMPONENT_FILTER =
28+
new ResourceIdComponentFilter("bottom_navigation_bar_create_tab_title", "string");
2229

2330
/**
2431
* Injection point. This method is called on every navigation bar item to check whether it is the Create button.
@@ -31,11 +38,19 @@ public static Object returnNullIfIsCreateButton(Object navigationBarItem) {
3138
}
3239

3340
String stringifiedNavigationBarItem = navigationBarItem.toString();
34-
boolean isCreateButton = CREATE_BUTTON_TITLE_RES_ID_LIST.stream()
35-
.anyMatch(stringifiedNavigationBarItem::contains);
3641

37-
if (isCreateButton) {
38-
return null;
42+
for (ComponentFilter componentFilter : CREATE_BUTTON_COMPONENT_FILTERS) {
43+
if (componentFilter.filterUnavailable()) {
44+
Logger.printInfo(() -> "returnNullIfIsCreateButton: Filter " +
45+
componentFilter.getFilterRepresentation() + " not available, skipping");
46+
continue;
47+
}
48+
49+
if (stringifiedNavigationBarItem.contains(componentFilter.getFilterValue())) {
50+
Logger.printInfo(() -> "Hiding Create button because the navigation bar item " + navigationBarItem +
51+
" matched the filter " + componentFilter.getFilterRepresentation());
52+
return null;
53+
}
3954
}
4055

4156
return navigationBarItem;
@@ -46,6 +61,18 @@ public static Object returnNullIfIsCreateButton(Object navigationBarItem) {
4661
* Create button.
4762
*/
4863
public static boolean isOldCreateButton(int oldNavigationBarItemTitleResId) {
49-
return oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_TITLE_RES_ID;
64+
if (OLD_CREATE_BUTTON_COMPONENT_FILTER.filterUnavailable()) {
65+
Logger.printInfo(() -> "Skipping hiding old Create button because the resource id for " +
66+
OLD_CREATE_BUTTON_COMPONENT_FILTER.resourceName + " is not available");
67+
return false;
68+
}
69+
70+
if (oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_COMPONENT_FILTER.getResourceId()) {
71+
Logger.printInfo(() -> "Hiding old Create button because the navigation bar item title resource id" +
72+
" matched " + OLD_CREATE_BUTTON_COMPONENT_FILTER.getFilterRepresentation());
73+
return true;
74+
}
75+
76+
return false;
5077
}
5178
}

extensions/spotify/src/main/java/app/revanced/extension/spotify/misc/privacy/SanitizeSharingLinksPatch.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ public static String sanitizeUrl(String url) {
3333
}
3434
}
3535

36-
return builder.build().toString();
36+
String sanitizedUrl = builder.build().toString();
37+
Logger.printInfo(() -> "Sanitized url " + url + " to " + sanitizedUrl);
38+
return sanitizedUrl;
3739
} catch (Exception ex) {
38-
Logger.printException(() -> "sanitizeUrl failure", ex);
39-
40+
Logger.printException(() -> "sanitizeUrl failure with " + url, ex);
4041
return url;
4142
}
4243
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package app.revanced.extension.spotify.shared;
2+
3+
import app.revanced.extension.shared.Logger;
4+
import app.revanced.extension.shared.Utils;
5+
6+
public final class ComponentFilters {
7+
8+
public interface ComponentFilter {
9+
String getFilterValue();
10+
String getFilterRepresentation();
11+
default boolean filterUnavailable() {
12+
return false;
13+
}
14+
}
15+
16+
public static final class ResourceIdComponentFilter implements ComponentFilter {
17+
18+
public final String resourceName;
19+
public final String resourceType;
20+
// Android resources are always positive, so -1 is a valid sentinel value to indicate it has not been loaded.
21+
// 0 is returned when a resource has not been found.
22+
private int resourceId = -1;
23+
private String stringfiedResourceId = null;
24+
25+
public ResourceIdComponentFilter(String resourceName, String resourceType) {
26+
this.resourceName = resourceName;
27+
this.resourceType = resourceType;
28+
}
29+
30+
public int getResourceId() {
31+
if (resourceId == -1) {
32+
resourceId = Utils.getResourceIdentifier(resourceName, resourceType);
33+
}
34+
return resourceId;
35+
}
36+
37+
@Override
38+
public String getFilterValue() {
39+
if (stringfiedResourceId == null) {
40+
stringfiedResourceId = Integer.toString(getResourceId());
41+
}
42+
return stringfiedResourceId;
43+
}
44+
45+
@Override
46+
public String getFilterRepresentation() {
47+
boolean resourceFound = getResourceId() != 0;
48+
return (resourceFound ? getFilterValue() + " (" : "") + resourceName + (resourceFound ? ")" : "");
49+
}
50+
51+
@Override
52+
public boolean filterUnavailable() {
53+
boolean resourceNotFound = getResourceId() == 0;
54+
if (resourceNotFound) {
55+
Logger.printInfo(() -> "Resource id for " + resourceName + " was not found");
56+
}
57+
return resourceNotFound;
58+
}
59+
}
60+
61+
public static final class StringComponentFilter implements ComponentFilter {
62+
63+
public final String string;
64+
65+
public StringComponentFilter(String string) {
66+
this.string = string;
67+
}
68+
69+
@Override
70+
public String getFilterValue() {
71+
return string;
72+
}
73+
74+
@Override
75+
public String getFilterRepresentation() {
76+
return string;
77+
}
78+
}
79+
}

extensions/spotify/stub/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77
compileSdk = 34
88

99
defaultConfig {
10-
minSdk = 24
10+
minSdk = 21
1111
}
1212

1313
compileOptions {

extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HidePlayerOverlayButtonsPatch.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package app.revanced.extension.youtube.patches;
22

33
import android.view.View;
4+
import android.view.ViewGroup;
45
import android.widget.ImageView;
56

67
import app.revanced.extension.shared.Logger;
@@ -58,6 +59,22 @@ public static void hidePreviousNextButtons(View parentView) {
5859
});
5960
}
6061

62+
/**
63+
* Injection point.
64+
*/
65+
public static void hidePlayerControlButtonsBackground(View rootView) {
66+
try {
67+
if (!Settings.HIDE_PLAYER_CONTROL_BUTTONS_BACKGROUND.get()) {
68+
return;
69+
}
70+
71+
// Each button is an ImageView with a background set to another drawable.
72+
removeImageViewsBackgroundRecursive(rootView);
73+
} catch (Exception ex) {
74+
Logger.printException(() -> "removePlayerControlButtonsBackground failure", ex);
75+
}
76+
}
77+
6178
private static void hideView(View parentView, int resourceId) {
6279
View nextPreviousButton = parentView.findViewById(resourceId);
6380

@@ -69,4 +86,16 @@ private static void hideView(View parentView, int resourceId) {
6986
Logger.printDebug(() -> "Hiding previous/next button");
7087
Utils.hideViewByRemovingFromParentUnderCondition(true, nextPreviousButton);
7188
}
89+
90+
private static void removeImageViewsBackgroundRecursive(View currentView) {
91+
if (currentView instanceof ImageView imageView) {
92+
imageView.setBackground(null);
93+
}
94+
95+
if (currentView instanceof ViewGroup viewGroup) {
96+
for (int i = 0; i < viewGroup.getChildCount(); i++) {
97+
removeImageViewsBackgroundRecursive(viewGroup.getChildAt(i));
98+
}
99+
}
100+
}
72101
}

0 commit comments

Comments
 (0)