remove periodic downloading articles notifies
This commit is contained in:
parent
0e9b1e76d2
commit
175c703650
@ -103,7 +103,7 @@
|
|||||||
<string name="dialog_cancel">Cancel</string>
|
<string name="dialog_cancel">Cancel</string>
|
||||||
<string name="syncing_offline_data">Synchronizing offline data...</string>
|
<string name="syncing_offline_data">Synchronizing offline data...</string>
|
||||||
<string name="dialog_offline_switch_prompt">Download unread articles and go offline?</string>
|
<string name="dialog_offline_switch_prompt">Download unread articles and go offline?</string>
|
||||||
<string name="notify_downloading_articles">Downloading articles (%1$d)...</string>
|
<string name="notify_downloading_articles">Downloading articles...</string>
|
||||||
<string name="notify_downloading_init">Starting download...</string>
|
<string name="notify_downloading_init">Starting download...</string>
|
||||||
<string name="notify_downloading_feeds">Downloading feeds...</string>
|
<string name="notify_downloading_feeds">Downloading feeds...</string>
|
||||||
<string name="notify_uploading_sending_data">Sending data to server...</string>
|
<string name="notify_uploading_sending_data">Sending data to server...</string>
|
||||||
|
@ -140,8 +140,6 @@ public class OfflineDownloadService extends IntentService {
|
|||||||
private void downloadArticles() {
|
private void downloadArticles() {
|
||||||
Log.d(TAG, "offline: downloading articles... offset=" + m_articleOffset);
|
Log.d(TAG, "offline: downloading articles... offset=" + m_articleOffset);
|
||||||
|
|
||||||
updateNotification(getString(R.string.notify_downloading_articles, m_articleOffset));
|
|
||||||
|
|
||||||
OfflineArticlesRequest req = new OfflineArticlesRequest(this);
|
OfflineArticlesRequest req = new OfflineArticlesRequest(this);
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -196,6 +194,9 @@ public class OfflineDownloadService extends IntentService {
|
|||||||
m_articleOffset = 0;
|
m_articleOffset = 0;
|
||||||
|
|
||||||
getWritableDb().execSQL("DELETE FROM articles;");
|
getWritableDb().execSQL("DELETE FROM articles;");
|
||||||
|
|
||||||
|
updateNotification(R.string.notify_downloading_articles);
|
||||||
|
|
||||||
downloadArticles();
|
downloadArticles();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user