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

Commit 4ef4f6cc authored by Nazanin Bakhshi's avatar Nazanin Bakhshi Committed by android-build-merger
Browse files

Add HAL API for enabling DSDS setModemsConfig and getModemsConfig APIs will...

Add HAL API for enabling DSDS setModemsConfig and getModemsConfig APIs will allow the framework to set the number of live modems to switch to single/multi sim state am: dd7937b7
am: ee43c27f

Change-Id: I5f9d253a1c21e9e5b02b3bad8e106f287539c43d
parents 2c4bfe5a ee43c27f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7,10 +7,10 @@ hidl_interface {
        enabled: true,
    },
    srcs: [
        "types.hal",
        "IRadioConfig.hal",
        "IRadioConfigIndication.hal",
        "IRadioConfigResponse.hal",
        "types.hal",
    ],
    interfaces: [
        "android.hardware.radio.config@1.0",
@@ -19,6 +19,7 @@ hidl_interface {
    ],
    types: [
        "ModemInfo",
        "ModemsConfig",
        "PhoneCapability",
    ],
    gen_java: true,
+33 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.radio.config@1.1;
import @1.0::IRadioConfig;
import @1.1::IRadioConfigResponse;
import @1.1::PhoneCapability;
import @1.1::ModemsConfig;

/**
 * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
@@ -56,4 +57,36 @@ interface IRadioConfig extends @1.0::IRadioConfig {
     * Response callback is IRadioConfigResponse.setPreferredDataModemResponse()
     */
    oneway setPreferredDataModem(int32_t serial, uint8_t modemId);

   /**
     * Set modems configurations by specifying the number of live modems (i.e modems that are
     * enabled and actively working as part of a working telephony stack).
     *
     * Example: this interface can be used to switch to single/multi sim mode by specifying
     * the number of live modems as 1, 2, etc
     *
     * Note: by setting the number of live modems in this API, that number of modems will
     * subsequently get enabled/disabled
     *
     * @param serial serial number of request.
     * @param modemsConfig ModemsConfig object including the number of live modems
     *
     * Response callback is IRadioResponse.setModemsConfigResponse()
     */
    oneway setModemsConfig(int32_t serial, ModemsConfig modemsConfig);

   /**
     * Get modems configurations. This interface is used to get modem configurations
     * which includes the number of live modems (i.e modems that are
     * enabled and actively working as part of a working telephony stack)
     *
     * Note: in order to get the overall number of modems available on the phone,
     * refer to getPhoneCapability API
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getModemsConfigResponse() which
     * will return <@1.1::ModemsConfig>.
     */
    oneway getModemsConfig(int32_t serial);
};
+24 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.radio.config@1.1;
import @1.0::IRadioConfigResponse;
import @1.1::PhoneCapability;
import android.hardware.radio@1.0::RadioResponseInfo;
import @1.1::ModemsConfig;

/**
 * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
@@ -50,4 +51,27 @@ interface IRadioConfigResponse extends @1.0::IRadioConfigResponse {
     *   RadioError:INVALID_ARGUMENTS
     */
    oneway setPreferredDataModemResponse(RadioResponseInfo info);

    /**
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:INVALID_ARGUMENTS
     */
    oneway setModemsConfigResponse(RadioResponseInfo info);

    /**
     * @param info Response info struct containing response type, serial no. and error
     * @param modemsConfig <@1.1::ModemsConfig> it defines all the modems' configurations
     *        at this time, only the number of live modems
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
    oneway getModemsConfigResponse(RadioResponseInfo info, ModemsConfig modemsConfig);
};
+8 −0
Original line number Diff line number Diff line
@@ -61,3 +61,11 @@ struct PhoneCapability {
     */
    vec<ModemInfo> logicalModemList;
};

struct ModemsConfig {
    /**
     * variable to indicate the number of live modems i.e modems that are enabled
     * and actively working as part of a working connectivity stack
     */
    uint8_t numOfLiveModems;
};
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2018 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.
//

cc_test {
    name: "VtsHalRadioConfigV1_1TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "radio_config_hidl_hal_api.cpp",
        "radio_config_hidl_hal_test.cpp",
        "radio_config_response.cpp",
        "VtsHalRadioConfigV1_1TargetTest.cpp",
    ],
    static_libs: [
        "RadioVtsTestUtilBase",
        "android.hardware.radio.config@1.0",
        "android.hardware.radio.config@1.1",
    ],
    header_libs: ["radio.util.header@1.0"],
    test_suites: ["general-tests"],
}
Loading