diff options
author | Andrew Dolgov <[email protected]> | 2015-06-06 11:29:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-06 11:29:30 +0300 |
commit | 3d23124f72c0bd94fa7d6cc8e8b3e7401e17bfdc (patch) | |
tree | d0a2165b4bb12f2dd7bc29a8674a29bad121ae35 /org.fox.ttrss/src/main/java | |
parent | 75b86b94bbba939cacb80c0913448b09939d66b1 (diff) |
lint: use preferenceeditor.apply instead of commit
Diffstat (limited to 'org.fox.ttrss/src/main/java')
7 files changed, 13 insertions, 13 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index 347bb4b1..040db4e1 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -80,7 +80,7 @@ public class CommonActivity extends ActionBarActivity { public void setUnreadOnly(boolean unread) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putBoolean("show_unread_only", unread); - editor.commit(); + editor.apply(); } public void toast(int msgId) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java index 1b6eede2..693238a6 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java @@ -97,7 +97,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe if (m_prefs.getBoolean("drawer_open_on_start", true)) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putBoolean("drawer_open_on_start", false); - editor.commit(); + editor.apply(); } invalidateOptionsMenu(); 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 8766d3cd..8ad98997 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 @@ -216,7 +216,7 @@ public class OnlineActivity extends CommonActivity { SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE); SharedPreferences.Editor editor = localPrefs.edit(); editor.putBoolean("offline_mode_active", true); - editor.commit(); + editor.apply(); Intent offline = new Intent( OnlineActivity.this, @@ -388,7 +388,7 @@ public class OnlineActivity extends CommonActivity { SharedPreferences.Editor editor = m_prefs.edit(); editor.putBoolean("offline_mode_active", true); - editor.commit(); + editor.apply(); Intent offline = new Intent(OnlineActivity.this, OfflineActivity.class); offline.putExtra("initial", true); @@ -483,7 +483,7 @@ public class OnlineActivity extends CommonActivity { SharedPreferences.Editor editor = m_prefs.edit(); editor.putLong("date_firstlaunch_trial", firstStart); - editor.commit(); + editor.apply(); } if (!notify && System.currentTimeMillis() > firstStart + (TRIAL_DAYS * 24 * 60 * 60 * 1000)) { @@ -1723,13 +1723,13 @@ public class OnlineActivity extends CommonActivity { public void setSortMode(String sortMode) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putString("headlines_sort_mode", sortMode); - editor.commit(); + editor.apply(); } public void setViewMode(String viewMode) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putString("view_mode", viewMode); - editor.commit(); + editor.apply(); } public String getViewMode() { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java index 2f59e2e9..0dbfc11b 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java @@ -606,7 +606,7 @@ public class OfflineActivity extends CommonActivity { SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE); SharedPreferences.Editor editor = localPrefs.edit(); editor.putBoolean("offline_mode_active", false); - editor.commit(); + editor.apply(); Intent refresh = new Intent(this, org.fox.ttrss.OnlineActivity.class); startActivity(refresh); @@ -808,7 +808,7 @@ public class OfflineActivity extends CommonActivity { public void setViewMode(String viewMode) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putString("offline_view_mode", viewMode); - editor.commit(); + editor.apply(); } /* public boolean getOldestFirst() { 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 f389add2..3096490f 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 @@ -161,7 +161,7 @@ public class OfflineDownloadService extends Service { SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE); SharedPreferences.Editor editor = localPrefs.edit(); editor.putBoolean("offline_mode_active", true); - editor.commit(); + editor.apply(); } else { Intent intent = new Intent(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index d6fd2e4e..df059e4d 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -159,14 +159,14 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead if (true) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putBoolean("offline_oldest_first", false); - editor.commit(); + editor.apply(); } break; case 1: if (true) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putBoolean("offline_oldest_first", true); - editor.commit(); + editor.apply(); } break; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java index b7f66188..54915c9e 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java @@ -225,7 +225,7 @@ public class OfflineUploadService extends IntentService { SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE); SharedPreferences.Editor editor = localPrefs.edit(); editor.putBoolean("offline_mode_active", false); - editor.commit(); + editor.apply(); } else { Intent intent = new Intent(); |