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

Commit b1d0403c authored by Dave Bort's avatar Dave Bort
Browse files

Remove references to android.util.Config

The semantics of Config.DEBUG will be changing soon, and all other
Config.* fields will become deprecated/hidden.

BUG=1780938
parent 61805637
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -33,7 +33,6 @@ import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager;
import android.os.Handler;
import android.os.Handler;
import android.os.Looper;
import android.os.Looper;
import android.util.Config;
import android.util.Log;
import android.util.Log;
import android.webkit.WebView;
import android.webkit.WebView;
import java.util.List;
import java.util.List;
@@ -47,6 +46,11 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver {
   * Logging tag
   * Logging tag
   */
   */
  private static final String TAG = "Gears-J-WifiProvider";
  private static final String TAG = "Gears-J-WifiProvider";
  /**
   * Flag for guarding Log.v() calls.
   * Set to true to enable extra debug logging.
   */
  private static final boolean LOGV_ENABLED = false;
  /**
  /**
   * Our Wifi manager instance.
   * Our Wifi manager instance.
   */
   */
@@ -104,7 +108,7 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver {
   */
   */
  public void shutdown() {
  public void shutdown() {
    mContext.unregisterReceiver(this);
    mContext.unregisterReceiver(this);
    if (Config.LOGV) {
    if (LOGV_ENABLED) {
      Log.v(TAG, "Wifi provider closed.");
      Log.v(TAG, "Wifi provider closed.");
    }
    }
  }
  }
@@ -118,7 +122,7 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver {
  public void onReceive(Context context, Intent intent) {
  public void onReceive(Context context, Intent intent) {
    if (intent.getAction().equals(
    if (intent.getAction().equals(
            mWifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
            mWifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
      if (Config.LOGV) {
      if (LOGV_ENABLED) {
        Log.v(TAG, "Wifi scan resulst available");
        Log.v(TAG, "Wifi scan resulst available");
      }
      }
      onUpdateAvailable(mWifiManager.getScanResults(), mNativeObject);
      onUpdateAvailable(mWifiManager.getScanResults(), mNativeObject);
+46 −45
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@ import android.net.http.Headers;
import android.os.Handler;
import android.os.Handler;
import android.os.Looper;
import android.os.Looper;
import android.os.Message;
import android.os.Message;
import android.util.Config;
import android.util.Log;
import android.util.Log;
import android.webkit.CacheManager;
import android.webkit.CacheManager;
import android.webkit.CacheManager.CacheResult;
import android.webkit.CacheManager.CacheResult;
@@ -88,6 +87,8 @@ import java.util.concurrent.locks.ReentrantLock;
public final class ApacheHttpRequestAndroid {
public final class ApacheHttpRequestAndroid {
    /** Debug logging tag. */
    /** Debug logging tag. */
    private static final String LOG_TAG = "Gears-J";
    private static final String LOG_TAG = "Gears-J";
    /** Flag for guarding Log.v() calls. */
    private static final boolean LOGV_ENABLED = false;
    /** HTTP response header line endings are CR-LF style. */
    /** HTTP response header line endings are CR-LF style. */
    private static final String HTTP_LINE_ENDING = "\r\n";
    private static final String HTTP_LINE_ENDING = "\r\n";
    /** Safe MIME type to use whenever it isn't specified. */
    /** Safe MIME type to use whenever it isn't specified. */
@@ -173,18 +174,18 @@ public final class ApacheHttpRequestAndroid {
        public void run() {
        public void run() {
            boolean problem = false;
            boolean problem = false;
            try {
            try {
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "REQUEST : " + mMethod.getRequestLine());
                    Log.i(LOG_TAG, "REQUEST : " + mMethod.getRequestLine());
                }
                }
                mResponse = mClient.execute(mMethod);
                mResponse = mClient.execute(mMethod);
                if (mResponse != null) {
                if (mResponse != null) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "response (status line): "
                        Log.i(LOG_TAG, "response (status line): "
                              + mResponse.getStatusLine());
                              + mResponse.getStatusLine());
                    }
                    }
                    mResponseLine = "" + mResponse.getStatusLine();
                    mResponseLine = "" + mResponse.getStatusLine();
                } else {
                } else {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "problem, response == null");
                        Log.i(LOG_TAG, "problem, response == null");
                    }
                    }
                    problem = true;
                    problem = true;
@@ -198,7 +199,7 @@ public final class ApacheHttpRequestAndroid {
            }
            }


            if (!problem) {
            if (!problem) {
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "Request complete ("
                    Log.i(LOG_TAG, "Request complete ("
                          + mMethod.getRequestLine() + ")");
                          + mMethod.getRequestLine() + ")");
                }
                }
@@ -206,7 +207,7 @@ public final class ApacheHttpRequestAndroid {
                mConnectionFailedLock.lock();
                mConnectionFailedLock.lock();
                mConnectionFailed = true;
                mConnectionFailed = true;
                mConnectionFailedLock.unlock();
                mConnectionFailedLock.unlock();
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "Request FAILED ("
                    Log.i(LOG_TAG, "Request FAILED ("
                          + mMethod.getRequestLine() + ")");
                          + mMethod.getRequestLine() + ")");
                }
                }
@@ -233,7 +234,7 @@ public final class ApacheHttpRequestAndroid {
                try {
                try {
                    wait();
                    wait();
                } catch (InterruptedException e) {
                } catch (InterruptedException e) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "InterruptedException while putting " +
                        Log.i(LOG_TAG, "InterruptedException while putting " +
                            "a DataPacket in the Buffer: " + e);
                            "a DataPacket in the Buffer: " + e);
                    }
                    }
@@ -248,7 +249,7 @@ public final class ApacheHttpRequestAndroid {
                try {
                try {
                    wait();
                    wait();
                } catch (InterruptedException e) {
                } catch (InterruptedException e) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                      Log.i(LOG_TAG, "InterruptedException while getting " +
                      Log.i(LOG_TAG, "InterruptedException while getting " +
                          "a DataPacket in the Buffer: " + e);
                          "a DataPacket in the Buffer: " + e);
                    }
                    }
@@ -271,7 +272,7 @@ public final class ApacheHttpRequestAndroid {
                try {
                try {
                    wait();
                    wait();
                } catch (InterruptedException e) {
                } catch (InterruptedException e) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "InterruptedException while waiting " +
                        Log.i(LOG_TAG, "InterruptedException while waiting " +
                            "until a DataPacket is consumed: " + e);
                            "until a DataPacket is consumed: " + e);
                    }
                    }
@@ -285,7 +286,7 @@ public final class ApacheHttpRequestAndroid {
                try {
                try {
                    wait();
                    wait();
                } catch (InterruptedException e) {
                } catch (InterruptedException e) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "InterruptedException while indicating "
                        Log.i(LOG_TAG, "InterruptedException while indicating "
                              + "that the DataPacket has been consumed: " + e);
                              + "that the DataPacket has been consumed: " + e);
                    }
                    }
@@ -373,14 +374,14 @@ public final class ApacheHttpRequestAndroid {
                mSignal.packetConsumed();
                mSignal.packetConsumed();
                mConnectionFailedLock.lock();
                mConnectionFailedLock.lock();
                if (mConnectionFailed) {
                if (mConnectionFailed) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "stopping loop on error");
                        Log.i(LOG_TAG, "stopping loop on error");
                    }
                    }
                    finished = true;
                    finished = true;
                }
                }
                mConnectionFailedLock.unlock();
                mConnectionFailedLock.unlock();
            }
            }
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "flushing the outputstream...");
                Log.i(LOG_TAG, "flushing the outputstream...");
            }
            }
            mOutputStream.flush();
            mOutputStream.flush();
