Merge pull request #107 from DerGoogler/f2c-merge-patch

Fix darkmode and make improvments
pull/27/head
Androidacy Service Account 3 years ago committed by GitHub
commit 5e2535e6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,7 +97,7 @@ dependencies {
// Utils // Utils
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3' implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3'
implementation 'com.squareup.okhttp3:okhttp-brotli:4.9.3' implementation 'com.squareup.okhttp3:okhttp-brotli:4.9.3'
implementation 'com.github.topjohnwu.libsu:io:4.0.3' implementation 'com.github.topjohnwu.libsu:io:5.0.0'
// Markdown // Markdown
implementation "io.noties.markwon:core:4.6.2" implementation "io.noties.markwon:core:4.6.2"

@ -18,6 +18,7 @@ import com.fox2code.mmm.installer.InstallerInitializer;
import com.fox2code.mmm.manager.LocalModuleInfo; import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleInfo; import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.manager.ModuleManager; import com.fox2code.mmm.manager.ModuleManager;
import com.fox2code.mmm.module.ModuleHolder;
import com.fox2code.mmm.utils.IntentHelper; import com.fox2code.mmm.utils.IntentHelper;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;

@ -20,17 +20,22 @@ import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import com.fox2code.mmm.compat.CompatActivity; import com.fox2code.mmm.compat.CompatActivity;
import com.fox2code.mmm.compat.CompatDisplay; import com.fox2code.mmm.compat.CompatDisplay;
import com.fox2code.mmm.installer.InstallerInitializer; import com.fox2code.mmm.installer.InstallerInitializer;
import com.fox2code.mmm.manager.LocalModuleInfo; import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleManager; import com.fox2code.mmm.manager.ModuleManager;
import com.fox2code.mmm.module.ModuleViewAdapter;
import com.fox2code.mmm.module.ModuleViewListBuilder;
import com.fox2code.mmm.repo.RepoManager; import com.fox2code.mmm.repo.RepoManager;
import com.fox2code.mmm.settings.SettingsActivity; import com.fox2code.mmm.settings.SettingsActivity;
import com.fox2code.mmm.utils.Http; import com.fox2code.mmm.utils.Http;
import com.fox2code.mmm.utils.IntentHelper; import com.fox2code.mmm.utils.IntentHelper;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.progressindicator.LinearProgressIndicator; import com.google.android.material.progressindicator.LinearProgressIndicator;
import com.topjohnwu.superuser.Shell;
import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.BlurView;
import eightbitlab.com.blurview.RenderScriptBlur; import eightbitlab.com.blurview.RenderScriptBlur;
@ -133,6 +138,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
this.searchView.setEnabled(false); // Enabled later this.searchView.setEnabled(false); // Enabled later
this.cardIconifyUpdate(); this.cardIconifyUpdate();
this.updateScreenInsets(this.getResources().getConfiguration()); this.updateScreenInsets(this.getResources().getConfiguration());
InstallerInitializer.tryGetMagiskPathAsync(new InstallerInitializer.Callback() { InstallerInitializer.tryGetMagiskPathAsync(new InstallerInitializer.Callback() {
@Override @Override
public void onPathReceived(String path) { public void onPathReceived(String path) {
@ -378,9 +384,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
this.searchView.clearFocus(); this.searchView.clearFocus();
if (this.initMode) return false; if (this.initMode) return false;
if (this.moduleViewListBuilder.setQueryChange(query)) { if (this.moduleViewListBuilder.setQueryChange(query)) {
new Thread(() -> { new Thread(() -> this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter), "Query update thread").start();
this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter);
}, "Query update thread").start();
} }
return true; return true;
} }
@ -389,9 +393,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
public boolean onQueryTextChange(String query) { public boolean onQueryTextChange(String query) {
if (this.initMode) return false; if (this.initMode) return false;
if (this.moduleViewListBuilder.setQueryChange(query)) { if (this.moduleViewListBuilder.setQueryChange(query)) {
new Thread(() -> { new Thread(() -> this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter), "Query update thread").start();
this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter);
}, "Query update thread").start();
} }
return false; return false;
} }
@ -400,9 +402,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
public boolean onClose() { public boolean onClose() {
if (this.initMode) return false; if (this.initMode) return false;
if (this.moduleViewListBuilder.setQueryChange(null)) { if (this.moduleViewListBuilder.setQueryChange(null)) {
new Thread(() -> { new Thread(() -> this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter), "Query update thread").start();
this.moduleViewListBuilder.applyTo(moduleList, moduleViewAdapter);
}, "Query update thread").start();
} }
return false; return false;
} }

