From 812d7e8cdc2813253fb3ed6853855eb7ed02789d Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Tue, 31 Jan 2012 17:43:10 +0400 Subject: [PATCH] add PhoneLog class --- src/org/average/whereami/PhoneLog.java | 24 ++++++++++++++++++++++++ src/org/average/whereami/WhereAmI.java | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/org/average/whereami/PhoneLog.java diff --git a/src/org/average/whereami/PhoneLog.java b/src/org/average/whereami/PhoneLog.java new file mode 100644 index 0000000..bda3596 --- /dev/null +++ b/src/org/average/whereami/PhoneLog.java @@ -0,0 +1,24 @@ +package org.average.whereami; + +import com.google.api.client.extensions.android2.AndroidHttp; +import com.google.api.client.googleapis.GoogleHeaders; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.DateTime; + +//import com.google.api.services.calendar.CalendarClient; +//import com.google.api.services.calendar.CalendarRequestInitializer; +//import com.google.api.services.calendar.CalendarUrl; +//import com.google.api.services.calendar.model.CalendarEntry; +//import com.google.api.services.calendar.model.CalendarFeed; +//import com.google.common.collect.Lists; + +import android.util.Log; + +public final class PhoneLog { + public static final String getResult() { + return "Response from PhoneLog.getResult"; + } +} diff --git a/src/org/average/whereami/WhereAmI.java b/src/org/average/whereami/WhereAmI.java index 2c197cf..6f2550f 100644 --- a/src/org/average/whereami/WhereAmI.java +++ b/src/org/average/whereami/WhereAmI.java @@ -1,6 +1,7 @@ package org.average.whereami; import org.average.whereami.WhereAmIprefs; +import org.average.whereami.PhoneLog; import android.app.Activity; import android.net.wifi.WifiManager; @@ -45,8 +46,9 @@ public class WhereAmI extends Activity protected String doInBackground(Void... params) { Log.w("WhereAmI", "BgUpdate " + updater + " starting"); SystemClock.sleep(5000); // real job do be done here + String result = PhoneLog.getResult(); Log.w("WhereAmI", "BgUpdate about to return"); - return "5 seconds passed in " + updater; + return result; } @Override -- 2.43.0