@@ -399,7 +400,7 @@ public final class ApacheHttpRequestAndroid {
        private void write(DataPacket packet) {
        private void write(DataPacket packet) {
            try {
            try {
                if (mOutputStream == null) {
                if (mOutputStream == null) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "NO OUTPUT STREAM !!!");
                        Log.i(LOG_TAG, "NO OUTPUT STREAM !!!");
                    }
                    }
                    return;
                    return;
@@ -407,7 +408,7 @@ public final class ApacheHttpRequestAndroid {
                mOutputStream.write(packet.getBytes(), 0, packet.getLength());
                mOutputStream.write(packet.getBytes(), 0, packet.getLength());
                mOutputStream.flush();
                mOutputStream.flush();
            } catch (IOException e) {
            } catch (IOException e) {
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "exc: " + e);
                    Log.i(LOG_TAG, "exc: " + e);
                }
                }
                mConnectionFailedLock.lock();
                mConnectionFailedLock.lock();
@@ -423,7 +424,7 @@ public final class ApacheHttpRequestAndroid {
                    mStreamingReady.await();
                    mStreamingReady.await();
                }
                }
            } catch (InterruptedException e) {
            } catch (InterruptedException e) {
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "InterruptedException in "
                    Log.i(LOG_TAG, "InterruptedException in "
                          + "StreamEntity::isReady() : ", e);
                          + "StreamEntity::isReady() : ", e);
                }
                }
