diff options
author | parmegv <parmegv@sdf.org> | 2013-02-12 19:33:19 +0100 |
---|---|---|
committer | parmegv <parmegv@sdf.org> | 2013-02-12 19:33:19 +0100 |
commit | c01aa98a1d43ae0d6b56f0d13a8782dbb6a3e35e (patch) | |
tree | e09fc92c435813ce09eda7993c7bdddeb4ea8f2a /src/se/leap/leapclient/ProviderAPIResultReceiver.java | |
parent | 162afa5bfa6485f3aacb3f60e9c92fa0c3bfa7a7 (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.java | 30 |
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);
+ }
+ }
+
+}
|