diff options
author | Brandon McAnsh <brandon.mcansh@gmail.com> | 2015-10-09 09:20:05 -0400 |
---|---|---|
committer | Brandon McAnsh <brandon.mcansh@gmail.com> | 2015-10-09 06:25:50 -0700 |
commit | e046e1284210dc95f19b0e33ab7a18596e3dd32e (patch) | |
tree | b8bfa22c090d58539ca04ba6a8eda21a5bb5faa8 | |
parent | 38f0dcdaafa6d23f8f0b9a3e75ca7f68dc4a3d9a (diff) | |
download | android_packages_apps_Eleven-e046e1284210dc95f19b0e33ab7a18596e3dd32e.tar.gz android_packages_apps_Eleven-e046e1284210dc95f19b0e33ab7a18596e3dd32e.tar.bz2 android_packages_apps_Eleven-e046e1284210dc95f19b0e33ab7a18596e3dd32e.zip |
Eleven: lastFM: Replace HttpStatus use with HttpURLConnection
* org.apache.http.* is now deprecated
https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
Change-Id: Ibd1b044609d8057a67e2928e494c8a0dbd8f8fee
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
-rw-r--r-- | src/com/cyanogenmod/eleven/lastfm/Caller.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/eleven/lastfm/Caller.java b/src/com/cyanogenmod/eleven/lastfm/Caller.java index e17926f..a6e8b64 100644 --- a/src/com/cyanogenmod/eleven/lastfm/Caller.java +++ b/src/com/cyanogenmod/eleven/lastfm/Caller.java @@ -29,7 +29,6 @@ import android.util.Log; import com.cyanogenmod.eleven.lastfm.Result.Status; -import org.apache.http.HttpStatus; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.InputSource; @@ -142,7 +141,7 @@ public class Caller { } catch (final IOException ioEx) { // We will assume that the server is not ready Log.e(TAG, "Failed to download data", ioEx); - lastResult = Result.createHttpErrorResult(HttpStatus.SC_SERVICE_UNAVAILABLE, + lastResult = Result.createHttpErrorResult(HttpURLConnection.HTTP_UNAVAILABLE, ioEx.getLocalizedMessage()); return lastResult; } |