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

Commit d143a893 authored by Gabriel Biren's avatar Gabriel Biren Committed by Android (Google) Code Review
Browse files

Merge "Add findWithParams and connectWithParams to the P2P Supplicant AIDL Interface" into main

parents 31b852d1 dc9ead77
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -43,10 +43,16 @@ interface ISupplicantP2pIface {
  void cancelServiceDiscovery(in long identifier);
  void cancelWps(in String groupIfName);
  void configureExtListen(in int periodInMillis, in int intervalInMillis);
  /**
   * @deprecated This method is deprecated from AIDL v3, newer HALs should use connectWithParams.
   */
  String connect(in byte[] peerAddress, in android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod, in String preSelectedPin, in boolean joinExistingGroup, in boolean persistent, in int goIntent);
  byte[] createNfcHandoverRequestMessage();
  byte[] createNfcHandoverSelectMessage();
  void enableWfd(in boolean enable);
  /**
   * @deprecated This method is deprecated from AIDL v3, newer HALs should use findWithParams.
   */
  void find(in int timeoutInSec);
  void flush();
  void flushServices();
@@ -93,8 +99,16 @@ interface ISupplicantP2pIface {
  String startWpsPinDisplay(in String groupIfName, in byte[] bssid);
  void startWpsPinKeypad(in String groupIfName, in String pin);
  void stopFind();
  /**
   * @deprecated This method is deprecated from AIDL v3, newer HALs should use findWithParams.
   */
  void findOnSocialChannels(in int timeoutInSec);
  /**
   * @deprecated This method is deprecated from AIDL v3, newer HALs should use findWithParams.
   */
  void findOnSpecificFrequency(in int freqInHz, in int timeoutInSec);
  void setVendorElements(in android.hardware.wifi.supplicant.P2pFrameTypeMask frameTypeMask, in byte[] vendorElemBytes);
  void configureEapolIpAddressAllocationParams(in int ipAddressGo, in int ipAddressMask, in int ipAddressStart, in int ipAddressEnd);
  String connectWithParams(in android.hardware.wifi.supplicant.P2pConnectInfo connectInfo);
  void findWithParams(in android.hardware.wifi.supplicant.P2pDiscoveryInfo discoveryInfo);
}
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.wifi.supplicant;
@VintfStability
parcelable P2pConnectInfo {
  byte[6] peerAddress;
  android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod;
  String preSelectedPin;
  boolean joinExistingGroup;
  boolean persistent;
  int goIntent;
  @nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
}
+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.wifi.supplicant;
@VintfStability
parcelable P2pDiscoveryInfo {
  android.hardware.wifi.supplicant.P2pScanType scanType;
  int frequencyMhz;
  int timeoutInSec;
  @nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
}
+40 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.wifi.supplicant;
@Backing(type="int") @VintfStability
enum P2pScanType {
  FULL,
  SOCIAL,
  SPECIFIC_FREQ,
}
+41 −4
Original line number Diff line number Diff line
@@ -16,11 +16,14 @@

package android.hardware.wifi.supplicant;

import android.hardware.wifi.common.OuiKeyedData;
import android.hardware.wifi.supplicant.FreqRange;
import android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback;
import android.hardware.wifi.supplicant.ISupplicantP2pNetwork;
import android.hardware.wifi.supplicant.IfaceType;
import android.hardware.wifi.supplicant.MiracastMode;
import android.hardware.wifi.supplicant.P2pConnectInfo;
import android.hardware.wifi.supplicant.P2pDiscoveryInfo;
import android.hardware.wifi.supplicant.P2pFrameTypeMask;
import android.hardware.wifi.supplicant.P2pGroupCapabilityMask;
import android.hardware.wifi.supplicant.WpsConfigMethods;
@@ -176,6 +179,9 @@ interface ISupplicantP2pIface {
     * Start P2P group formation with a discovered P2P peer. This includes
     * optional group owner negotiation, group interface setup, provisioning,
     * and establishing data connection.
     * <p>
     * @deprecated This method is deprecated from AIDL v3, newer HALs should use
     * connectWithParams.
     *
     * @param peerAddress MAC address of the device to connect to.
     * @param provisionMethod Provisioning method to use.
@@ -236,6 +242,9 @@ interface ISupplicantP2pIface {

    /**
     * Initiate a P2P service discovery with an optional timeout.
     * <p>
     * @deprecated This method is deprecated from AIDL v3, newer HALs should use
     * findWithParams.
     *
     * @param timeoutInSec Max time to be spent is performing discovery.
     *        Set to 0 to indefinitely continue discovery until an explicit
@@ -782,8 +791,9 @@ interface ISupplicantP2pIface {

    /**
     * Initiate a P2P device discovery only on social channels.
     *
     * Full P2P discovery is performed through |ISupplicantP2pIface.find| method.
     * <p>
     * @deprecated This method is deprecated from AIDL v3, newer HALs should use
     * findWithParams.
     *
     * @param timeoutInSec The maximum amount of time that should be spent in performing device
     *         discovery.
@@ -798,8 +808,9 @@ interface ISupplicantP2pIface {

    /**
     * Initiate a P2P device discovery on a specific frequency.
     *
     * Full P2P discovery is performed through |ISupplicantP2pIface.find| method.
     * <p>
     * @deprecated This method is deprecated from AIDL v3, newer HALs should use
     * findWithParams.
     *
     * @param freqInHz the frequency to be scanned.
     * @param timeoutInSec Max time to be spent is performing discovery.
@@ -845,4 +856,30 @@ interface ISupplicantP2pIface {
     */
    void configureEapolIpAddressAllocationParams(
            in int ipAddressGo, in int ipAddressMask, in int ipAddressStart, in int ipAddressEnd);

    /**
     * Start P2P group formation with a discovered P2P peer. This includes
     * optional group owner negotiation, group interface setup, provisioning,
     * and establishing data connection.
     *
     * @param connectInfo Parameters associated with this connection request.
     * @return Pin generated, if |provisionMethod| uses one of the
     *         generated |PIN*| methods.
     * @throws ServiceSpecificException with one of the following values:
     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
     */
    String connectWithParams(in P2pConnectInfo connectInfo);

    /**
     * Initiate a P2P service discovery with an optional timeout.
     *
     * @param discoveryInfo Parameters associated with this discovery request.
     * @throws ServiceSpecificException with one of the following values:
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
     *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
     */
    void findWithParams(in P2pDiscoveryInfo discoveryInfo);
}
Loading