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

Commit 6398207a authored by Hai Shalom's avatar Hai Shalom
Browse files

[DPP] Replace HAL interface onSuccess with onSuccessConfigSent

Following ANAPIC Review:
onSuccess callback was returning only a single status code, CONFIGURATION_SENT.
Renamed the callback to onSuccessConfigSent and eliminated the status code.

Bug: 124459312
Test: atest DppManagerTest
Test: atest SupplicantStaIfaceHalTest
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_2Host
Change-Id: I4d7c5732ded55902b1f235d40d3babe3be372bf7
parent 9e3f8989
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -550,6 +550,6 @@ f3dbd8dd0d6333c005610288a4785d0ef79a72a7bbe6d0a46d46fa89fc886f1e android.hardwar
067b22efc50529a88d650fe7400603429d1164a47ee96a17476fdb0aadd6b4d3 android.hardware.wifi.supplicant@1.2::ISupplicant
120211371fdd29fb134837071d432a302d7b60e9b95af611dd8dde86bd1f77ee android.hardware.wifi.supplicant@1.2::ISupplicantP2pIface
7efe2b057e9f9387b3500e67af97942aa7c8008e6ee7d8dcaae4107fda84016b android.hardware.wifi.supplicant@1.2::ISupplicantStaIface
eb569df2e80f8e276a91a510c75e83fbf957ff1988691726418d44c2be01c520 android.hardware.wifi.supplicant@1.2::ISupplicantStaIfaceCallback
09e08b5d12b109562ecdd8882532fd1f2c4639588e07769d5c7396b7c5b9f34f android.hardware.wifi.supplicant@1.2::ISupplicantStaIfaceCallback
efbb061c969fa9553d243da6ee23b83fe5d4aa663a7b8896adc52e2b015bc2f3 android.hardware.wifi.supplicant@1.2::ISupplicantStaNetwork
4851210036650ce6c86498c012db5ff618afce8508a2b06a0e9b902d1840f4bd android.hardware.wifi.supplicant@1.2::types
cfa81f229b69f9011c58f48264fcb552447430fe68610eac514e811e65bc306a android.hardware.wifi.supplicant@1.2::types
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ hidl_interface {
        "DppFailureCode",
        "DppNetRole",
        "DppProgressCode",
        "DppSuccessCode",
    ],
    gen_java: true,
}
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ interface ISupplicantStaIfaceCallback extends @1.1::ISupplicantStaIfaceCallback
    /**
     * Indicates DPP configuration sent success event (Configurator mode).
     */
    oneway onDppSuccess(DppSuccessCode code);
    oneway onDppSuccessConfigSent();

    /**
     * Indicates a DPP progress event.
+0 −7
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ enum DppNetRole: uint32_t {
    AP,
};

/**
 * DppSuccessCode: Success codes for DPP (Easy Connect)
 */
enum DppSuccessCode : uint32_t {
    CONFIGURATION_SENT,
};

/**
 * DppProgressCode: Progress codes for DPP (Easy Connect)
 */
+6 −9
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ using ::android::hardware::wifi::supplicant::V1_2::DppAkm;
using ::android::hardware::wifi::supplicant::V1_2::DppFailureCode;
using ::android::hardware::wifi::supplicant::V1_2::DppNetRole;
using ::android::hardware::wifi::supplicant::V1_2::DppProgressCode;
using ::android::hardware::wifi::supplicant::V1_2::DppSuccessCode;
using ::android::hardware::wifi::supplicant::V1_2::ISupplicantStaIface;
using ::android::hardware::wifi::supplicant::V1_2::ISupplicantStaIfaceCallback;
using ::android::hardware::wifi::supplicant::V1_2::ISupplicantStaNetwork;
@@ -64,7 +63,7 @@ class SupplicantStaIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
        ANY_CALLBACK = -2,
        INVALID = -1,

        EVENT_SUCCESS = 0,
        EVENT_SUCCESS_CONFIG_SENT = 0,
        EVENT_SUCCESS_CONFIG_RECEIVED,
        EVENT_PROGRESS,
        EVENT_FAILURE,
@@ -202,9 +201,7 @@ class IfaceCallback : public ISupplicantStaIfaceCallback {
        DppAkm /* securityAkm */) override {
        return Void();
    }
    Return<void> onDppSuccess(DppSuccessCode /* code */) override {
        return Void();
    }
    Return<void> onDppSuccessConfigSent() override { return Void(); }
    Return<void> onDppProgress(DppProgressCode /* code */) override {
        return Void();
    }
@@ -226,10 +223,10 @@ class IfaceDppCallback : public IfaceCallback {
        parent_.notify();
        return Void();
    }
    Return<void> onDppSuccess(DppSuccessCode code) override {
        parent_.code = (uint32_t)code;
        parent_.dppCallbackType =
            SupplicantStaIfaceHidlTest::DppCallbackType::EVENT_SUCCESS;
    Return<void> onDppSuccessConfigSent() override {
        parent_.code = 0;
        parent_.dppCallbackType = SupplicantStaIfaceHidlTest::DppCallbackType::
            EVENT_SUCCESS_CONFIG_SENT;
        parent_.notify();
        return Void();
    }