mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +00:00
Move notificationHandler shutdown from RestApi to SyncthingService
This commit is contained in:
parent
e468f5a29c
commit
cf94716059
2 changed files with 4 additions and 7 deletions
|
@ -147,8 +147,6 @@ public class RestApi {
|
|||
|
||||
private Gson mGson;
|
||||
|
||||
@Inject NotificationHandler mNotificationHandler;
|
||||
|
||||
public RestApi(Context context, URL url, String apiKey, OnApiAvailableListener apiListener,
|
||||
OnConfigChangedListener configListener) {
|
||||
((SyncthingApp) context.getApplicationContext()).component().inject(this);
|
||||
|
@ -412,10 +410,6 @@ public class RestApi {
|
|||
mOnConfigChangedListener.onConfigChanged();
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
mNotificationHandler.cancelRestartNotification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version name, or a (text) error message on failure.
|
||||
*/
|
||||
|
|
|
@ -653,8 +653,11 @@ public class SyncthingService extends Service {
|
|||
mEventProcessor = null;
|
||||
}
|
||||
|
||||
if (mNotificationHandler != null) {
|
||||
mNotificationHandler.cancelRestartNotification();
|
||||
}
|
||||
|
||||
if (mRestApi != null) {
|
||||
mRestApi.shutdown();
|
||||
mRestApi = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue