]> average.org Git - WhereAmI.git/commitdiff
clean worker interface
authorEugene Crosser <Eugene.Crosser@ru.ibm.com>
Tue, 31 Jan 2012 14:49:21 +0000 (18:49 +0400)
committerEugene Crosser <Eugene.Crosser@ru.ibm.com>
Tue, 31 Jan 2012 14:49:21 +0000 (18:49 +0400)
src/org/average/whereami/Location.java
src/org/average/whereami/PhoneLog.java
src/org/average/whereami/WhereAmI.java

index fcbc59fd38bba106bd535a0a3d9176f1f0ed7746..9f588b3fa10b62cafcbcdd2f8bceeda769aa1d4a 100644 (file)
@@ -9,12 +9,12 @@ import com.google.api.client.http.HttpTransport;
 import com.google.api.client.util.DateTime;
 
 import android.util.Log;
+import android.os.SystemClock;
 
 public final class Location extends Oracle {
        @Override
        public final String getResult() {
+               SystemClock.sleep(6000);
                return "Response from Location.getResult";
        }
-
-       //public PhoneLog() {}
 }
index 66517a48ce4b600a389bee195d2f5f7b6742082d..0d99cbbec77a988008eda8741544bd09cd056e7a 100644 (file)
@@ -16,12 +16,12 @@ import com.google.api.client.util.DateTime;
 //import com.google.common.collect.Lists;
 
 import android.util.Log;
+import android.os.SystemClock;
 
 public final class PhoneLog extends Oracle {
        @Override
        public final String getResult() {
+               SystemClock.sleep(5000);
                return "Response from PhoneLog.getResult";
        }
-
-       //public PhoneLog() {}
 }
index 2539e0e38113a48a053e429a7e0e2cb0d07fe6c2..953fcc92bb42c1ee07a0263d930eb2d290452662 100644 (file)
@@ -10,7 +10,6 @@ import android.net.wifi.WifiManager;
 import android.os.Bundle;
 import android.os.AsyncTask;
 import android.os.Handler;
-import android.os.SystemClock;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.content.BroadcastReceiver;
@@ -47,10 +46,7 @@ public class WhereAmI extends Activity
             @Override
             protected String doInBackground(Void... params) {
                 Log.w("WhereAmI", "BgUpdate " + updater + " starting");
-                SystemClock.sleep(5000); // real job do be done here
-                String result = updater.getResult();
-                Log.w("WhereAmI", "BgUpdate about to return");
-                return result;
+                return updater.getResult();
             }
         
             @Override