Created
August 19, 2013 04:46
-
-
Save ducalpha/6265841 to your computer and use it in GitHub Desktop.
Multithreading in android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void start(int streamingMode) { | |
new Thread(new GproxyStart(streamingMode)).start(); | |
} | |
private static class GproxyStart implements Runnable { | |
int streamingMode; | |
public GproxyStart(int streamingMode) { | |
this.streamingMode = streamingMode; | |
} | |
public void run() { | |
String gproxy_path; | |
if (streamingMode == VideoStreaming.GB_E_MODE) { | |
gproxy_path = SX_PATH; | |
} else if (streamingMode == VideoStreaming.GB_P_MODE) { | |
gproxy_path = SP_PATH; | |
} else { | |
/* someting wrong */ | |
gproxy_path = SP_PATH; | |
} | |
int pty_pid = Utils.executeSu(gproxy_path); | |
Exec.waitFor(pty_pid); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment