mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 13:27:41 +00:00
Fix failure if MagiskManager folder doesn't exist
This commit is contained in:
parent
01052fbe47
commit
53cf11db8c
@ -28,12 +28,14 @@ public class ProcessRepoZip extends ParallelTask<Void, Void, Boolean> {
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
private boolean mInstall;
|
||||
private String mLink, mFile;
|
||||
private String mLink;
|
||||
private File mFile;
|
||||
|
||||
public ProcessRepoZip(Activity context, String link, String filename, boolean install) {
|
||||
super(context);
|
||||
mLink = link;
|
||||
mFile = Environment.getExternalStorageDirectory() + "/MagiskManager/" + filename;
|
||||
mFile = new File(Environment.getExternalStorageDirectory() + "/MagiskManager", filename);
|
||||
mFile.getParentFile().mkdirs();
|
||||
mInstall = install;
|
||||
}
|
||||
|
||||
@ -108,7 +110,7 @@ public class ProcessRepoZip extends ParallelTask<Void, Void, Boolean> {
|
||||
Activity activity = getActivity();
|
||||
if (activity == null) return;
|
||||
progressDialog.dismiss();
|
||||
Uri uri = Uri.fromFile(new File(mFile));
|
||||
Uri uri = Uri.fromFile(mFile);
|
||||
if (result) {
|
||||
if (Shell.rootAccess() && mInstall) {
|
||||
Intent intent = new Intent(getActivity(), FlashActivity.class);
|
||||
|
@ -7,7 +7,7 @@ buildscript {
|
||||
maven { url "https://maven.google.com" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
|
||||
classpath 'com.android.tools.build:gradle:3.0.0-beta5'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
Loading…
x
Reference in New Issue
Block a user