1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Renamed syncthing package to service

This commit is contained in:
Felix Ableitner 2016-10-31 18:25:55 +09:00
parent 0f870bb216
commit cc7a130c1d
40 changed files with 54 additions and 64 deletions

View file

@ -4,7 +4,7 @@ import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.service.RestApi;
import java.net.URL;
import java.util.ArrayList;

View file

@ -3,8 +3,8 @@ package com.nutomic.syncthingandroid.test;
import android.content.Intent;
import android.os.IBinder;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.service.SyncthingService;
import java.net.URL;
import java.util.LinkedList;

View file

@ -5,7 +5,7 @@ import android.support.test.rule.ActivityTestRule;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.fragments.DeviceListFragment;
import com.nutomic.syncthingandroid.fragments.FolderListFragment;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.test.MockSyncthingService;
import org.junit.Assert;

View file

@ -6,7 +6,7 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.receiver.AppConfigReceiver;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.After;

View file

@ -6,8 +6,8 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.receiver.BatteryReceiver;
import com.nutomic.syncthingandroid.syncthing.DeviceStateHolder;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.DeviceStateHolder;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.After;

View file

@ -6,7 +6,7 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.receiver.BootReceiver;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.After;
@ -17,7 +17,7 @@ import org.junit.Test;
/**
* Tests that {@link BootReceiver} starts the right service
* ({@link com.nutomic.syncthingandroid.syncthing.SyncthingService}.
* ({@link com.nutomic.syncthingandroid.service.SyncthingService}.
*/
public class BootReceiverTest {

View file

@ -5,7 +5,7 @@ import android.os.BatteryManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.DeviceStateHolder;
import com.nutomic.syncthingandroid.service.DeviceStateHolder;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.Assert;

View file

@ -6,9 +6,9 @@ import android.preference.PreferenceManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.DeviceStateHolder;
import com.nutomic.syncthingandroid.service.DeviceStateHolder;
import com.nutomic.syncthingandroid.receiver.NetworkReceiver;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.After;

View file

@ -5,9 +5,9 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.http.PollWebGuiAvailableTask;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingRunnable;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.service.SyncthingRunnable;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.test.MockContext;
import com.nutomic.syncthingandroid.util.ConfigXml;
import com.nutomic.syncthingandroid.util.Util;

View file

@ -3,7 +3,7 @@ package com.nutomic.syncthingandroid.test.syncthing;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.SyncthingRunnable;
import com.nutomic.syncthingandroid.service.SyncthingRunnable;
import com.nutomic.syncthingandroid.test.MockContext;
import org.junit.Assert;

View file

@ -2,8 +2,8 @@ package com.nutomic.syncthingandroid.test.syncthing;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
import org.junit.Assert;
import org.junit.Rule;

View file

@ -9,8 +9,8 @@ import android.preference.PreferenceManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.util.ConfigXml;
import org.junit.After;
@ -21,8 +21,6 @@ import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/**

View file

@ -3,7 +3,7 @@ package com.nutomic.syncthingandroid.test.util;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ServiceTestRule;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.test.MockContext;
import com.nutomic.syncthingandroid.test.Util;
import com.nutomic.syncthingandroid.util.FolderObserver;

View file

@ -79,7 +79,7 @@
android:theme="@style/Theme.Syncthing.Translucent"
android:launchMode="singleTop"/>
<service android:name=".syncthing.SyncthingService" />
<service android:name=".service.SyncthingService" />
<receiver android:name=".receiver.NetworkReceiver">
<intent-filter>

View file

@ -28,7 +28,7 @@ import android.widget.Toast;
import com.google.common.collect.Sets;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import java.io.File;
import java.util.ArrayList;

View file

@ -30,8 +30,7 @@ import com.nutomic.syncthingandroid.fragments.DeviceListFragment;
import com.nutomic.syncthingandroid.fragments.DrawerFragment;
import com.nutomic.syncthingandroid.fragments.FolderListFragment;
import com.nutomic.syncthingandroid.model.Options;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import java.util.Date;
import java.util.concurrent.TimeUnit;

View file

@ -10,7 +10,7 @@ import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
/**
* Shows restart dialog.

View file

@ -7,9 +7,9 @@ import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
import java.util.LinkedList;

View file

@ -16,7 +16,7 @@ import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.util.ConfigXml;
import java.io.FileInputStream;

View file

@ -28,8 +28,7 @@ import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Connection;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.util.Compression;
import com.nutomic.syncthingandroid.util.TextWatcherAdapter;
import com.nutomic.syncthingandroid.util.Util;
@ -43,7 +42,7 @@ import static android.text.TextUtils.isEmpty;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN;
import static com.nutomic.syncthingandroid.syncthing.SyncthingService.State.ACTIVE;
import static com.nutomic.syncthingandroid.service.SyncthingService.State.ACTIVE;
import static com.nutomic.syncthingandroid.util.Compression.METADATA;
/**

View file

@ -14,7 +14,7 @@ import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.views.DevicesAdapter;
import java.util.Collections;

View file

@ -18,8 +18,8 @@ import com.nutomic.syncthingandroid.activities.WebGuiActivity;
import com.nutomic.syncthingandroid.model.Connection;
import com.nutomic.syncthingandroid.model.SystemInfo;
import com.nutomic.syncthingandroid.model.SystemVersion;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.util.Util;
import java.text.NumberFormat;

View file

@ -34,11 +34,9 @@ import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.fragments.dialog.KeepVersionsDialogFragment;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.model.Folder;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.util.TextWatcherAdapter;
import java.util.ArrayList;
import java.util.List;
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginEnd;
@ -46,7 +44,7 @@ import static android.support.v4.view.MarginLayoutParamsCompat.setMarginStart;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
import static android.view.Gravity.CENTER_VERTICAL;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static com.nutomic.syncthingandroid.syncthing.SyncthingService.State.ACTIVE;
import static com.nutomic.syncthingandroid.service.SyncthingService.State.ACTIVE;
import static java.lang.String.valueOf;
/**

View file

@ -14,7 +14,7 @@ import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Folder;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.views.FoldersAdapter;
import java.util.Collections;

View file

@ -22,8 +22,8 @@ import com.nutomic.syncthingandroid.model.Config;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.model.Options;
import com.nutomic.syncthingandroid.views.WifiSsidPreference;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.service.SyncthingService;
import java.security.InvalidParameterException;
import java.util.List;

View file

@ -4,13 +4,11 @@ package com.nutomic.syncthingandroid.http;
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.annotation.Nullable;
import android.util.Log;
import android.util.Pair;
import com.google.common.base.Charsets;
import com.google.common.io.ByteSource;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

View file

@ -12,7 +12,7 @@ import android.support.v4.app.NotificationCompat;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
/**
* Broadcast-receiver to control and configure SyncThing remotely

View file

@ -5,8 +5,8 @@ import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.nutomic.syncthingandroid.syncthing.DeviceStateHolder;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.DeviceStateHolder;
import com.nutomic.syncthingandroid.service.SyncthingService;
/**
* Receives battery plug/unplug intents and sends the charging state to {@link SyncthingService}.

View file

@ -4,7 +4,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingService;
public class BootReceiver extends BroadcastReceiver {

View file

@ -7,8 +7,8 @@ import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.Log;
import com.nutomic.syncthingandroid.syncthing.DeviceStateHolder;
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
import com.nutomic.syncthingandroid.service.DeviceStateHolder;
import com.nutomic.syncthingandroid.service.SyncthingService;
/**
* Receives network connection change intents and sends the wifi state to {@link SyncthingService}.

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.app.Notification;
import android.app.NotificationManager;
@ -13,7 +13,6 @@ import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.gson.JsonObject;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.fragments.DeviceFragment;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.app.Activity;
import android.app.NotificationManager;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.content.Context;
import android.content.Intent;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.annotation.TargetApi;
import android.app.NotificationManager;

View file

@ -1,4 +1,4 @@
package com.nutomic.syncthingandroid.syncthing;
package com.nutomic.syncthingandroid.service;
import android.os.Binder;

View file

@ -7,7 +7,7 @@ import android.preference.PreferenceManager;
import android.util.Log;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.syncthing.SyncthingRunnable;
import com.nutomic.syncthingandroid.service.SyncthingRunnable;
import org.mindrot.jbcrypt.BCrypt;
import org.w3c.dom.Document;

View file

@ -4,7 +4,6 @@ import android.os.FileObserver;
import android.util.Log;
import com.nutomic.syncthingandroid.model.Folder;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import java.io.File;
import java.util.ArrayList;

View file

@ -13,7 +13,7 @@ import android.widget.TextView;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.model.Connection;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.util.Util;
import java.util.HashMap;

View file

@ -14,7 +14,7 @@ import com.nutomic.syncthingandroid.BuildConfig;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.model.Folder;
import com.nutomic.syncthingandroid.model.Model;
import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.service.RestApi;
import com.nutomic.syncthingandroid.util.Util;
import java.util.HashMap;