summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/LeapHttpClient.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-04-03 19:34:40 +0200
committerParménides GV <parmegv@sdf.org>2013-04-03 19:34:40 +0200
commit3e9a68fcc6c16be69abfa27d5fd3a2cbfc620bb0 (patch)
treeeee38b81b77877de0524112b0636eb8ec3d50850 /src/se/leap/leapclient/LeapHttpClient.java
parent7af9519591ea481718b4f903b97463250cc5f116 (diff)
Fixed bug #2146 => A calculation is now fine. Next step: fix M1
calculation, since right now (using tests) response() method is not doing OK. Added new SRPSession modifying response() method from JBoss SRP implementation. Added hosts-for-android-emulator. Use with the following commands to be able to test on api.lvh.me: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system adb push ~/workspace/leap_android/hosts-for-android-emulator /system/etc/hosts
Diffstat (limited to 'src/se/leap/leapclient/LeapHttpClient.java')
-rw-r--r--src/se/leap/leapclient/LeapHttpClient.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/se/leap/leapclient/LeapHttpClient.java b/src/se/leap/leapclient/LeapHttpClient.java
index 9e1a541b..fd6db745 100644
--- a/src/se/leap/leapclient/LeapHttpClient.java
+++ b/src/se/leap/leapclient/LeapHttpClient.java
@@ -15,6 +15,8 @@ import android.content.Context;
public class LeapHttpClient extends DefaultHttpClient {
final Context context;
+
+ private static LeapHttpClient client;
public LeapHttpClient(Context context) {
this.context = context;
@@ -55,4 +57,10 @@ public class LeapHttpClient extends DefaultHttpClient {
throw new AssertionError(e);
}
}
+
+ public static LeapHttpClient getInstance(Context context) {
+ if(client == null)
+ client = new LeapHttpClient(context);
+ return client;
+ }
}