@@ -468,7 +469,7 @@ public final class ApacheHttpRequestAndroid {
     *                  False on failure.
     *                  False on failure.
     */
     */
    public synchronized boolean open(String method, String url) {
    public synchronized boolean open(String method, String url) {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "open " + method + " " + url);
            Log.i(LOG_TAG, "open " + method + " " + url);
        }
        }
        // Create the client
        // Create the client
@@ -502,7 +503,7 @@ public final class ApacheHttpRequestAndroid {
        } else if ("DELETE".equalsIgnoreCase(method)) {
        } else if ("DELETE".equalsIgnoreCase(method)) {
            mMethod = new HttpDelete(url);
            mMethod = new HttpDelete(url);
        } else {
        } else {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Method " + method + " not supported");
                Log.i(LOG_TAG, "Method " + method + " not supported");
            }
            }
            return false;
            return false;
@@ -549,7 +550,7 @@ public final class ApacheHttpRequestAndroid {
     * (unless already finished)
     * (unless already finished)
     */
     */
    private void waitUntilConnectionFinished() {
    private void waitUntilConnectionFinished() {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "waitUntilConnectionFinished("
            Log.i(LOG_TAG, "waitUntilConnectionFinished("
                  + mConnectionFinished + ")");
                  + mConnectionFinished + ")");
        }
        }
@@ -558,11 +559,11 @@ public final class ApacheHttpRequestAndroid {
                try {
                try {
                    mHttpThread.join();
                    mHttpThread.join();
                    mConnectionFinished = true;
                    mConnectionFinished = true;
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "http thread joined");
                        Log.i(LOG_TAG, "http thread joined");
                    }
                    }
                } catch (InterruptedException e) {
                } catch (InterruptedException e) {
                    if (Config.LOGV) {
                    if (LOGV_ENABLED) {
                        Log.i(LOG_TAG, "interrupted: " + e);
                        Log.i(LOG_TAG, "interrupted: " + e);
                    }
                    }
                }
                }
@@ -596,7 +597,7 @@ public final class ApacheHttpRequestAndroid {
        Header[] headers = mResponse.getAllHeaders();
        Header[] headers = mResponse.getAllHeaders();
        for (int i = 0; i < headers.length; i++) {
        for (int i = 0; i < headers.length; i++) {
            Header header = headers[i];
            Header header = headers[i];
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "header " + header.getName()
                Log.i(LOG_TAG, "header " + header.getName()
                      + " -> " + header.getValue());
                      + " -> " + header.getValue());
            }
            }
