ApiRequest: properly handle NOT_LOGGED_IN

This commit is contained in:
Andrew Dolgov 2011-12-02 18:41:11 +03:00
parent 8e21ba0c94
commit 04312e1929
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="27" android:versionCode="28"
android:versionName="0.1.26"> android:versionName="0.1.27">
<uses-sdk android:minSdkVersion="8" /> <uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />

View File

@ -200,6 +200,8 @@ public class ApiRequest extends AsyncTask<HashMap<String,String>, Integer, JsonE
m_lastError = ApiError.LOGIN_FAILED; m_lastError = ApiError.LOGIN_FAILED;
} else if (error.equals("API_DISABLED")) { } else if (error.equals("API_DISABLED")) {
m_lastError = ApiError.LOGIN_FAILED; m_lastError = ApiError.LOGIN_FAILED;
} else if (error.equals("NOT_LOGGED_IN")) {
m_lastError = ApiError.LOGIN_FAILED;
} else { } else {
Log.d(TAG, "Unknown API error: " + error); Log.d(TAG, "Unknown API error: " + error);
m_lastError = ApiError.API_UNKNOWN; m_lastError = ApiError.API_UNKNOWN;