@@ -34,19 +34,30 @@ public CommandTask(Context context) {
34
34
public CommandTask (Context context , String title , String message ) {
35
35
super (context , title , message );
36
36
}
37
+
38
+ public CommandTask (Context context , String title , String message , boolean createDialog ) {
39
+ super (context , title , message , createDialog );
40
+ }
37
41
38
42
public CommandTask (Context context , int titleResId , int messageResId ) {
39
43
super (context , context .getString (titleResId ), context .getString (messageResId ));
40
44
}
45
+
46
+ public CommandTask (Context context , int titleResId , int messageResId , boolean createDialog ) {
47
+ super (context , context .getString (titleResId ), context .getString (messageResId ), createDialog );
48
+ }
41
49
42
50
public static CommandTask createForConnect (final Context c , final String execName , final String bindPort ) {
51
+ return createForConnect (c , execName , bindPort , true );
52
+ }
53
+ public static CommandTask createForConnect (final Context c , final String execName , final String bindPort , final boolean createDialog ) {
43
54
List <String > command = Collections .unmodifiableList (new ArrayList <String >() {
44
55
{
45
56
add (CHANGE_PERMISSION .concat (Constants .INTERNAL_LOCATION + "/scripts/server-sh.sh" ));
46
57
add (String .format ("%s/scripts/server-sh.sh %s %s" , Constants .INTERNAL_LOCATION , execName , bindPort ));
47
58
}
48
59
});
49
- CommandTask task = new CommandTask (c , R .string .server_loading , R .string .turning_on_server );
60
+ CommandTask task = new CommandTask (c , R .string .server_loading , R .string .turning_on_server , createDialog );
50
61
task .addCommand (command );
51
62
task .setNotification (R .string .web_server_is_running );
52
63
return task ;
0 commit comments