Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7bd5101 authored by Etan Cohen's avatar Etan Cohen
Browse files

[AWARE] Add is out-of-band utility function

Add a utility function which indicates whether the network
specifier is an out-of-band network specifier.

Bug: 38171946
Test: unit tests + current integration (sl4a) pass
Change-Id: I68581b2c447d8547a1b35020c17188e220cca76b
parent 294fae55
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -161,6 +161,16 @@ public final class WifiAwareNetworkSpecifier extends NetworkSpecifier implements
                }
            };

    /**
     * Indicates whether the network specifier specifies an OOB (out-of-band) data-path - i.e. a
     * data-path created without a corresponding Aware discovery session.
     *
     * @hide
     */
    public boolean isOutOfBand() {
        return type == NETWORK_SPECIFIER_TYPE_OOB || type == NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER;
    }

    @Override
    public int describeContents() {
        return 0;