1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Moved BINARY_NAME constant into SyncthingRunnable

This commit is contained in:
Felix Ableitner 2016-10-31 18:27:03 +09:00
parent cc7a130c1d
commit 8b778bdcb4
2 changed files with 7 additions and 7 deletions

View file

@ -39,6 +39,11 @@ public class SyncthingRunnable implements Runnable {
public static final String UNIT_TEST_PATH = "was running";
/**
* Path to the native, integrated syncthing binary, relative to the data folder
*/
public static final String BINARY_NAME = "lib/libsyncthing.so";
private static final AtomicReference<Process> mSyncthing = new AtomicReference<>();
private final Context mContext;
@ -62,7 +67,7 @@ public class SyncthingRunnable implements Runnable {
*/
public SyncthingRunnable(Context context, Command command) {
mContext = context;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + SyncthingService.BINARY_NAME;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + BINARY_NAME;
switch (command) {
case generate:
mCommand = new String[]{ mSyncthingBinary, "-generate", mContext.getFilesDir().toString() };
@ -85,7 +90,7 @@ public class SyncthingRunnable implements Runnable {
*/
public SyncthingRunnable(Context context, String[] manualCommand) {
mContext = context;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + SyncthingService.BINARY_NAME;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + BINARY_NAME;
mCommand = manualCommand;
}

View file

@ -83,11 +83,6 @@ public class SyncthingService extends Service implements
public static final File EXPORT_PATH =
new File(Environment.getExternalStorageDirectory(), "backups/syncthing");
/**
* path to the native, integrated syncthing binary, relative to the data folder
*/
public static final String BINARY_NAME = "lib/libsyncthing.so";
public static final String PREF_ALWAYS_RUN_IN_BACKGROUND = "always_run_in_background";
public static final String PREF_SYNC_ONLY_WIFI = "sync_only_wifi";
public static final String PREF_SYNC_ONLY_WIFI_SSIDS = "sync_only_wifi_ssids_set";