Skip to content

Commit 7eb4e62

Browse files
author
LisoUseInAIKyrios
authored
chore: Merge branch dev to main (#5227)
2 parents a9e9456 + b8e10b5 commit 7eb4e62

File tree

169 files changed

+2099
-955
lines changed

Some content is hidden

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

169 files changed

+2099
-955
lines changed

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,100 @@
1+
# [5.29.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.10...v5.29.0-dev.11) (2025-06-26)
2+
3+
4+
### Features
5+
6+
* **Cricbuzz:** Add `Hide ads` patch ([#4998](https://github.com/ReVanced/revanced-patches/issues/4998)) ([83ccfa8](https://github.com/ReVanced/revanced-patches/commit/83ccfa8e1b5d5a44c55ef659484acf3cc08d3346))
7+
8+
# [5.29.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.9...v5.29.0-dev.10) (2025-06-25)
9+
10+
11+
### Features
12+
13+
* **YouTube - Hide Shorts components:** Add `Hide Effects button` ([#5255](https://github.com/ReVanced/revanced-patches/issues/5255)) ([240897a](https://github.com/ReVanced/revanced-patches/commit/240897a94008ce9a148c87bb41b978d553d5a6f5))
14+
15+
# [5.29.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.8...v5.29.0-dev.9) (2025-06-25)
16+
17+
18+
### Features
19+
20+
* Add `Spoof app signature` patch ([#5158](https://github.com/ReVanced/revanced-patches/issues/5158)) ([78b25aa](https://github.com/ReVanced/revanced-patches/commit/78b25aa4e87ec3f9df1d57831b48a39029969416))
21+
22+
# [5.29.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.7...v5.29.0-dev.8) (2025-06-25)
23+
24+
25+
### Features
26+
27+
* **YouTube:** Support version `20.13.41` ([#5253](https://github.com/ReVanced/revanced-patches/issues/5253)) ([d284c3d](https://github.com/ReVanced/revanced-patches/commit/d284c3dd3277430b6885e7c27ee02d062dcefc85))
28+
29+
# [5.29.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.6...v5.29.0-dev.7) (2025-06-24)
30+
31+
32+
### Bug Fixes
33+
34+
* **YouTube - Hide layout components:** Fix "Hide video description attributes" ([#5250](https://github.com/ReVanced/revanced-patches/issues/5250)) ([2f22d45](https://github.com/ReVanced/revanced-patches/commit/2f22d45eb80745ac64fbea44c8055ebe7925a586))
35+
* **YouTube - Hide Shorts components:** Fix "Hide Use this template button" ([#5249](https://github.com/ReVanced/revanced-patches/issues/5249)) ([b399ecb](https://github.com/ReVanced/revanced-patches/commit/b399ecbb6a222d82dd5e4b3417c9f7eff4324adb))
36+
37+
# [5.29.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.5...v5.29.0-dev.6) (2025-06-24)
38+
39+
40+
### Features
41+
42+
* **YouTube - Hide video action buttons:** Add `Hide Stop ads` ([#5245](https://github.com/ReVanced/revanced-patches/issues/5245)) ([274dcc6](https://github.com/ReVanced/revanced-patches/commit/274dcc676e009be63eb6970de33abacd34dc6560))
43+
44+
# [5.29.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.4...v5.29.0-dev.5) (2025-06-23)
45+
46+
47+
### Bug Fixes
48+
49+
* **Google Photos:** Resolve startup crash for Android 5.0 devices ([0294533](https://github.com/ReVanced/revanced-patches/commit/0294533c4d9a321aea086eedb4e46385ae9a026e))
50+
51+
# [5.29.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.3...v5.29.0-dev.4) (2025-06-23)
52+
53+
54+
### Bug Fixes
55+
56+
* **YouTube - Hide Shorts components:** Fix "Hide Use this sound button" ([#5233](https://github.com/ReVanced/revanced-patches/issues/5233)) ([5d6ec9e](https://github.com/ReVanced/revanced-patches/commit/5d6ec9e94a6221a0f32762d5bede893e9e7457fc))
57+
58+
# [5.29.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.2...v5.29.0-dev.3) (2025-06-23)
59+
60+
61+
### Bug Fixes
62+
63+
* **YouTube:** Fix refactoring app startup exception ([1b00c90](https://github.com/ReVanced/revanced-patches/commit/1b00c907f4b90f4659afb4a54ba61ac2835b460d))
64+
65+
# [5.29.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.29.0-dev.1...v5.29.0-dev.2) (2025-06-23)
66+
67+
68+
### Features
69+
70+
* **Crunchyroll:** Add `Hide ads` patch ([#5201](https://github.com/ReVanced/revanced-patches/issues/5201)) ([46b4398](https://github.com/ReVanced/revanced-patches/commit/46b4398fd6ca223391ed8f497a8347c2313421b7))
71+
72+
# [5.29.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.28.1-dev.2...v5.29.0-dev.1) (2025-06-23)
73+
74+
75+
### Bug Fixes
76+
77+
* **YouTube:** Always use single threaded layout to resolve layout bugs in unpatched YouTube ([#5226](https://github.com/ReVanced/revanced-patches/issues/5226)) ([1f539b1](https://github.com/ReVanced/revanced-patches/commit/1f539b1396526b2c767d77a804bd0308ee4a42ec))
78+
79+
80+
### Features
81+
82+
* **YouTube:** Add an option to disable toasts when changing default playback speed or quality ([#5230](https://github.com/ReVanced/revanced-patches/issues/5230)) ([c68cde3](https://github.com/ReVanced/revanced-patches/commit/c68cde3a896450874cc571be5c4723387db96032))
83+
84+
## [5.28.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.28.1-dev.1...v5.28.1-dev.2) (2025-06-23)
85+
86+
87+
### Bug Fixes
88+
89+
* **YouTube - Hide ads:** Hide new type of product ad in video description ([#5225](https://github.com/ReVanced/revanced-patches/issues/5225)) ([1e2efad](https://github.com/ReVanced/revanced-patches/commit/1e2efad7b2714c395ed6b0a77cbbf8a2265df520))
90+
91+
## [5.28.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.28.0...v5.28.1-dev.1) (2025-06-22)
92+
93+
94+
### Bug Fixes
95+
96+
* Add scrollable content to modern style settings dialogs ([#5211](https://github.com/ReVanced/revanced-patches/issues/5211)) ([e6876d5](https://github.com/ReVanced/revanced-patches/commit/e6876d510d28f6a3a41ec1722a033b3e30a22c65))
97+
198
# [5.28.0](https://github.com/ReVanced/revanced-patches/compare/v5.27.0...v5.28.0) (2025-06-20)
299

3100

extensions/shared/library/src/main/java/app/revanced/extension/shared/GmsCoreSupport.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import android.widget.LinearLayout;
2020

2121
import androidx.annotation.Nullable;
22-
import androidx.annotation.RequiresApi;
2322

2423
import java.net.HttpURLConnection;
2524
import java.net.MalformedURLException;
@@ -28,7 +27,6 @@
2827

2928
import app.revanced.extension.shared.requests.Requester;
3029
import app.revanced.extension.shared.requests.Route;
31-
import app.revanced.extension.shared.Utils;
3230

3331
@SuppressWarnings("unused")
3432
public class GmsCoreSupport {
@@ -109,7 +107,6 @@ private static void showBatteryOptimizationDialog(Activity context,
109107
/**
110108
* Injection point.
111109
*/
112-
@RequiresApi(api = Build.VERSION_CODES.N)
113110
public static void checkGmsCore(Activity context) {
114111
try {
115112
// Verify the user has not included GmsCore for a root installation.
@@ -157,7 +154,9 @@ public static void checkGmsCore(Activity context) {
157154
}
158155

159156
// Check if GmsCore is currently running in the background.
160-
try (var client = context.getContentResolver().acquireContentProviderClient(GMS_CORE_PROVIDER)) {
157+
var client = context.getContentResolver().acquireContentProviderClient(GMS_CORE_PROVIDER);
158+
//noinspection TryFinallyCanBeTryWithResources
159+
try {
161160
if (client == null) {
162161
Logger.printInfo(() -> "GmsCore is not running in the background");
163162
checkIfDontKillMyAppSupportsManufacturer();
@@ -167,6 +166,8 @@ public static void checkGmsCore(Activity context) {
167166
"gms_core_dialog_open_website_text",
168167
(dialog, id) -> openDontKillMyApp());
169168
}
169+
} finally {
170+
if (client != null) client.close();
170171
}
171172
} catch (Exception ex) {
172173
Logger.printException(() -> "checkGmsCore failure", ex);
@@ -226,6 +227,11 @@ private static void openDontKillMyApp() {
226227
* @return If GmsCore is not whitelisted from battery optimizations.
227228
*/
228229
private static boolean batteryOptimizationsEnabled(Context context) {
230+
//noinspection ObsoleteSdkInt
231+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
232+
// Android 5.0 does not have battery optimization settings.
233+
return false;
234+
}
229235
var powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
230236
return !powerManager.isIgnoringBatteryOptimizations(GMS_CORE_PACKAGE_NAME);
231237
}

extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java

Lines changed: 71 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import android.widget.FrameLayout;
4343
import android.widget.LinearLayout;
4444
import android.widget.RelativeLayout;
45+
import android.widget.ScrollView;
4546
import android.widget.TextView;
4647
import android.widget.Toast;
4748
import android.widget.Toolbar;
@@ -773,16 +774,15 @@ public static Pair<Dialog, LinearLayout> createCustomDialog(
773774
Dialog dialog = new Dialog(context);
774775
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // Remove default title bar.
775776

776-
// Create main layout.
777-
LinearLayout mainLayout = new LinearLayout(context);
778-
mainLayout.setOrientation(LinearLayout.VERTICAL);
779-
780777
// Preset size constants.
781778
final int dip4 = dipToPixels(4);
782779
final int dip8 = dipToPixels(8);
783780
final int dip16 = dipToPixels(16);
784781
final int dip24 = dipToPixels(24);
785782

783+
// Create main layout.
784+
LinearLayout mainLayout = new LinearLayout(context);
785+
mainLayout.setOrientation(LinearLayout.VERTICAL);
786786
mainLayout.setPadding(dip24, dip16, dip24, dip24);
787787
// Set rounded rectangle background.
788788
ShapeDrawable mainBackground = new ShapeDrawable(new RoundRectShape(
@@ -802,55 +802,71 @@ public static Pair<Dialog, LinearLayout> createCustomDialog(
802802
ViewGroup.LayoutParams.MATCH_PARENT,
803803
ViewGroup.LayoutParams.WRAP_CONTENT
804804
);
805-
layoutParams.setMargins(0, 0, 0, dip8);
805+
layoutParams.setMargins(0, 0, 0, dip16);
806806
titleView.setLayoutParams(layoutParams);
807807
mainLayout.addView(titleView);
808808
}
809809

810-
// Message (if not replaced by EditText).
811-
if (editText == null && message != null) {
812-
TextView messageView = new TextView(context);
813-
messageView.setText(message); // Supports Spanned (HTML).
814-
messageView.setTextSize(16);
815-
messageView.setTextColor(getAppForegroundColor());
816-
// Enable HTML link clicking if the message contains links.
817-
if (message instanceof Spanned) {
818-
messageView.setMovementMethod(LinkMovementMethod.getInstance());
810+
// Create content container (message/EditText) inside a ScrollView only if message or editText is provided.
811+
ScrollView contentScrollView = null;
812+
LinearLayout contentContainer = null;
813+
if (message != null || editText != null) {
814+
contentScrollView = new ScrollView(context);
815+
contentScrollView.setVerticalScrollBarEnabled(false); // Disable the vertical scrollbar.
816+
contentScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);
817+
if (editText != null) {
818+
ShapeDrawable scrollViewBackground = new ShapeDrawable(new RoundRectShape(
819+
createCornerRadii(10), null, null));
820+
scrollViewBackground.getPaint().setColor(getEditTextBackground());
821+
contentScrollView.setPadding(dip8, dip8, dip8, dip8);
822+
contentScrollView.setBackground(scrollViewBackground);
823+
contentScrollView.setClipToOutline(true);
819824
}
820-
LinearLayout.LayoutParams messageParams = new LinearLayout.LayoutParams(
825+
LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(
821826
ViewGroup.LayoutParams.MATCH_PARENT,
822-
ViewGroup.LayoutParams.WRAP_CONTENT
827+
0,
828+
1.0f // Weight to take available space.
823829
);
824-
messageParams.setMargins(0, dip8, 0, dip16);
825-
messageView.setLayoutParams(messageParams);
826-
mainLayout.addView(messageView);
827-
}
830+
contentScrollView.setLayoutParams(contentParams);
831+
contentContainer = new LinearLayout(context);
832+
contentContainer.setOrientation(LinearLayout.VERTICAL);
833+
contentScrollView.addView(contentContainer);
834+
835+
// Message (if not replaced by EditText).
836+
if (editText == null && message != null) {
837+
TextView messageView = new TextView(context);
838+
messageView.setText(message); // Supports Spanned (HTML).
839+
messageView.setTextSize(16);
840+
messageView.setTextColor(getAppForegroundColor());
841+
// Enable HTML link clicking if the message contains links.
842+
if (message instanceof Spanned) {
843+
messageView.setMovementMethod(LinkMovementMethod.getInstance());
844+
}
845+
LinearLayout.LayoutParams messageParams = new LinearLayout.LayoutParams(
846+
ViewGroup.LayoutParams.MATCH_PARENT,
847+
ViewGroup.LayoutParams.WRAP_CONTENT
848+
);
849+
messageView.setLayoutParams(messageParams);
850+
contentContainer.addView(messageView);
851+
}
828852

829-
// EditText (if provided).
830-
if (editText != null) {
831-
// Remove EditText from its current parent, if any.
832-
ViewGroup parent = (ViewGroup) editText.getParent();
833-
if (parent != null) {
834-
parent.removeView(editText);
853+
// EditText (if provided).
854+
if (editText != null) {
855+
// Remove EditText from its current parent, if any.
856+
ViewGroup parent = (ViewGroup) editText.getParent();
857+
if (parent != null) {
858+
parent.removeView(editText);
859+
}
860+
// Style the EditText to match the dialog theme.
861+
editText.setTextColor(getAppForegroundColor());
862+
editText.setBackgroundColor(Color.TRANSPARENT);
863+
editText.setPadding(0, 0, 0, 0);
864+
LinearLayout.LayoutParams editTextParams = new LinearLayout.LayoutParams(
865+
LinearLayout.LayoutParams.MATCH_PARENT,
866+
LinearLayout.LayoutParams.WRAP_CONTENT
867+
);
868+
contentContainer.addView(editText, editTextParams);
835869
}
836-
// Style the EditText to match the dialog theme.
837-
editText.setTextColor(getAppForegroundColor());
838-
editText.setBackgroundColor(isDarkModeEnabled() ? Color.BLACK : Color.WHITE);
839-
editText.setPadding(dip8, dip8, dip8, dip8);
840-
ShapeDrawable editTextBackground = new ShapeDrawable(new RoundRectShape(
841-
createCornerRadii(10), null, null));
842-
editTextBackground.getPaint().setColor(getEditTextBackground()); // Background color for EditText.
843-
editText.setBackground(editTextBackground);
844-
845-
LinearLayout.LayoutParams editTextParams = new LinearLayout.LayoutParams(
846-
LinearLayout.LayoutParams.MATCH_PARENT,
847-
LinearLayout.LayoutParams.WRAP_CONTENT
848-
);
849-
editTextParams.setMargins(0, dip8, 0, dip16);
850-
// Prevent buttons from moving off the screen by fixing the height of the EditText.
851-
final int maxHeight = (int) (context.getResources().getDisplayMetrics().heightPixels * 0.6);
852-
editText.setMaxHeight(maxHeight);
853-
mainLayout.addView(editText, 1, editTextParams);
854870
}
855871

856872
// Button container.
@@ -861,7 +877,7 @@ public static Pair<Dialog, LinearLayout> createCustomDialog(
861877
LinearLayout.LayoutParams.MATCH_PARENT,
862878
LinearLayout.LayoutParams.WRAP_CONTENT
863879
);
864-
buttonContainerParams.setMargins(0, dip8, 0, 0);
880+
buttonContainerParams.setMargins(0, dip16, 0, 0);
865881
buttonContainer.setLayoutParams(buttonContainerParams);
866882

867883
// Lists to track buttons.
@@ -1036,25 +1052,29 @@ public static Pair<Dialog, LinearLayout> createCustomDialog(
10361052
}
10371053
}
10381054

1055+
// Add ScrollView to main layout only if content exist.
1056+
if (contentScrollView != null) {
1057+
mainLayout.addView(contentScrollView);
1058+
}
10391059
mainLayout.addView(buttonContainer);
10401060
dialog.setContentView(mainLayout);
10411061

10421062
// Set dialog window attributes.
10431063
Window window = dialog.getWindow();
10441064
if (window != null) {
1045-
setDialogWindowParameters(context, window);
1065+
setDialogWindowParameters(window);
10461066
}
10471067

10481068
return new Pair<>(dialog, mainLayout);
10491069
}
10501070

1051-
public static void setDialogWindowParameters(Context context, Window window) {
1071+
public static void setDialogWindowParameters(Window window) {
10521072
WindowManager.LayoutParams params = window.getAttributes();
10531073

1054-
Resources resources = context.getResources();
1055-
DisplayMetrics displayMetrics = resources.getDisplayMetrics();
1074+
DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();
10561075
int portraitWidth = (int) (displayMetrics.widthPixels * 0.9);
1057-
if (resources.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
1076+
1077+
if (Resources.getSystem().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
10581078
portraitWidth = (int) Math.min(portraitWidth, displayMetrics.heightPixels * 0.9);
10591079
}
10601080
params.width = portraitWidth;
@@ -1199,7 +1219,7 @@ public static int getDialogBackgroundColor() {
11991219
return darkColor == Color.BLACK
12001220
// Lighten the background a little if using AMOLED dark theme
12011221
// as the dialogs are almost invisible.
1202-
? 0xFF0D0D0D
1222+
? 0xFF080808 // 3%
12031223
: darkColor;
12041224
}
12051225
return getThemeLightColor();

extensions/shared/library/src/main/java/app/revanced/extension/shared/checks/Check.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ static void issueWarning(Activity activity, Collection<Check> failedChecks) {
129129
ImageView iconView = new ImageView(activity);
130130
iconView.setImageResource(Utils.getResourceIdentifier("revanced_ic_dialog_alert", "drawable"));
131131
iconView.setColorFilter(Utils.getAppForegroundColor(), PorterDuff.Mode.SRC_IN);
132-
final int dip8 = dipToPixels(8);
133-
iconView.setPadding(0, dip8, 0, dip8);
132+
iconView.setPadding(0, 0, 0, 0);
134133
LinearLayout.LayoutParams iconParams = new LinearLayout.LayoutParams(
135134
LinearLayout.LayoutParams.WRAP_CONTENT,
136135
LinearLayout.LayoutParams.WRAP_CONTENT

0 commit comments

Comments
 (0)