Making improvements

- Update libsu to `5.0.0`
- Fix reboot button displays on fail install
pull/107/head
DerGoogler 2 years ago
parent bf37069826
commit c726dbe375

@ -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"

@ -20,6 +20,7 @@ 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;
@ -32,7 +33,9 @@ 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;
@ -135,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) {

@ -317,8 +317,6 @@ public class InstallerActivity extends CompatActivity {
.getInputStream(zipFile.getEntry("module.prop"))); .getInputStream(zipFile.getEntry("module.prop")));
} catch (IOException ignored) { } catch (IOException ignored) {
} }
.getInputStream(moduleProp));
} 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;
@ -639,7 +637,6 @@ public class InstallerActivity extends CompatActivity {
Shell.cmd(reboot_cmd).submit(); Shell.cmd(reboot_cmd).submit();
} }
}); });
this.rebootFloatingButton.setVisibility(View.VISIBLE);
if (message != null && !message.isEmpty()) if (message != null && !message.isEmpty())
this.installerTerminal.addLine(message); this.installerTerminal.addLine(message);
@ -661,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");

Loading…
Cancel
Save