@@ -615,7 +616,7 @@ public final class ApacheHttpRequestAndroid {
     */
     */
    public synchronized void setRequestHeader(String name, String value) {
    public synchronized void setRequestHeader(String name, String value) {
        String[] mapValue = { name, value };
        String[] mapValue = { name, value };
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "setRequestHeader: " + name + " => " + value);
            Log.i(LOG_TAG, "setRequestHeader: " + name + " => " + value);
        }
        }
        if (name.equalsIgnoreCase(KEY_CONTENT_LENGTH)) {
        if (name.equalsIgnoreCase(KEY_CONTENT_LENGTH)) {
@@ -647,7 +648,7 @@ public final class ApacheHttpRequestAndroid {
        while (it.hasNext()) {
        while (it.hasNext()) {
            // Set the key case-sensitive.
            // Set the key case-sensitive.
            String[] entry = it.next();
            String[] entry = it.next();
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "apply header " + entry[HEADERS_MAP_INDEX_KEY] +
                Log.i(LOG_TAG, "apply header " + entry[HEADERS_MAP_INDEX_KEY] +
                    " => " + entry[HEADERS_MAP_INDEX_VALUE]);
                    " => " + entry[HEADERS_MAP_INDEX_VALUE]);
            }
            }
@@ -671,7 +672,7 @@ public final class ApacheHttpRequestAndroid {
                return null;
                return null;
            }
            }
        } else {
        } else {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "getResponseHeader() called but "
                Log.i(LOG_TAG, "getResponseHeader() called but "
                      + "response not received");
                      + "response not received");
            }
            }
@@ -687,7 +688,7 @@ public final class ApacheHttpRequestAndroid {
     */
     */
    public synchronized String getAllResponseHeaders() {
    public synchronized String getAllResponseHeaders() {
        if (mResponseHeaders == null) {
        if (mResponseHeaders == null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "getAllResponseHeaders() called but "
                Log.i(LOG_TAG, "getAllResponseHeaders() called but "
                      + "response not received");
                      + "response not received");
            }
            }
@@ -715,7 +716,7 @@ public final class ApacheHttpRequestAndroid {
     * @param value The associated value.
     * @param value The associated value.
     */
     */
    private void setResponseHeader(String name, String value) {
    private void setResponseHeader(String name, String value) {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Set response header " + name + ": " + value);
            Log.i(LOG_TAG, "Set response header " + name + ": " + value);
        }
        }
        String mapValue[] = { name, value };
        String mapValue[] = { name, value };
@@ -766,7 +767,7 @@ public final class ApacheHttpRequestAndroid {
        UrlInterceptHandlerGears.ServiceResponse serviceResponse =
        UrlInterceptHandlerGears.ServiceResponse serviceResponse =
            handler.getServiceResponse(url, mRequestHeaders);
            handler.getServiceResponse(url, mRequestHeaders);
        if (serviceResponse == null) {
        if (serviceResponse == null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "No response in LocalServer");
                Log.i(LOG_TAG, "No response in LocalServer");
            }
            }
            return false;
            return false;
@@ -776,7 +777,7 @@ public final class ApacheHttpRequestAndroid {
        mBodyInputStream = serviceResponse.getInputStream();
        mBodyInputStream = serviceResponse.getInputStream();
        mResponseLine = serviceResponse.getStatusLine();
        mResponseLine = serviceResponse.getStatusLine();
        mResponseHeaders = serviceResponse.getResponseHeaders();
        mResponseHeaders = serviceResponse.getResponseHeaders();
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Got response from LocalServer: " + mResponseLine);
            Log.i(LOG_TAG, "Got response from LocalServer: " + mResponseLine);
        }
        }
        return true;
        return true;
@@ -803,19 +804,19 @@ public final class ApacheHttpRequestAndroid {
        CacheResult mCacheResult =
        CacheResult mCacheResult =
            CacheManager.getCacheFile(url, cacheRequestHeaders);
            CacheManager.getCacheFile(url, cacheRequestHeaders);
        if (mCacheResult == null) {
        if (mCacheResult == null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "No CacheResult for " + url);
                Log.i(LOG_TAG, "No CacheResult for " + url);
            }
            }
            return false;
            return false;
        }
        }
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Got CacheResult from browser cache");
            Log.i(LOG_TAG, "Got CacheResult from browser cache");
        }
        }
        // Check for expiry. -1 is "never", otherwise milliseconds since 1970.
        // Check for expiry. -1 is "never", otherwise milliseconds since 1970.
        // Can be compared to System.currentTimeMillis().
        // Can be compared to System.currentTimeMillis().
        long expires = mCacheResult.getExpires();
        long expires = mCacheResult.getExpires();
        if (expires >= 0 && System.currentTimeMillis() >= expires) {
        if (expires >= 0 && System.currentTimeMillis() >= expires) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "CacheResult expired "
                Log.i(LOG_TAG, "CacheResult expired "
                    + (System.currentTimeMillis() - expires)
                    + (System.currentTimeMillis() - expires)
                    + " milliseconds ago");
                    + " milliseconds ago");
