Skip to content

Commit

Permalink
start rootshell in thread
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanth committed Aug 1, 2016
1 parent dee4357 commit e0888de
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions aFWall/src/main/java/dev/ukanth/ufirewall/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,19 @@ private void updateIconStatus() {
}

private void startRootShell() {
//G.isRootAvail(true);
List<String> cmds = new ArrayList<String>();
cmds.add("true");
new RootCommand().setFailureToast(R.string.error_su)
.setReopenShell(true).run(getApplicationContext(), cmds);
//put up the notification
if(G.activeNotification()){
Api.showNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());
}
Thread rootShell = new Thread(){
@Override
public void run(){
List<String> cmds = new ArrayList<String>();
cmds.add("true");
new RootCommand().setFailureToast(R.string.error_su)
.setReopenShell(true).run(getApplicationContext(), cmds);
if(G.activeNotification()){
Api.showNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());
}
}
};
rootShell.start();
}

@Override
Expand Down

0 comments on commit e0888de

Please sign in to comment.