mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-11-15 15:23:28 +00:00
@@ -164,6 +164,10 @@ public class Utils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isDarkTheme(String theme, Context resources) {
|
||||
return theme != null && theme.equalsIgnoreCase(resources.getString(R.string.theme_dark_value));
|
||||
}
|
||||
|
||||
public static class ByteArrayInOutStream extends ByteArrayOutputStream {
|
||||
public ByteArrayInputStream getInputStream() {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(buf, 0, count);
|
||||
|
||||
@@ -14,7 +14,7 @@ public class WebWindow {
|
||||
public WebWindow(String title, String url, Context context) {
|
||||
AlertDialog.Builder alert;
|
||||
String theme = PreferenceManager.getDefaultSharedPreferences(context).getString("theme", "");
|
||||
if (theme.equals("Dark")) {
|
||||
if (Utils.isDarkTheme(theme, context)) {
|
||||
alert = new AlertDialog.Builder(context, R.style.AlertDialog_dh);
|
||||
} else {
|
||||
alert = new AlertDialog.Builder(context);
|
||||
|
||||
Reference in New Issue
Block a user