Commit f9ab0604 authored by topjohnwu's avatar topjohnwu

Fix su request crashing

parent df7a5bf1
...@@ -83,7 +83,7 @@ public class SuRequestActivity extends Activity implements CallbackEvent.Listene ...@@ -83,7 +83,7 @@ public class SuRequestActivity extends Activity implements CallbackEvent.Listene
} }
}.startWatching(); }.startWatching();
new SocketManager().exec(); new SocketManager(this).exec();
} }
void showRequest() { void showRequest() {
...@@ -170,6 +170,10 @@ public class SuRequestActivity extends Activity implements CallbackEvent.Listene ...@@ -170,6 +170,10 @@ public class SuRequestActivity extends Activity implements CallbackEvent.Listene
private class SocketManager extends ParallelTask<Void, Void, Boolean> { private class SocketManager extends ParallelTask<Void, Void, Boolean> {
public SocketManager(Activity context) {
super(context);
}
@Override @Override
protected Boolean doInBackground(Void... params) { protected Boolean doInBackground(Void... params) {
try{ try{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment