Monday, July 15, 2013

Re: [android-developers] about WifiDisplayController's connect function

Really?

Doesn't the debug output pretty much sum it up? The code ensure that
the wifi being connected to isn't the same as the one currently
connected to...

On Mon, Jul 15, 2013 at 10:53 AM, Baodong Chen <chenbdchenbd@gmail.com> wrote:
> dear all:
> i'm seeing wifi display source code and wondering
> why using !mDesiredDevice.deviceAddress.equals(device.deviceAddress) and
> !mConnectedDevice.deviceAddress.equals(device.deviceAddress) to test?
> meaning not equal??
> plz help!
> -------------------------------------------------------------------------------------------------------------
> private void connect(final WifiP2pDevice device) {
> if (mDesiredDevice != null
> &&
> !mDesiredDevice.deviceAddress.equals(device.deviceAddress)) {
> if (DEBUG) {
> Slog.d(TAG, "connect: nothing to do, already connecting to "
> + describeWifiP2pDevice(device));
> }
> return;
> }
>
> if (mConnectedDevice != null
> &&
> !mConnectedDevice.deviceAddress.equals(device.deviceAddress)
> && mDesiredDevice == null) {
> if (DEBUG) {
> Slog.d(TAG, "connect: nothing to do, already connected to "
> + describeWifiP2pDevice(device) + " and not part way
> through "
> + "connecting to a different device.");
> }
> return;
> }
>
> ...
> }
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Michael Banzon
http://michaelbanzon.com/

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment