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

Commit 832cfea9 authored by Gabriel Biren's avatar Gabriel Biren
Browse files

Create callback to call on auxiliary supplicant events, namely

EAP_METHOD_SELECTED, SSID_TEMP_DISABLED, and OPEN_SSL_FAILURE.

Bug: 165342942
Test: m
Change-Id: I28ccd513bba937041ae8be1c5eff1fa6cb491c97
parent dceca455
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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 AuxiliarySupplicantEventCode {
  EAP_METHOD_SELECTED = 0,
  SSID_TEMP_DISABLED = 1,
  OPEN_SSL_FAILURE = 2,
}
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ interface ISupplicantStaIfaceCallback {
  oneway void onAnqpQueryDone(in byte[] bssid, in android.hardware.wifi.supplicant.AnqpData data, in android.hardware.wifi.supplicant.Hs20AnqpData hs20Data);
  oneway void onAssociationRejected(in android.hardware.wifi.supplicant.AssociationRejectionData assocRejectData);
  oneway void onAuthenticationTimeout(in byte[] bssid);
  oneway void onAuxiliarySupplicantEvent(in android.hardware.wifi.supplicant.AuxiliarySupplicantEventCode eventCode, in byte[] bssid, in String reasonString);
  oneway void onBssTmHandlingDone(in android.hardware.wifi.supplicant.BssTmData tmData);
  oneway void onBssidChanged(in android.hardware.wifi.supplicant.BssidChangeReason reason, in byte[] bssid);
  oneway void onDisconnected(in byte[] bssid, in boolean locallyGenerated, in android.hardware.wifi.supplicant.StaIfaceReasonCode reasonCode);
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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.
 */

package android.hardware.wifi.supplicant;

/**
 * Event codes for auxiliary events that can be generated by
 * the supplicant. This includes events that are not major
 * state changes (e.g. Connected, Disconnected), but that the
 * client may still want to be alerted about.
 */
@VintfStability
@Backing(type="int")
enum AuxiliarySupplicantEventCode {
    EAP_METHOD_SELECTED,
    SSID_TEMP_DISABLED,
    OPEN_SSL_FAILURE
}
+11 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.hardware.wifi.supplicant;

import android.hardware.wifi.supplicant.AnqpData;
import android.hardware.wifi.supplicant.AssociationRejectionData;
import android.hardware.wifi.supplicant.AuxiliarySupplicantEventCode;
import android.hardware.wifi.supplicant.BssTmData;
import android.hardware.wifi.supplicant.BssidChangeReason;
import android.hardware.wifi.supplicant.DppAkm;
@@ -70,6 +71,16 @@ oneway interface ISupplicantStaIfaceCallback {
     */
    void onAuthenticationTimeout(in byte[] bssid);

    /**
     * Indicates that an auxiliary event was generated by the supplicant.
     *
     * @param eventCode |AuxiliarySupplicantEventCode| for the event that occurred.
     * @param bssid BSSID of the AP which caused the event.
     * @param reasonString Additional information about why the event occurred.
     */
    void onAuxiliarySupplicantEvent(
            in AuxiliarySupplicantEventCode eventCode, in byte[] bssid, in String reasonString);

    /**
     * Indicates BTM request frame handling status.
     *
+7 −0
Original line number Diff line number Diff line
@@ -79,6 +79,13 @@ class SupplicantStaIfaceCallback : public BnSupplicantStaIfaceCallback {
        const std::vector<uint8_t>& /* bssid */) override {
        return ndk::ScopedAStatus::ok();
    }
    ::ndk::ScopedAStatus onAuxiliarySupplicantEvent(
            ::aidl::android::hardware::wifi::supplicant ::
                    AuxiliarySupplicantEventCode /* eventCode */,
            const std::vector<uint8_t>& /* bssid */,
            const std::string& /* reasonString */) override {
        return ndk::ScopedAStatus::ok();
    }
    ::ndk::ScopedAStatus onBssTmHandlingDone(
        const ::aidl::android::hardware::wifi::supplicant::
            BssTmData& /* tmData */) override {