@ -91,6 +91,10 @@ public class MainApplication extends CompatApplication {
return getSharedPreferences().getBoolean("pref_showcase_mode", false); return getSharedPreferences().getBoolean("pref_showcase_mode", false);
} }
public static boolean shouldPreventReboot() {
return getSharedPreferences().getBoolean("pref_prevent_reboot", false);
}
public static boolean isShowIncompatibleModules() { public static boolean isShowIncompatibleModules() {
return getSharedPreferences().getBoolean("pref_show_incompatible", false); return getSharedPreferences().getBoolean("pref_show_incompatible", false);
} }

@ -33,7 +33,7 @@ public enum NotificationType implements NotificationTypeCst {
} }
}, },
NO_ROOT(R.string.fail_root_magisk, R.drawable.ic_baseline_numbers_24, v -> { NO_ROOT(R.string.fail_root_magisk, R.drawable.ic_baseline_numbers_24, v -> {
IntentHelper.openUrl(v.getContext(), "https://github.com/topjohnwu/Magisk"); IntentHelper.openUrl(v.getContext(), "https://github.com/topjohnwu/Magisk/blob/master/docs/install.md");
}) { }) {
@Override @Override
public boolean shouldRemove() { public boolean shouldRemove() {
@ -41,7 +41,7 @@ public enum NotificationType implements NotificationTypeCst {
} }
}, },
MAGISK_OUTDATED(R.string.magisk_outdated, R.drawable.ic_baseline_update_24, v -> { MAGISK_OUTDATED(R.string.magisk_outdated, R.drawable.ic_baseline_update_24, v -> {
IntentHelper.openUrl(v.getContext(), "https://github.com/topjohnwu/Magisk"); IntentHelper.openUrl(v.getContext(), "https://github.com/topjohnwu/Magisk/releases");
}) { }) {
@Override @Override
public boolean shouldRemove() { public boolean shouldRemove() {
@ -120,7 +120,7 @@ public enum NotificationType implements NotificationTypeCst {
InstallerInitializer.peekMagiskPath() == null); InstallerInitializer.peekMagiskPath() == null);
} }
}); });
}, true) { }, false) {
@Override @Override
public boolean shouldRemove() { public boolean shouldRemove() {
return !BuildConfig.DEBUG && return !BuildConfig.DEBUG &&

@ -29,6 +29,8 @@ import com.fox2code.mmm.utils.Hashes;
import com.fox2code.mmm.utils.Http; import com.fox2code.mmm.utils.Http;
import com.fox2code.mmm.utils.IntentHelper; import com.fox2code.mmm.utils.IntentHelper;
import com.fox2code.mmm.utils.PropUtils; import com.fox2code.mmm.utils.PropUtils;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.google.android.material.progressindicator.LinearProgressIndicator; import com.google.android.material.progressindicator.LinearProgressIndicator;
import com.topjohnwu.superuser.CallbackList; import com.topjohnwu.superuser.CallbackList;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
@ -50,6 +52,7 @@ import java.util.zip.ZipInputStream;
public class InstallerActivity extends CompatActivity { public class InstallerActivity extends CompatActivity {
private static final String TAG = "InstallerActivity"; private static final String TAG = "InstallerActivity";
public LinearProgressIndicator progressIndicator; public LinearProgressIndicator progressIndicator;
public ExtendedFloatingActionButton rebootFloatingButton;
public InstallerTerminal installerTerminal; public InstallerTerminal installerTerminal;
private File moduleCache; private File moduleCache;
private File toDelete; private File toDelete;
@ -113,6 +116,7 @@ public class InstallerActivity extends CompatActivity {
View horizontalScroller = findViewById(R.id.install_horizontal_scroller); View horizontalScroller = findViewById(R.id.install_horizontal_scroller);
RecyclerView installTerminal; RecyclerView installTerminal;
this.progressIndicator = findViewById(R.id.progress_bar); this.progressIndicator = findViewById(R.id.progress_bar);
this.rebootFloatingButton = findViewById(R.id.install_terminal_reboot_fab);
this.installerTerminal = new InstallerTerminal( this.installerTerminal = new InstallerTerminal(
installTerminal = findViewById(R.id.install_terminal), foreground); installTerminal = findViewById(R.id.install_terminal), foreground);
(horizontalScroller != null ? horizontalScroller : installTerminal) (horizontalScroller != null ? horizontalScroller : installTerminal)
@ -225,7 +229,7 @@ public class InstallerActivity extends CompatActivity {
} }
private void doInstall(File file,boolean noExtensions,boolean rootless) { private void doInstall(File file, boolean noExtensions, boolean rootless) {
if (this.canceled) return; if (this.canceled) return;
UiThreadHandler.runAndWait(() -> { UiThreadHandler.runAndWait(() -> {
this.setOnBackPressedCallback(DISABLE_BACK_BUTTON); this.setOnBackPressedCallback(DISABLE_BACK_BUTTON);
@ -310,8 +314,9 @@ public class InstallerActivity extends CompatActivity {
ZipEntry moduleProp = zipFile.getEntry("module.prop"); ZipEntry moduleProp = zipFile.getEntry("module.prop");
magiskModule = moduleProp != null; magiskModule = moduleProp != null;
moduleId = PropUtils.readModuleId(zipFile moduleId = PropUtils.readModuleId(zipFile
.getInputStream(moduleProp)); .getInputStream(zipFile.getEntry("module.prop")));
} catch (IOException ignored) {} } catch (IOException ignored) {
}
int compatFlags = AppUpdateManager.getFlagsForModule(moduleId); int compatFlags = AppUpdateManager.getFlagsForModule(moduleId);
if ((compatFlags & AppUpdateManager.FLAG_COMPAT_NEED_32BIT) != 0) if ((compatFlags & AppUpdateManager.FLAG_COMPAT_NEED_32BIT) != 0)
needs32bit = true; needs32bit = true;
@ -396,7 +401,8 @@ public class InstallerActivity extends CompatActivity {
} }
boolean success = installJob.exec().isSuccess(); boolean success = installJob.exec().isSuccess();
// Wait one UI cycle before disabling controller or processing results // Wait one UI cycle before disabling controller or processing results
UiThreadHandler.runAndWait(() -> {}); // to avoid race conditions UiThreadHandler.runAndWait(() -> {
}); // to avoid race conditions
installerController.disable(); installerController.disable();
String message = "- Install successful"; String message = "- Install successful";
if (!success) { if (!success) {
@ -420,7 +426,7 @@ public class InstallerActivity extends CompatActivity {
private String supportLink = ""; private String supportLink = "";
private InstallerController(LinearProgressIndicator progressIndicator, private InstallerController(LinearProgressIndicator progressIndicator,
InstallerTerminal terminal,File moduleFile, InstallerTerminal terminal, File moduleFile,
boolean noExtension) { boolean noExtension) {
this.progressIndicator = progressIndicator; this.progressIndicator = progressIndicator;
this.terminal = terminal; this.terminal = terminal;
@ -503,7 +509,8 @@ public class InstallerActivity extends CompatActivity {
try { try {
this.progressIndicator.setProgressCompat( this.progressIndicator.setProgressCompat(
Short.parseShort(arg), true); Short.parseShort(arg), true);
} catch (Exception ignored) {} } catch (Exception ignored) {
}
break; break;
case "hideLoading": case "hideLoading":
this.progressIndicator.setVisibility(View.GONE); this.progressIndicator.setVisibility(View.GONE);
@ -596,7 +603,7 @@ public class InstallerActivity extends CompatActivity {
} }
@SuppressWarnings("SameParameterValue") @SuppressWarnings("SameParameterValue")
private void setInstallStateFinished(boolean success, String message,String optionalLink) { private void setInstallStateFinished(boolean success, String message, String optionalLink) {
if (success && toDelete != null && !toDelete.delete()) { if (success && toDelete != null && !toDelete.delete()) {
SuFile suFile = new SuFile(toDelete.getAbsolutePath()); SuFile suFile = new SuFile(toDelete.getAbsolutePath());
if (suFile.exists() && !suFile.delete()) if (suFile.exists() && !suFile.delete())
@ -608,14 +615,37 @@ public class InstallerActivity extends CompatActivity {
this.setOnBackPressedCallback(null); this.setOnBackPressedCallback(null);
this.setDisplayHomeAsUpEnabled(true); this.setDisplayHomeAsUpEnabled(true);
this.progressIndicator.setVisibility(View.GONE); this.progressIndicator.setVisibility(View.GONE);
// This should be improved ?
String reboot_cmd = "/system/bin/svc power reboot || /system/bin/reboot";
rebootFloatingButton.setOnClickListener(_view -> {
if (MainApplication.shouldPreventReboot()) {
MaterialAlertDialogBuilder builder =
new MaterialAlertDialogBuilder(this);
builder
.setTitle(R.string.install_terminal_reboot_now)
.setCancelable(false)
.setIcon(R.drawable.ic_reboot_24)
.setPositiveButton(R.string.yes, (x, y) -> {
Shell.cmd(reboot_cmd).submit();
})
.setNegativeButton(R.string.no, (x, y) -> {
x.dismiss();
}).show();
} else {
Shell.cmd(reboot_cmd).submit();
}
});
if (message != null && !message.isEmpty()) if (message != null && !message.isEmpty())
this.installerTerminal.addLine(message); this.installerTerminal.addLine(message);
if (!optionalLink.isEmpty()) { if (!optionalLink.isEmpty()) {
this.setActionBarExtraMenuButton(ActionButtonType.supportIconForUrl(optionalLink), this.setActionBarExtraMenuButton(ActionButtonType.supportIconForUrl(optionalLink),
menu -> { menu -> {
IntentHelper.openUrl(this, optionalLink); IntentHelper.openUrl(this, optionalLink);
return true; return true;
}); });
} else if (success) { } else if (success) {
final Intent intent = this.getIntent(); final Intent intent = this.getIntent();
final String config = MainApplication.checkSecret(intent) ? final String config = MainApplication.checkSecret(intent) ?
@ -628,6 +658,7 @@ public class InstallerActivity extends CompatActivity {
IntentHelper.openConfig(this, config); IntentHelper.openConfig(this, config);
return true; return true;
}); });
this.rebootFloatingButton.setVisibility(View.VISIBLE);
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, "Config package \"" + Log.w(TAG, "Config package \"" +
configPkg + "\" missing for installer view"); configPkg + "\" missing for installer view");

@ -1,4 +1,4 @@
package com.fox2code.mmm; package com.fox2code.mmm.module;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
@ -8,6 +8,11 @@ import android.view.View;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
import com.fox2code.mmm.ActionButtonType;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.NotificationType;
import com.fox2code.mmm.R;
import com.fox2code.mmm.XHooks;
import com.fox2code.mmm.manager.LocalModuleInfo; import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleInfo; import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.repo.RepoModule; import com.fox2code.mmm.repo.RepoModule;

@ -1,7 +1,9 @@
package com.fox2code.mmm; package com.fox2code.mmm.module;
import androidx.annotation.DrawableRes; import androidx.annotation.DrawableRes;
import com.fox2code.mmm.R;
import java.util.Comparator; import java.util.Comparator;
public enum ModuleSorter implements Comparator<ModuleHolder> { public enum ModuleSorter implements Comparator<ModuleHolder> {

@ -1,4 +1,4 @@
package com.fox2code.mmm; package com.fox2code.mmm.module;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.res.Resources; import android.content.res.Resources;
@ -18,6 +18,10 @@ import androidx.annotation.StringRes;
import androidx.cardview.widget.CardView; import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.fox2code.mmm.ActionButtonType;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.NotificationType;
import com.fox2code.mmm.R;
import com.fox2code.mmm.manager.LocalModuleInfo; import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleInfo; import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.manager.ModuleManager; import com.fox2code.mmm.manager.ModuleManager;
@ -269,7 +273,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
this.descriptionText.setText(" "); this.descriptionText.setText(" ");
this.switchMaterial.setEnabled(false); this.switchMaterial.setEnabled(false);
this.actionButtonsTypes.clear(); this.actionButtonsTypes.clear();
for (ImageButton button:this.actionsButtons) { for (ImageButton button : this.actionsButtons) {
button.setVisibility(View.GONE); button.setVisibility(View.GONE);
button.setImportantForAccessibility( button.setImportantForAccessibility(
View.IMPORTANT_FOR_ACCESSIBILITY_NO); View.IMPORTANT_FOR_ACCESSIBILITY_NO);
@ -320,7 +324,11 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
theme.resolveAttribute(foregroundAttr, value, true); theme.resolveAttribute(foregroundAttr, value, true);
@ColorInt int fgColor = value.data; @ColorInt int fgColor = value.data;
// Fix card background being invisible on light theme // Fix card background being invisible on light theme
if (bgColor == Color.WHITE) bgColor = 0xFFF8F8F8; if (bgColor == Color.WHITE) {
bgColor = 0xFFF8F8F8;
} else {
bgColor = 0xFF1E1E1E;
}
this.titleText.setTextColor(fgColor); this.titleText.setTextColor(fgColor);
this.buttonAction.setColorFilter(fgColor); this.buttonAction.setColorFilter(fgColor);
this.cardView.setCardBackgroundColor(bgColor); this.cardView.setCardBackgroundColor(bgColor);

@ -1,4 +1,4 @@
package com.fox2code.mmm; package com.fox2code.mmm.module;
import android.app.Activity; import android.app.Activity;
import android.os.Build; import android.os.Build;
@ -7,10 +7,16 @@ import android.util.Log;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.fox2code.mmm.AppUpdateManager;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.NotificationType;
import com.fox2code.mmm.installer.InstallerInitializer; import com.fox2code.mmm.installer.InstallerInitializer;
import com.fox2code.mmm.manager.LocalModuleInfo; import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleInfo; import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.manager.ModuleManager; import com.fox2code.mmm.manager.ModuleManager;
import com.fox2code.mmm.module.ModuleHolder;
import com.fox2code.mmm.module.ModuleSorter;
import com.fox2code.mmm.module.ModuleViewAdapter;
import com.fox2code.mmm.repo.RepoManager; import com.fox2code.mmm.repo.RepoManager;
import com.fox2code.mmm.repo.RepoModule; import com.fox2code.mmm.repo.RepoModule;

@ -22,16 +22,17 @@ public final class RepoManager {
private static final String TAG = "RepoManager"; private static final String TAG = "RepoManager";
public static final String MAGISK_ALT_REPO = public static final String MAGISK_ALT_REPO =
"https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/json/main/modules.json"; "https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/json/main/modules.json";
public static final String MAGISK_ALT_REPO_HOMEPAGE =
"https://github.com/Magisk-Modules-Alt-Repo";
public static final String MAGISK_ALT_REPO_JSDELIVR = public static final String MAGISK_ALT_REPO_JSDELIVR =
"https://cdn.jsdelivr.net/gh/Magisk-Modules-Alt-Repo/json@main/modules.json"; "https://cdn.jsdelivr.net/gh/Magisk-Modules-Alt-Repo/json@main/modules.json";
public static final String ANDROIDACY_MAGISK_REPO_ENDPOINT = public static final String ANDROIDACY_MAGISK_REPO_ENDPOINT =
"https://api.androidacy.com/magisk/repo"; "https://api.androidacy.com/magisk/repo";
public static final String MAGISK_ALT_REPO_HOMEPAGE =
"https://github.com/Magisk-Modules-Alt-Repo";
public static final String ANDROIDACY_MAGISK_REPO_HOMEPAGE = public static final String ANDROIDACY_MAGISK_REPO_HOMEPAGE =
"https://www.androidacy.com/modules-repo"; "https://www.androidacy.com/modules-repo";
private static final Object lock = new Object(); private static final Object lock = new Object();
private static volatile RepoManager INSTANCE; private static volatile RepoManager INSTANCE;

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
</vector>

@ -33,4 +33,17 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/install_terminal_reboot_fab"
android:text="@string/install_terminal_reboot_now"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:textColor="@android:color/white"
app:iconTint="@android:color/white"
app:icon="@drawable/ic_reboot_24"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -1,37 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/markdownBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/markdownBackground"
app:fitsSystemWindowsInsets="top|left|right"> app:fitsSystemWindowsInsets="top|left|right">
<com.google.android.material.card.MaterialCardView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content">
android:gravity="center_vertical" <LinearLayout
app:cardCornerRadius="@dimen/card_corner_radius">
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
<LinearLayout android:orientation="vertical">
<TextView
android:id="@+id/markdownView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/markdown_border_content"
android:text="@string/loading" />
<TextView
android:id="@+id/markdownFooter"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:text="" />
<TextView </LinearLayout>
android:id="@+id/markdownView" </ScrollView>
android:text="@string/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/markdown_border_content" />
<TextView
android:id="@+id/markdownFooter"
android:text=""
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>

@ -8,8 +8,7 @@
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:gravity="center_vertical" android:gravity="center_vertical">
android:background="@null">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_gravity="center" android:layout_gravity="center"
@ -23,8 +22,7 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp">
android:background="@null">
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_action" android:id="@+id/button_action"

@ -1,4 +1,4 @@
<resources> <resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">Fox\'s Magisk Module Manager</string> <string name="app_name">Fox\'s Magisk Module Manager</string>
<string name="app_name_short">Fox\'s Mmm</string> <string name="app_name_short">Fox\'s Mmm</string>
<string name="fail_root_magisk">Could not access either Root or Magisk</string> <string name="fail_root_magisk">Could not access either Root or Magisk</string>
@ -24,6 +24,9 @@
<string name="donate">Donate</string> <string name="donate">Donate</string>
<string name="submit_modules">Submit a module</string> <string name="submit_modules">Submit a module</string>
<string name="require_android_6">Requires Android 6.0+</string> <string name="require_android_6">Requires Android 6.0+</string>
<string name="install_terminal_reboot_now">Reboot</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<!-- Module section translation --> <!-- Module section translation -->
<string name="module_last_update">Last version:</string> <string name="module_last_update">Last version:</string>
@ -37,6 +40,8 @@
<string name="manage_repos_pref">Manage repos</string> <string name="manage_repos_pref">Manage repos</string>
<string name="showcase_mode_pref">Lockdown mode</string> <string name="showcase_mode_pref">Lockdown mode</string>
<string name="showcase_mode_desc">Lockdown mode prevents the manager from carrying out actions on modules</string> <string name="showcase_mode_desc">Lockdown mode prevents the manager from carrying out actions on modules</string>
<string name="prevent_reboot_pref">Prevent reboot</string>
<string name="prevent_reboot_desc">Prevents unexpected reboots</string>
<string name="pref_category_settings">Settings</string> <string name="pref_category_settings">Settings</string>
<string name="pref_category_info">Info</string> <string name="pref_category_info">Info</string>
<string name="show_licenses">Show licenses</string> <string name="show_licenses">Show licenses</string>
@ -45,6 +50,9 @@
<string name="show_incompatible_desc">Show modules unlikely to work on your device based on their metadata</string> <string name="show_incompatible_desc">Show modules unlikely to work on your device based on their metadata</string>
<string name="magisk_outdated">There is a new version of Magisk to install!</string> <string name="magisk_outdated">There is a new version of Magisk to install!</string>
<string name="pref_category_repos">Repos</string> <string name="pref_category_repos">Repos</string>
<string name="pref_category_security">Security</string>
<string name="pref_category_appearance">Appearance</string>
<string name="pref_category_general">General</string>
<string name="repo_main_desc">The repository hosting Magisk modules</string> <string name="repo_main_desc">The repository hosting Magisk modules</string>
<string name="repo_main_alt">An alternative to the Magisk-Modules-Repo with fewer restrictions.</string> <string name="repo_main_alt">An alternative to the Magisk-Modules-Repo with fewer restrictions.</string>
<string name="master_delete">Delete the module files?</string> <string name="master_delete">Delete the module files?</string>
@ -64,7 +72,7 @@
<string name="file_picker_failure">Your current file picker could not access the file.</string> <string name="file_picker_failure">Your current file picker could not access the file.</string>
<string name="remote_install_title">Remote install</string> <string name="remote_install_title">Remote install</string>
<string name="file_picker_wierd">Your file picker returned a non-standard response.</string> <string name="file_picker_wierd">Your file picker returned a non-standard response.</string>
<string name="use_magisk_install_command_pref">Use the \"magisk --install-module\" command</string> <string name="use_magisk_install_command_pref" tools:ignore="TypographyDashes">Use the \"magisk --install-module\" command</string>
<string name="use_magisk_install_command_desc"> <string name="use_magisk_install_command_desc">
During testing it caused problems to the module install error diagnosis tool, During testing it caused problems to the module install error diagnosis tool,
so this option behind is hidden behind developer mode.\nTurn this on at your own risk! so this option behind is hidden behind developer mode.\nTurn this on at your own risk!

@ -1,8 +1,8 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.MagiskModuleManager.Light" parent="Theme.MaterialComponents.Light"> <style name="Theme.MagiskModuleManager.Light" parent="Theme.MaterialComponents.Light">
<item name="android:isLightTheme" <item name="android:isLightTheme"
tools:targetApi="q">true</item> tools:targetApi="q">false</item>
<item name="isLightTheme">true</item> <item name="isLightTheme">false</item>
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/orange_200</item> <item name="colorPrimary">@color/orange_200</item>
<item name="colorPrimaryVariant">@color/white</item> <item name="colorPrimaryVariant">@color/white</item>
@ -28,6 +28,20 @@
<item name="dialogCornerRadius">@dimen/card_corner_radius</item> <item name="dialogCornerRadius">@dimen/card_corner_radius</item>
</style> </style>
<style name="Theme.MagiskModuleManager.Transparent.Light" parent="Theme.MagiskModuleManager.Light">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.MagiskModuleManager.Dark" parent="Theme.MaterialComponents"> <style name="Theme.MagiskModuleManager.Dark" parent="Theme.MaterialComponents">
<item name="android:isLightTheme" <item name="android:isLightTheme"
tools:targetApi="q">false</item> tools:targetApi="q">false</item>
@ -72,20 +86,6 @@
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </style>
<style name="Theme.MagiskModuleManager.Transparent.Light" parent="Theme.MagiskModuleManager.Light">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.MagiskModuleManager" <style name="Theme.MagiskModuleManager"
parent="Theme.MagiskModuleManager.Light" /> parent="Theme.MagiskModuleManager.Light" />
</resources> </resources>

@ -1,13 +1,42 @@
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"> <PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory <!-- Custom repos has been announced, check https://github.com/Fox2Code/FoxMagiskModuleManager/issues/131 -->
app:title="@string/pref_category_settings"> <PreferenceCategory app:title="@string/pref_category_repos">
<Preference <Preference
app:key="pref_manage_repos" app:key="pref_manage_repos"
app:icon="@drawable/ic_baseline_extension_24" app:icon="@drawable/ic_baseline_extension_24"
app:title="@string/manage_repos_pref" app:title="@string/manage_repos_pref"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
</PreferenceCategory>
<PreferenceCategory
app:title="@string/pref_category_general">
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_use_magisk_install_command"
app:icon="@drawable/ic_baseline_numbers_24"
app:title="@string/use_magisk_install_command_pref"
app:summary="@string/use_magisk_install_command_desc"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_disable_low_quality_module_filter"
app:icon="@drawable/ic_baseline_warning_24"
app:title="@string/disable_low_quality_module_filter_pref"
app:summary="@string/disable_low_quality_module_filter_desc"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="true"
app:key="pref_dns_over_https"
app:icon="@drawable/ic_baseline_security_24"
app:title="@string/dns_over_https_pref"
app:summary="@string/dns_over_https_desc"
app:singleLineTitle="false" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/pref_category_appearance">
<ListPreference <ListPreference
app:key="pref_theme" app:key="pref_theme"
app:icon="@drawable/ic_baseline_palette_24" app:icon="@drawable/ic_baseline_palette_24"
@ -38,15 +67,6 @@
app:title="@string/force_dark_terminal_title" app:title="@string/force_dark_terminal_title"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
<!-- Note: Lockdown mode used to be called showcase mode -->
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_showcase_mode"
app:icon="@drawable/ic_baseline_lock_24"
app:title="@string/showcase_mode_pref"
app:summary="@string/showcase_mode_desc"
app:singleLineTitle="false" />
<SwitchPreferenceCompat <SwitchPreferenceCompat
app:defaultValue="false" app:defaultValue="false"
app:key="pref_wrap_text" app:key="pref_wrap_text"
@ -54,7 +74,9 @@
app:title="@string/wrap_text_pref" app:title="@string/wrap_text_pref"
app:summary="@string/wrap_text_desc" app:summary="@string/wrap_text_desc"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/pref_category_security">
<SwitchPreferenceCompat <SwitchPreferenceCompat
app:defaultValue="false" app:defaultValue="false"
app:key="pref_show_incompatible" app:key="pref_show_incompatible"
@ -62,29 +84,21 @@
app:title="@string/show_incompatible_pref" app:title="@string/show_incompatible_pref"
app:summary="@string/show_incompatible_desc" app:summary="@string/show_incompatible_desc"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
<!-- Note: Lockdown mode used to be called showcase mode -->
<SwitchPreferenceCompat <SwitchPreferenceCompat
app:defaultValue="false" app:defaultValue="false"
app:key="pref_disable_low_quality_module_filter" app:key="pref_showcase_mode"
app:icon="@drawable/ic_baseline_warning_24" app:icon="@drawable/ic_baseline_lock_24"
app:title="@string/disable_low_quality_module_filter_pref" app:title="@string/showcase_mode_pref"
app:summary="@string/disable_low_quality_module_filter_desc" app:summary="@string/showcase_mode_desc"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
<SwitchPreferenceCompat <SwitchPreferenceCompat
app:defaultValue="false" app:defaultValue="false"
app:key="pref_use_magisk_install_command" app:key="pref_prevent_reboot"
app:icon="@drawable/ic_baseline_numbers_24" app:icon="@drawable/ic_reboot_24"
app:title="@string/use_magisk_install_command_pref" app:title="@string/prevent_reboot_pref"
app:summary="@string/use_magisk_install_command_desc" app:summary="@string/prevent_reboot_desc"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="true"
app:key="pref_dns_over_https"
app:icon="@drawable/ic_baseline_security_24"
app:title="@string/dns_over_https_pref"
app:summary="@string/dns_over_https_desc"
app:singleLineTitle="false" /> app:singleLineTitle="false" />
</PreferenceCategory> </PreferenceCategory>
@ -114,6 +128,7 @@
app:key="pref_pkg_info" app:key="pref_pkg_info"
app:enabled="false" app:enabled="false"
app:summary="@string/loading" app:summary="@string/loading"
app:singleLineTitle="false" /> app:singleLineTitle="false"
app:iconSpaceReserved="false" />
</PreferenceCategory> </PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>

@ -3,4 +3,3 @@ distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionSha256Sum=9afb3ca688fc12c761a0e9e4321e4d24e977a4a8916c8a768b1fe05ddb4d6b66

Loading…
Cancel
Save