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

Commit f511a7e4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[RTT2] Direct Aware Responder configuration"

parents 2a5c9c23 2109f705
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ import java.util.Objects;
 * @hide (@SystemApi)
 */
public class ResponderConfig implements Parcelable {
    private static final int AWARE_BAND_2_DISCOVERY_CHANNEL = 2437;

    /** @hide */
    @IntDef({RESPONDER_AP, RESPONDER_STA, RESPONDER_P2P_GO, RESPONDER_P2P_CLIENT, RESPONDER_AWARE})
    @Retention(RetentionPolicy.SOURCE)
@@ -271,9 +273,13 @@ public class ResponderConfig implements Parcelable {
     * Responder. The Responder parameters are set to defaults.
     */
    public static ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(byte[] macAddress) {
        // TODO b/67678464: determine "right" parameters or
        return new ResponderConfig(macAddress, RESPONDER_AWARE, true, CHANNEL_WIDTH_80MHZ,
                5200, 5210, 0, PREAMBLE_VHT);
        /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
         * is expected to be brought up and available to negotiate a maximum accuracy channel
         * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
         * Unsolicited Publisher with Ranging enabled.
         */
        return new ResponderConfig(macAddress, RESPONDER_AWARE, true, CHANNEL_WIDTH_20MHZ,
                AWARE_BAND_2_DISCOVERY_CHANNEL, 0, 0, PREAMBLE_HT);
    }

    /**
@@ -281,9 +287,13 @@ public class ResponderConfig implements Parcelable {
     * Responder. The Responder parameters are set to defaults.
     */
    public static ResponderConfig fromWifiAwarePeerHandleWithDefaults(PeerHandle peerHandle) {
        // TODO b/67678464: determine "right" parameters or
        return new ResponderConfig(peerHandle, RESPONDER_AWARE, true, CHANNEL_WIDTH_80MHZ,
                5200, 5210, 0, PREAMBLE_VHT);
        /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
         * is expected to be brought up and available to negotiate a maximum accuracy channel
         * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
         * Unsolicited Publisher with Ranging enabled.
         */
        return new ResponderConfig(peerHandle, RESPONDER_AWARE, true, CHANNEL_WIDTH_20MHZ,
                AWARE_BAND_2_DISCOVERY_CHANNEL, 0, 0, PREAMBLE_HT);
    }

    /**