summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/ProviderAPIResultReceiver.java
diff options
context:
space:
mode:
authorparmegv <parmegv@sdf.org>2013-02-12 19:33:19 +0100
committerparmegv <parmegv@sdf.org>2013-02-12 19:33:19 +0100
commitc01aa98a1d43ae0d6b56f0d13a8782dbb6a3e35e (patch)
treee09fc92c435813ce09eda7993c7bdddeb4ea8f2a /src/se/leap/leapclient/ProviderAPIResultReceiver.java
parent162afa5bfa6485f3aacb3f60e9c92fa0c3bfa7a7 (diff)
New custom provider dialog effectively adds the new provider to the
ProviderListFragment, and then the user can choose it.
Diffstat (limited to 'src/se/leap/leapclient/ProviderAPIResultReceiver.java')
-rw-r--r--src/se/leap/leapclient/ProviderAPIResultReceiver.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/se/leap/leapclient/ProviderAPIResultReceiver.java b/src/se/leap/leapclient/ProviderAPIResultReceiver.java
new file mode 100644
index 00000000..a6a8d9d8
--- /dev/null
+++ b/src/se/leap/leapclient/ProviderAPIResultReceiver.java
@@ -0,0 +1,30 @@
+package se.leap.leapclient;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.ResultReceiver;
+
+public class ProviderAPIResultReceiver extends ResultReceiver {
+ private Receiver mReceiver;
+
+ public ProviderAPIResultReceiver(Handler handler) {
+ super(handler);
+ // TODO Auto-generated constructor stub
+ }
+
+ public void setReceiver(Receiver receiver) {
+ mReceiver = receiver;
+ }
+
+ public interface Receiver {
+ public void onReceiveResult(int resultCode, Bundle resultData);
+ }
+
+ @Override
+ protected void onReceiveResult(int resultCode, Bundle resultData) {
+ if (mReceiver != null) {
+ mReceiver.onReceiveResult(resultCode, resultData);
+ }
+ }
+
+}