You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Revert "Read only the first line instead of loading the whole file"
This reverts commit a5b573eaaa.
The file shall always have one single line, no need to create a new method
This commit is contained in:
@@ -75,17 +75,6 @@ public class Utils {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static String readFirstLine(String path) {
|
||||
List<String> ret;
|
||||
String command = "head -1 " + path;
|
||||
if (Shell.rootAccess()) {
|
||||
ret = Shell.su(command);
|
||||
} else {
|
||||
ret = Shell.sh(command);
|
||||
}
|
||||
return isValidShellResponse(ret) ? ret.get(0) : null;
|
||||
}
|
||||
|
||||
public static void dlAndReceive(Context context, DownloadReceiver receiver, String link, String filename) {
|
||||
if (isDownloading) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user