diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java index 414a8a9d..49f4c9e1 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java @@ -36,7 +36,6 @@ public class ApiLoader extends AsyncTaskLoader { protected int m_responseCode = 0; protected String m_responseMessage; protected int m_apiStatusCode = 0; - protected boolean m_canUseProgress = false; protected Context m_context; private SharedPreferences m_prefs; protected String m_lastErrorMessage; @@ -151,16 +150,9 @@ public class ApiLoader extends AsyncTaskLoader { InputStreamReader in = new InputStreamReader(conn.getInputStream(), "UTF-8"); char[] buf = new char[256]; int read = 0; - int total = 0; - - int contentLength = conn.getHeaderFieldInt("Api-Content-Length", -1); - - m_canUseProgress = (contentLength != -1); while ((read = in.read(buf)) >= 0) { response.append(buf, 0, read); - total += read; - //publishProgress(Integer.valueOf(total), Integer.valueOf(contentLength)); } if (m_transportDebugging) Log.d(TAG, "<<< " + response); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java index f5a61e3c..fde40a87 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java @@ -18,12 +18,9 @@ public class Application extends android.app.Application { public ArticleList tmpArticleList; public Article tmpArticle; - //public Feed m_activeFeed; - //public Article m_activeArticle; public int m_selectedArticleId; public String m_sessionId; public int m_apiLevel; - public boolean m_canUseProgress; public static Application getInstance(){ return m_singleton; } @@ -42,28 +39,15 @@ public class Application extends android.app.Application { public void save(Bundle out) { out.setClassLoader(getClass().getClassLoader()); - //out.putParcelableArrayList("gs:loadedArticles", m_loadedArticles); - //out.putParcelable("gs:activeFeed", m_activeFeed); - //out.putParcelable("gs:activeArticle", m_activeArticle); out.putString("gs:sessionId", m_sessionId); out.putInt("gs:apiLevel", m_apiLevel); - out.putBoolean("gs:canUseProgress", m_canUseProgress); out.putInt("gs:selectedArticleId", m_selectedArticleId); } public void load(Bundle in) { - if (/* m_loadedArticles.size() == 0 && */ in != null) { - /* ArrayList list = in.getParcelableArrayList("gs:loadedArticles"); - - for (Parcelable p : list) { - m_loadedArticles.add((Article)p); - } */ - - //m_activeFeed = (Feed) in.getParcelable("gs:activeFeed"); - //m_activeArticle = (Article) in.getParcelable("gs:activeArticle"); + if (in != null) { m_sessionId = in.getString("gs:sessionId"); m_apiLevel = in.getInt("gs:apiLevel"); - m_canUseProgress = in.getBoolean("gs:canUseProgress"); m_selectedArticleId = in.getInt("gs:selectedArticleId"); } 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 a7d42739..5cb175d8 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 @@ -178,10 +178,6 @@ public class OnlineActivity extends CommonActivity { } } - protected boolean canUseProgress() { - return Application.getInstance().m_canUseProgress; - } - protected void switchOffline() { if (m_offlineModeStatus == 2) { @@ -1555,9 +1551,7 @@ public class OnlineActivity extends CommonActivity { JsonElement apiLevel = content.get("api_level"); - Application.getInstance().m_canUseProgress = m_canUseProgress; - - Log.d(TAG, "Authenticated! canUseProgress=" + m_canUseProgress); + Log.d(TAG, "Authenticated!"); if (apiLevel != null) { setApiLevel(apiLevel.getAsInt());