Switch to libsu

This commit is contained in:
topjohnwu
2018-01-21 06:07:24 +08:00
parent 759e905c3c
commit 821726e7c0
28 changed files with 71 additions and 340 deletions
@@ -16,9 +16,9 @@ import android.widget.Toast;
import com.topjohnwu.magisk.asyncs.FlashZip;
import com.topjohnwu.magisk.asyncs.InstallMagisk;
import com.topjohnwu.magisk.components.Activity;
import com.topjohnwu.magisk.container.CallbackList;
import com.topjohnwu.magisk.utils.Const;
import com.topjohnwu.magisk.utils.Shell;
import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellCallbackVector;
import java.io.File;
import java.io.FileWriter;
@@ -96,10 +96,10 @@ public class FlashActivity extends Activity {
reboot.setVisibility(View.GONE);
logs = new ArrayList<>();
List<String> console = new CallbackList<String>() {
ShellCallbackVector console = new ShellCallbackVector() {
@Override
public synchronized void onAddElement(String e) {
logs.add(e);
public void onShellOutput(String s) {
logs.add(s);
flashLogs.setText(TextUtils.join("\n", this));
sv.postDelayed(() -> sv.fullScroll(ScrollView.FOCUS_DOWN), 10);
}