OSDN Git Service

change remaining frameworks/base Gservices to Secure settings
authorDoug Zongker <dougz@android.com>
Thu, 7 Jan 2010 21:51:16 +0000 (13:51 -0800)
committerDoug Zongker <dougz@android.com>
Thu, 7 Jan 2010 23:00:37 +0000 (15:00 -0800)
Change-Id: I61bdb05a2526523700c2833154d5a4133881ef10

common/java/com/android/common/AndroidHttpClient.java

index 6fa6da1..99faf6e 100644 (file)
@@ -339,19 +339,9 @@ public final class AndroidHttpClient implements HttpClient {
      * Shorter data will not be compressed.
      */
     public static long getMinGzipSize(ContentResolver resolver) {
-        String sMinGzipBytes = Settings.Gservices.getString(resolver,
-                Settings.Gservices.SYNC_MIN_GZIP_BYTES);
-
-        if (!TextUtils.isEmpty(sMinGzipBytes)) {
-            try {
-                return Long.parseLong(sMinGzipBytes);
-            } catch (NumberFormatException nfe) {
-                Log.w(TAG, "Unable to parse " +
-                        Settings.Gservices.SYNC_MIN_GZIP_BYTES + " " +
-                        sMinGzipBytes, nfe);
-            }
-        }
-        return DEFAULT_SYNC_MIN_GZIP_BYTES;
+        return Settings.Secure.getLong(resolver,
+                                       Settings.Secure.SYNC_MIN_GZIP_BYTES,
+                                       DEFAULT_SYNC_MIN_GZIP_BYTES);
     }
 
     /* cURL logging support. */