From 5e9931fa039d11e2357a6fc64acd62ae66099511 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Wed, 24 Jun 2015 07:14:46 +1000 Subject: [PATCH] WIP: Make bluetooth/bonjour peers parcelable. The Bluetooth peer need only parcel up the BluetoothDevice, which itself is parcelable. The wifi peer requires the JmDNS ServiceInfo class to be parcelled. For this, I took the most full on looking constructor, and parcelled up each individual property of the service info object which is required by that constructor. Also made the scan qr button hooked up to the swap process, and fixed minor bugs with the "visible via wifi" TextView setup. --- F-Droid/res/layout/swap_blank.xml | 9 +++- .../fdroid/localrepo/peers/BluetoothPeer.java | 25 +++++++++++ .../fdroid/localrepo/peers/BonjourFinder.java | 5 ++- .../fdroid/localrepo/peers/BonjourPeer.java | 44 ++++++++++++++++++- .../fdroid/fdroid/localrepo/peers/Peer.java | 5 +-- .../fdroid/views/swap/StartSwapView.java | 25 +++++++++-- .../views/swap/SwapWorkflowActivity.java | 5 +++ 7 files changed, 107 insertions(+), 11 deletions(-) diff --git a/F-Droid/res/layout/swap_blank.xml b/F-Droid/res/layout/swap_blank.xml index 788c51f05..75c7c1f55 100644 --- a/F-Droid/res/layout/swap_blank.xml +++ b/F-Droid/res/layout/swap_blank.xml @@ -61,7 +61,7 @@ android:paddingStart="15dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/swap_visible_bluetooth" + tools:text="@string/swap_visible_bluetooth" android:textSize="18sp" /> @@ -100,9 +101,10 @@ android:orientation="vertical"> @@ -176,6 +179,7 @@ android:layout_height="wrap_content">