Remove unused callback MessagingListener.systemStatusChanged()
This commit is contained in:
parent
edbee481dd
commit
6916ea8ce5
4 changed files with 0 additions and 28 deletions
|
@ -2818,12 +2818,6 @@ public class MessagingController {
|
|||
}
|
||||
}
|
||||
|
||||
public void systemStatusChanged() {
|
||||
for (MessagingListener l : getListeners()) {
|
||||
l.systemStatusChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelNotificationsForAccount(Account account) {
|
||||
notificationController.clearNewMailNotifications(account);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ public interface MessagingListener {
|
|||
void sendPendingMessagesFailed(Account account);
|
||||
|
||||
void folderStatusChanged(Account account, String folderServerId, int unreadMessageCount);
|
||||
void systemStatusChanged();
|
||||
|
||||
void messageUidChanged(Account account, String folderServerId, String oldUid, String newUid);
|
||||
|
||||
|
|
|
@ -95,10 +95,6 @@ public abstract class SimpleMessagingListener implements MessagingListener {
|
|||
public void folderStatusChanged(Account account, String folderServerId, int unreadMessageCount) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void systemStatusChanged() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageUidChanged(Account account, String folderServerId, String oldUid, String newUid) {
|
||||
}
|
||||
|
|
|
@ -7,10 +7,7 @@ import android.content.Intent;
|
|||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
|
||||
import com.fsck.k9.DI;
|
||||
import com.fsck.k9.K9;
|
||||
import com.fsck.k9.controller.MessagingController;
|
||||
import com.fsck.k9.helper.Utility;
|
||||
import com.fsck.k9.power.TracingPowerManager;
|
||||
import com.fsck.k9.power.TracingPowerManager.TracingWakeLock;
|
||||
|
||||
|
@ -298,20 +295,11 @@ public abstract class CoreService extends Service {
|
|||
Runnable myRunner = new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
boolean oldIsSyncDisabled = CoreService.isMailSyncDisabled(context);
|
||||
|
||||
Timber.d("CoreService (%s) running Runnable %d with startId %d",
|
||||
className, runner.hashCode(), startId);
|
||||
|
||||
// Run the supplied code
|
||||
runner.run();
|
||||
|
||||
// If the sync status changed while runner was executing, notify
|
||||
// MessagingController
|
||||
if (CoreService.isMailSyncDisabled(context) != oldIsSyncDisabled) {
|
||||
MessagingController messagingController = DI.get(MessagingController.class);
|
||||
messagingController.systemStatusChanged();
|
||||
}
|
||||
} finally {
|
||||
// Making absolutely sure stopSelf() will be called
|
||||
try {
|
||||
|
@ -410,11 +398,6 @@ public abstract class CoreService extends Service {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static boolean isMailSyncDisabled(Context context) {
|
||||
boolean hasConnectivity = Utility.hasConnectivity(context);
|
||||
return !hasConnectivity || !isBackgroundSyncAllowed();
|
||||
}
|
||||
|
||||
public static boolean isBackgroundSyncAllowed() {
|
||||
K9.BACKGROUND_OPS backgroundSyncSetting = K9.getBackgroundOps();
|
||||
switch (backgroundSyncSetting) {
|
||||
|
|
Loading…
Reference in a new issue