Skip to content

Commit

Permalink
Match java style in service_only
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Jan 19, 2017
1 parent 9de3521 commit 85c0ba4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class PythonService extends Service implements Runnable {
private String pythonName;
private String pythonHome;
private String pythonPath;
private String ANDROID_UNPACK;
private String androidUnpack;
private String serviceEntrypoint;
private String pythonServiceArgument;

Expand Down Expand Up @@ -71,7 +71,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
pythonName = extras.getString("pythonName");
pythonHome = extras.getString("pythonHome");
pythonPath = extras.getString("pythonPath");
ANDROID_UNPACK = extras.getString("ANDROID_UNPACK");
androidUnpack = extras.getString("androidUnpack");
pythonServiceArgument = extras.getString("pythonServiceArgument");

Log.v(TAG, "Starting Python thread");
Expand Down Expand Up @@ -129,7 +129,7 @@ public void onDestroy() {
public void run() {
PythonUtil.loadLibraries(getFilesDir());
nativeStart(androidPrivate, androidArgument, serviceEntrypoint, pythonName, pythonHome,
pythonPath, pythonServiceArgument, ANDROID_UNPACK);
pythonPath, pythonServiceArgument, androidUnpack);
stopSelf();
}

Expand All @@ -145,5 +145,5 @@ public void run() {
public static native void nativeStart(String androidPrivate, String androidArgument,
String serviceEntrypoint, String pythonName,
String pythonHome, String pythonPath,
String pythonServiceArgument, String ANDROID_UNPACK);
String pythonServiceArgument, String androidUnpack);
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void start(Context ctx, String pythonServiceArgument) {
intent.putExtra("serviceDescription", "");
intent.putExtra("pythonName", "{{ name }}");
intent.putExtra("pythonHome", argument);
intent.putExtra("ANDROID_UNPACK", argument);
intent.putExtra("androidUnpack", argument);
intent.putExtra("pythonPath", argument + ":" + argument + "/lib");
intent.putExtra("pythonServiceArgument", pythonServiceArgument);
ctx.startService(intent);
Expand Down

0 comments on commit 85c0ba4

Please sign in to comment.