@@ -827,7 +828,7 @@ public final class ApacheHttpRequestAndroid {
        mBodyInputStream = mCacheResult.getInputStream();
        mBodyInputStream = mCacheResult.getInputStream();
        if (mBodyInputStream == null) {
        if (mBodyInputStream == null) {
            // Cache result may have gone away.
            // Cache result may have gone away.
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "No mBodyInputStream for CacheResult " + url);
                Log.i(LOG_TAG, "No mBodyInputStream for CacheResult " + url);
            }
            }
            return false;
            return false;
@@ -855,7 +856,7 @@ public final class ApacheHttpRequestAndroid {
        }
        }
        // Synthesize the response line.
        // Synthesize the response line.
        mResponseLine = "HTTP/1.1 " + statusCode + " " + statusMessage;
        mResponseLine = "HTTP/1.1 " + statusCode + " " + statusMessage;
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Synthesized " + mResponseLine);
            Log.i(LOG_TAG, "Synthesized " + mResponseLine);
        }
        }
        // Synthesize the returned headers from cache.
        // Synthesize the returned headers from cache.
@@ -914,7 +915,7 @@ public final class ApacheHttpRequestAndroid {
     */
     */
    public synchronized boolean createCacheResult(
    public synchronized boolean createCacheResult(
        String url, int responseCode, String mimeType, String encoding) {
        String url, int responseCode, String mimeType, String encoding) {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Making cache entry for " + url);
            Log.i(LOG_TAG, "Making cache entry for " + url);
        }
        }
        // Take the headers and parse them into a format needed by
        // Take the headers and parse them into a format needed by
@@ -935,14 +936,14 @@ public final class ApacheHttpRequestAndroid {
        mCacheResult = CacheManager.createCacheFile(
        mCacheResult = CacheManager.createCacheFile(
            url, responseCode, cacheHeaders, mimeType, true);
            url, responseCode, cacheHeaders, mimeType, true);
        if (mCacheResult != null) {
        if (mCacheResult != null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Saving into cache");
                Log.i(LOG_TAG, "Saving into cache");
            }
            }
            mCacheResult.setEncoding(encoding);
            mCacheResult.setEncoding(encoding);
            mCacheResultUrl = url;
            mCacheResultUrl = url;
            return true;
            return true;
        } else {
        } else {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Couldn't create mCacheResult");
                Log.i(LOG_TAG, "Couldn't create mCacheResult");
            }
            }
            return false;
            return false;
