Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1081a15f authored by David Christie's avatar David Christie Committed by android-build-merger
Browse files

resolve merge conflicts of b4a56154 to lmp-dev am: 288166cb

am: b7f8b59e

Change-Id: I26eda3647447490d58777d9fd8b2055ab8574e5e
parents 8ef8e2b6 b7f8b59e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ public class GpsXtraDownloader {

    private static final String TAG = "GpsXtraDownloader";
    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    private static final long MAXIMUM_CONTENT_LENGTH_BYTES = 1000000;  // 1MB.
    private static final String DEFAULT_USER_AGENT = "Android";

    private final Context mContext;
@@ -150,8 +151,9 @@ public class GpsXtraDownloader {
            byte[] body = null;
            if (entity != null) {
                try {
                    if (entity.getContentLength() > 0) {
                        body = new byte[(int) entity.getContentLength()];
                    long contentLength = entity.getContentLength();
                    if (contentLength > 0 && contentLength <= MAXIMUM_CONTENT_LENGTH_BYTES) {
                        body = new byte[(int) contentLength];
                        DataInputStream dis = new DataInputStream(entity.getContent());
                        try {
                            dis.readFully(body);