Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit c726dbe

Browse files
committed
Making improvements
- Update libsu to `5.0.0` - Fix reboot button displays on fail install
1 parent bf37069 commit c726dbe

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ dependencies {
9797
// Utils
9898
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3'
9999
implementation 'com.squareup.okhttp3:okhttp-brotli:4.9.3'
100-
implementation 'com.github.topjohnwu.libsu:io:4.0.3'
100+
implementation 'com.github.topjohnwu.libsu:io:5.0.0'
101101

102102
// Markdown
103103
implementation "io.noties.markwon:core:4.6.2"

app/src/main/java/com/fox2code/mmm/MainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import android.view.WindowManager;
2121
import android.view.inputmethod.EditorInfo;
2222
import android.widget.TextView;
23+
import android.widget.Toast;
2324

2425
import com.fox2code.mmm.compat.CompatActivity;
2526
import com.fox2code.mmm.compat.CompatDisplay;
@@ -32,7 +33,9 @@
3233
import com.fox2code.mmm.settings.SettingsActivity;
3334
import com.fox2code.mmm.utils.Http;
3435
import com.fox2code.mmm.utils.IntentHelper;
36+
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
3537
import com.google.android.material.progressindicator.LinearProgressIndicator;
38+
import com.topjohnwu.superuser.Shell;
3639

3740
import eightbitlab.com.blurview.BlurView;
3841
import eightbitlab.com.blurview.RenderScriptBlur;
@@ -135,6 +138,7 @@ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newStat
135138
this.searchView.setEnabled(false); // Enabled later
136139
this.cardIconifyUpdate();
137140
this.updateScreenInsets(this.getResources().getConfiguration());
141+
138142
InstallerInitializer.tryGetMagiskPathAsync(new InstallerInitializer.Callback() {
139143
@Override
140144
public void onPathReceived(String path) {

app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,6 @@ private void doInstall(File file, boolean noExtensions, boolean rootless) {
317317
.getInputStream(zipFile.getEntry("module.prop")));
318318
} catch (IOException ignored) {
319319
}
320-
.getInputStream(moduleProp));
321-
} catch (IOException ignored) {}
322320
int compatFlags = AppUpdateManager.getFlagsForModule(moduleId);
323321
if ((compatFlags & AppUpdateManager.FLAG_COMPAT_NEED_32BIT) != 0)
324322
needs32bit = true;
@@ -639,7 +637,6 @@ private void setInstallStateFinished(boolean success, String message, String opt
639637
Shell.cmd(reboot_cmd).submit();
640638
}
641639
});
642-
this.rebootFloatingButton.setVisibility(View.VISIBLE);
643640

644641
if (message != null && !message.isEmpty())
645642
this.installerTerminal.addLine(message);
@@ -661,6 +658,7 @@ private void setInstallStateFinished(boolean success, String message, String opt
661658
IntentHelper.openConfig(this, config);
662659
return true;
663660
});
661+
this.rebootFloatingButton.setVisibility(View.VISIBLE);
664662
} catch (PackageManager.NameNotFoundException e) {
665663
Log.w(TAG, "Config package \"" +
666664
configPkg + "\" missing for installer view");

0 commit comments

Comments
 (0)