@@ -960,7 +961,7 @@ public final class ApacheHttpRequestAndroid {
     */
     */
    public synchronized boolean appendCacheResult(byte[] data, int bytes) {
    public synchronized boolean appendCacheResult(byte[] data, int bytes) {
        if (mCacheResult == null) {
        if (mCacheResult == null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "appendCacheResult() called without a "
                Log.i(LOG_TAG, "appendCacheResult() called without a "
                      + "CacheResult initialized");
                      + "CacheResult initialized");
            }
            }
@@ -969,7 +970,7 @@ public final class ApacheHttpRequestAndroid {
        try {
        try {
            mCacheResult.getOutputStream().write(data, 0, bytes);
            mCacheResult.getOutputStream().write(data, 0, bytes);
        } catch (IOException ex) {
        } catch (IOException ex) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Got IOException writing cache data: " + ex);
                Log.i(LOG_TAG, "Got IOException writing cache data: " + ex);
            }
            }
            return false;
            return false;
@@ -984,14 +985,14 @@ public final class ApacheHttpRequestAndroid {
     */
     */
    public synchronized boolean saveCacheResult() {
    public synchronized boolean saveCacheResult() {
        if (mCacheResult == null || mCacheResultUrl == null) {
        if (mCacheResult == null || mCacheResultUrl == null) {
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Tried to save cache result but "
                Log.i(LOG_TAG, "Tried to save cache result but "
                      + "createCacheResult not called");
                      + "createCacheResult not called");
            }
            }
            return false;
            return false;
        }
        }


        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "Saving cache result");
            Log.i(LOG_TAG, "Saving cache result");
        }
        }
        CacheManager.saveCacheFile(mCacheResultUrl, mCacheResult);
        CacheManager.saveCacheFile(mCacheResultUrl, mCacheResult);
@@ -1006,7 +1007,7 @@ public final class ApacheHttpRequestAndroid {
     * ability to receive a null packet for sendPostData().
     * ability to receive a null packet for sendPostData().
     */
     */
    public synchronized void abort() {
    public synchronized void abort() {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "ABORT CALLED");
            Log.i(LOG_TAG, "ABORT CALLED");
        }
        }
        if (mMethod != null) {
        if (mMethod != null) {
@@ -1019,7 +1020,7 @@ public final class ApacheHttpRequestAndroid {
     * thread to complete.
     * thread to complete.
     */
     */
    public synchronized void interrupt() {
    public synchronized void interrupt() {
        if (Config.LOGV) {
        if (LOGV_ENABLED) {
            Log.i(LOG_TAG, "INTERRUPT CALLED");
            Log.i(LOG_TAG, "INTERRUPT CALLED");
        }
        }
        mConnectionFailedLock.lock();
        mConnectionFailedLock.lock();
@@ -1053,7 +1054,7 @@ public final class ApacheHttpRequestAndroid {
                    mBodyInputStream = entity.getContent();
                    mBodyInputStream = entity.getContent();
                }
                }
            } catch (IOException inputException) {
            } catch (IOException inputException) {
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "Failed to connect InputStream: "
                    Log.i(LOG_TAG, "Failed to connect InputStream: "
                          + inputException);
                          + inputException);
                }
                }
@@ -1062,7 +1063,7 @@ public final class ApacheHttpRequestAndroid {
            }
            }
            if (mBodyInputStream == null) {
            if (mBodyInputStream == null) {
                // No error stream either. Treat as a 0 byte response.
                // No error stream either. Treat as a 0 byte response.
                if (Config.LOGV) {
                if (LOGV_ENABLED) {
                    Log.i(LOG_TAG, "No InputStream");
                    Log.i(LOG_TAG, "No InputStream");
                }
                }
                return 0; // EOF.
                return 0; // EOF.
@@ -1081,7 +1082,7 @@ public final class ApacheHttpRequestAndroid {
            }
            }
        } catch (IOException e) {
        } catch (IOException e) {
            // An abort() interrupts us by calling close() on our stream.
            // An abort() interrupts us by calling close() on our stream.
            if (Config.LOGV) {
            if (LOGV_ENABLED) {
                Log.i(LOG_TAG, "Got IOException in mBodyInputStream.read(): ", e);
                Log.i(LOG_TAG, "Got IOException in mBodyInputStream.read(): ", e);
            }
            }
            ret = -1;
            ret = -1;