From b6a9af8620c63d73c0c72beaee6b406cd13d011b Mon Sep 17 00:00:00 2001 From: Varun Talwar Date: Tue, 13 Dec 2016 15:09:02 -0500 Subject: [PATCH] No need of okio.BufferedSource response provides a way to get raw bytes now. --- android/tangram/src/com/mapzen/tangram/MapController.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/android/tangram/src/com/mapzen/tangram/MapController.java b/android/tangram/src/com/mapzen/tangram/MapController.java index 9f7af21806..ac4226a03b 100644 --- a/android/tangram/src/com/mapzen/tangram/MapController.java +++ b/android/tangram/src/com/mapzen/tangram/MapController.java @@ -10,7 +10,6 @@ import com.mapzen.tangram.TouchInput.Gestures; import okhttp3.Call; import okhttp3.Callback; -import okhttp3.Request; import okhttp3.Response; import java.io.IOException; @@ -21,8 +20,6 @@ import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; -import okio.BufferedSource; - /** * {@code MapController} is the main class for interacting with a Tangram map. */ @@ -1007,8 +1004,7 @@ public void onResponse(Call call, Response response) throws IOException { nativeOnUrlFailure(callbackPtr); throw new IOException("Unexpected response code: " + response); } - BufferedSource source = response.body().source(); - byte[] bytes = source.readByteArray(); + byte[] bytes = response.body().bytes(); nativeOnUrlSuccess(bytes, callbackPtr); } });