]> www.average.org Git - WhereAmI.git/blobdiff - src/org/average/whereami/WhereAmI.java
fix presentation
[WhereAmI.git] / src / org / average / whereami / WhereAmI.java
index 8a7da5929db3c068038ef629235edb7577882023..5fdbbedbab4edded45ade82b0620fb4bbc4a8d4a 100644 (file)
@@ -7,6 +7,7 @@ import org.average.whereami.LastLocation;
 
 import android.app.Activity;
 import android.net.wifi.WifiManager;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.AsyncTask;
 import android.os.Handler;
@@ -199,6 +200,14 @@ public class WhereAmI extends Activity
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.FROYO) {
+            Log.v(TAG, "Disabling keepalive for build version " +
+                       Build.VERSION.SDK_INT);
+            System.setProperty("http.keepAlive", "false");
+        } else {
+            Log.v(TAG, "Post-Froyo version " +
+                        Build.VERSION.SDK_INT);
+       }
         prefs = PreferenceManager.getDefaultSharedPreferences(this);
         store = new PersistentStore(prefs);
         wifiman = (WifiManager)getSystemService(Context.WIFI_SERVICE);
@@ -212,9 +221,9 @@ public class WhereAmI extends Activity
         tvd = (TextView)findViewById(R.id.date);
         tvs = (TextView)findViewById(R.id.timestamp);
        ut = new UpdateTarget[] {
-            new UpdateTarget((TextView)findViewById(R.id.location),
-                             new PhoneLog(res, store)),
             new UpdateTarget((TextView)findViewById(R.id.phonecall),
+                             new PhoneLog(res, store)),
+            new UpdateTarget((TextView)findViewById(R.id.location),
                              new LastLocation(res, store))
         };
         Log.v(TAG, "created UI, about to start update task");