diff options
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);
+ }
+ }
+
+}
|