diff options
3 files changed, 8 insertions, 27 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index 32a2d2e2..d08b26df 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -76,15 +76,7 @@ public class OnlineActivity extends CommonActivity { private BroadcastReceiver m_broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context content, Intent intent) { - - if (intent.getAction().equals(OfflineDownloadService.INTENT_ACTION_SUCCESS)) { - - m_offlineModeStatus = 2; - - switchOffline(); - - } else if (intent.getAction().equals(OfflineUploadService.INTENT_ACTION_SUCCESS)) { - Log.d(TAG, "offline upload service reports success"); + if (intent.getAction().equals(OfflineUploadService.INTENT_ACTION_SUCCESS)) { toast(R.string.offline_sync_success); } } @@ -181,18 +173,7 @@ public class OnlineActivity extends CommonActivity { protected void switchOffline() { - if (m_offlineModeStatus == 2) { - - Snackbar.make(findViewById(android.R.id.content), R.string.dialog_offline_success, Snackbar.LENGTH_LONG) - .setAction(R.string.dialog_offline_go, new View.OnClickListener() { - @Override - public void onClick(View v) { - switchOfflineSuccess(); - } - }) - .show(); - - } else if (m_offlineModeStatus == 0) { + if (m_offlineModeStatus == 0) { AlertDialog.Builder builder = new AlertDialog.Builder(this) .setMessage(R.string.dialog_offline_switch_prompt) @@ -1141,7 +1122,7 @@ public class OnlineActivity extends CommonActivity { m_prefs.getBoolean("ssl_trust_any_host", false)); IntentFilter filter = new IntentFilter(); - filter.addAction(OfflineDownloadService.INTENT_ACTION_SUCCESS); + //filter.addAction(OfflineDownloadService.INTENT_ACTION_SUCCESS); filter.addAction(OfflineUploadService.INTENT_ACTION_SUCCESS); filter.addCategory(Intent.CATEGORY_DEFAULT); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java index e6de3f98..d4532e47 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java @@ -48,7 +48,7 @@ public class OfflineDownloadService extends Service { public static final int NOTIFY_DOWNLOADING = 1; public static final int NOTIFY_DOWNLOAD_SUCCESS = 2; - public static final String INTENT_ACTION_SUCCESS = "org.fox.ttrss.intent.action.DownloadComplete"; + //public static final String INTENT_ACTION_SUCCESS = "org.fox.ttrss.intent.action.DownloadComplete"; public static final String INTENT_ACTION_CANCEL = "org.fox.ttrss.intent.action.Cancel"; private static final int OFFLINE_SYNC_SEQ = 50; @@ -194,10 +194,10 @@ public class OfflineDownloadService extends Service { } else { - Intent intent = new Intent(); + /*Intent intent = new Intent(); intent.setAction(INTENT_ACTION_SUCCESS); intent.addCategory(Intent.CATEGORY_DEFAULT); - sendBroadcast(intent); + sendBroadcast(intent);*/ notifyDownloadSuccess(); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java index e70b221c..67b93e2b 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java @@ -253,10 +253,10 @@ public class ImageCacheService extends IntentService { if (!isDownloadServiceRunning()) { m_nmgr.cancel(NOTIFY_DOWNLOADING); - Intent success = new Intent(); + /*Intent success = new Intent(); success.setAction(OfflineDownloadService.INTENT_ACTION_SUCCESS); success.addCategory(Intent.CATEGORY_DEFAULT); - sendBroadcast(success); + sendBroadcast(success);*/ notifyDownloadSuccess(); } |