Merge remote-tracking branch 'upstream/dev' into feat/patcher_instruction_filters

# Conflicts:
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java
#	patches/src/main/kotlin/app/revanced/patches/music/layout/castbutton/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/music/layout/castbutton/HideCastButton.kt
This commit is contained in:
LisoUseInAIKyrios
2025-11-09 09:06:46 +02:00
15 changed files with 288 additions and 114 deletions

View File

@@ -782,6 +782,28 @@ public class Utils {
|| (type == ConnectivityManager.TYPE_BLUETOOTH) ? NetworkType.MOBILE : NetworkType.OTHER;
}
/**
* Hides a view by setting its layout width and height to 0dp.
* Handles null layout params safely.
*
* @param view The view to hide. If null, does nothing.
*/
public static void hideViewByLayoutParams(@Nullable View view) {
if (view == null) return;
ViewGroup.LayoutParams params = view.getLayoutParams();
if (params == null) {
// Create generic 0x0 layout params accepted by all ViewGroups.
params = new ViewGroup.LayoutParams(0, 0);
} else {
params.width = 0;
params.height = 0;
}
view.setLayoutParams(params);
}
/**
* Configures the parameters of a dialog window, including its width, gravity, vertical offset and background dimming.
* The width is calculated as a percentage of the screen's portrait width and the vertical offset is specified in DIP.

View File

@@ -19,7 +19,6 @@ import app.revanced.extension.shared.Logger;
import app.revanced.extension.shared.Utils;
import app.revanced.extension.shared.settings.Setting;
import app.revanced.extension.shared.ui.CustomDialog;
import app.revanced.extension.shared.ui.Dim;
@SuppressWarnings({"unused", "deprecation"})
public class ImportExportPreference extends EditTextPreference implements Preference.OnPreferenceClickListener {