Prevent crashes
This commit is contained in:
parent
75a46c365e
commit
1e175e74ed
@ -16,6 +16,7 @@ public class DownloadBusybox extends ParallelTask<Void, Void, Void> {
|
|||||||
private File busybox;
|
private File busybox;
|
||||||
|
|
||||||
public DownloadBusybox(Context context, File bb) {
|
public DownloadBusybox(Context context, File bb) {
|
||||||
|
super(context);
|
||||||
busybox = bb;
|
busybox = bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.topjohnwu.magisk.utils;
|
package com.topjohnwu.magisk.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.MagiskManager;
|
import com.topjohnwu.magisk.MagiskManager;
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ public class Shell {
|
|||||||
in.write(("id\n").getBytes("UTF-8"));
|
in.write(("id\n").getBytes("UTF-8"));
|
||||||
in.flush();
|
in.flush();
|
||||||
String s = new BufferedReader(new InputStreamReader(out)).readLine();
|
String s = new BufferedReader(new InputStreamReader(out)).readLine();
|
||||||
if (s.isEmpty() || !s.contains("uid=0")) {
|
if (TextUtils.isEmpty(s) || !s.contains("uid=0")) {
|
||||||
in.close();
|
in.close();
|
||||||
out.close();
|
out.close();
|
||||||
process.destroy();
|
process.destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user