mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 12:51:16 +00:00
Removed unneeded code.
This commit is contained in:
parent
e821d2e468
commit
02a043f76c
1 changed files with 9 additions and 18 deletions
|
@ -14,7 +14,6 @@ import android.content.SharedPreferences;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import android.support.v4.app.NotificationCompat;
|
||||||
|
@ -92,8 +91,6 @@ public class SyncthingService extends Service {
|
||||||
|
|
||||||
private final SyncthingServiceBinder mBinder = new SyncthingServiceBinder(this);
|
private final SyncthingServiceBinder mBinder = new SyncthingServiceBinder(this);
|
||||||
|
|
||||||
private Handler mMainHandler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for when the Syncthing web interface becomes first available after service start.
|
* Callback for when the Syncthing web interface becomes first available after service start.
|
||||||
*/
|
*/
|
||||||
|
@ -255,7 +252,6 @@ public class SyncthingService extends Service {
|
||||||
.putString("gui_password", sb.toString()).commit();
|
.putString("gui_password", sb.toString()).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
mMainHandler = new Handler();
|
|
||||||
mDeviceStateHolder = new DeviceStateHolder(SyncthingService.this);
|
mDeviceStateHolder = new DeviceStateHolder(SyncthingService.this);
|
||||||
registerReceiver(mDeviceStateHolder, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
registerReceiver(mDeviceStateHolder, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||||
new StartupTask().execute();
|
new StartupTask().execute();
|
||||||
|
@ -393,12 +389,9 @@ public class SyncthingService extends Service {
|
||||||
/**
|
/**
|
||||||
* Called to notifiy listeners of an API change.
|
* Called to notifiy listeners of an API change.
|
||||||
*
|
*
|
||||||
* Must only be called from SyncthingService or {@link RestApi}.
|
* Must only be called from SyncthingService or {@link RestApi} on the main thread.
|
||||||
*/
|
*/
|
||||||
private void onApiChange() {
|
private void onApiChange() {
|
||||||
mMainHandler.post(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
for (Iterator<OnApiChangeListener> i = mOnApiChangeListeners.iterator();
|
for (Iterator<OnApiChangeListener> i = mOnApiChangeListeners.iterator();
|
||||||
i.hasNext(); ) {
|
i.hasNext(); ) {
|
||||||
OnApiChangeListener listener = i.next();
|
OnApiChangeListener listener = i.next();
|
||||||
|
@ -409,8 +402,6 @@ public class SyncthingService extends Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog to be shown when attempting to start syncthing while it is disabled according
|
* Dialog to be shown when attempting to start syncthing while it is disabled according
|
||||||
|
|
Loading…
Reference in a new issue