Loading wifi/java/android/net/wifi/aware/PublishConfig.java +8 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public final class PublishConfig implements Parcelable { * * @hide */ public void assertValid(Characteristics characteristics) public void assertValid(Characteristics characteristics, boolean rttSupported) throws IllegalArgumentException { WifiAwareUtils.validateServiceName(mServiceName); Loading Loading @@ -216,6 +216,10 @@ public final class PublishConfig implements Parcelable { "Match filter longer than supported by device characteristics"); } } if (!rttSupported && mEnableRanging) { throw new IllegalArgumentException("Ranging is not supported"); } } /** Loading Loading @@ -364,6 +368,9 @@ public final class PublishConfig implements Parcelable { * Optional. Disabled by default - i.e. any peer which attempts to measure distance to this * device will be refused. If the peer has ranging enabled (using the * {@link SubscribeConfig} APIs listed above, it will never discover this device. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param enable If true, ranging is supported on request of the peer. * Loading wifi/java/android/net/wifi/aware/SubscribeConfig.java +11 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ public final class SubscribeConfig implements Parcelable { * * @hide */ public void assertValid(Characteristics characteristics) public void assertValid(Characteristics characteristics, boolean rttSupported) throws IllegalArgumentException { WifiAwareUtils.validateServiceName(mServiceName); Loading Loading @@ -269,6 +269,10 @@ public final class SubscribeConfig implements Parcelable { throw new IllegalArgumentException( "Maximum distance must be greater than minimum distance"); } if (!rttSupported && (mMinDistanceMmSet || mMaxDistanceMmSet)) { throw new IllegalArgumentException("Ranging is not supported"); } } /** Loading Loading @@ -422,6 +426,9 @@ public final class SubscribeConfig implements Parcelable { * peer must enable ranging using * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will * never be triggered. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param minDistanceMm Minimum distance, in mm, to the publisher above which to trigger * discovery. Loading Loading @@ -450,6 +457,9 @@ public final class SubscribeConfig implements Parcelable { * peer must enable ranging using * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will * never be triggered. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param maxDistanceMm Maximum distance, in mm, to the publisher below which to trigger * discovery. Loading Loading
wifi/java/android/net/wifi/aware/PublishConfig.java +8 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public final class PublishConfig implements Parcelable { * * @hide */ public void assertValid(Characteristics characteristics) public void assertValid(Characteristics characteristics, boolean rttSupported) throws IllegalArgumentException { WifiAwareUtils.validateServiceName(mServiceName); Loading Loading @@ -216,6 +216,10 @@ public final class PublishConfig implements Parcelable { "Match filter longer than supported by device characteristics"); } } if (!rttSupported && mEnableRanging) { throw new IllegalArgumentException("Ranging is not supported"); } } /** Loading Loading @@ -364,6 +368,9 @@ public final class PublishConfig implements Parcelable { * Optional. Disabled by default - i.e. any peer which attempts to measure distance to this * device will be refused. If the peer has ranging enabled (using the * {@link SubscribeConfig} APIs listed above, it will never discover this device. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param enable If true, ranging is supported on request of the peer. * Loading
wifi/java/android/net/wifi/aware/SubscribeConfig.java +11 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ public final class SubscribeConfig implements Parcelable { * * @hide */ public void assertValid(Characteristics characteristics) public void assertValid(Characteristics characteristics, boolean rttSupported) throws IllegalArgumentException { WifiAwareUtils.validateServiceName(mServiceName); Loading Loading @@ -269,6 +269,10 @@ public final class SubscribeConfig implements Parcelable { throw new IllegalArgumentException( "Maximum distance must be greater than minimum distance"); } if (!rttSupported && (mMinDistanceMmSet || mMaxDistanceMmSet)) { throw new IllegalArgumentException("Ranging is not supported"); } } /** Loading Loading @@ -422,6 +426,9 @@ public final class SubscribeConfig implements Parcelable { * peer must enable ranging using * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will * never be triggered. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param minDistanceMm Minimum distance, in mm, to the publisher above which to trigger * discovery. Loading Loading @@ -450,6 +457,9 @@ public final class SubscribeConfig implements Parcelable { * peer must enable ranging using * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will * never be triggered. * <p> * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked * as described in {@link android.net.wifi.rtt}. * * @param maxDistanceMm Maximum distance, in mm, to the publisher below which to trigger * discovery. Loading