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

Commit 322c4cc2 authored by Sarah Chin's avatar Sarah Chin
Browse files

PhoneCapabilities changes for device capabilities

Change PhoneCapability structure to contain static capabilities for:
* the entire device
* each modem/radio
* each SIM slot

Created SimSlotCapability and SlotType to hold information about
device SIM slot capabilities (separate from SimSlotStatus).

Created ModemFeatures to express modem capabilities as a bitfield
of concurrently supportable modem features.

PhoneCapability has fields for UE categories, bands, access networks,
and modem switching linger time. It also contains a lists of logical
modem UUIDs, SIM slot capabilities, and all possible concurrently
supportable modem features.

TelephonyManager will have an API that returns
* the PhoneCapability for the device
* active set of ModemFeatures

Apps with CARRIER_PRIVILEGE can use these APIs to access all
capabilities of a device (eg. 5G capable, DSDS capable, etc.) and
use them to make decisions based on what the device can support.

Test: atest FrameworksTelephonyTests
Bug: 143238237
Bug: 143238191
Change-Id: I424ef176086d2308a4bf53b2c79407eabafb3178
parent 43363d72
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -668,10 +668,10 @@ c72cb37b3f66ef65aeb5c6438a3fbe17bbe847fdf62d1a76eafd7f3a8a526105 android.hardwar
996f98ffe508a2f6f1755c1511b50067f7883f7c445dea9f3e931385f020b7ab android.hardware.radio@1.5::IRadio
20d52e66fd548f89bcb98cda42749a591ce8f439a2a7148617adac0c967ad937 android.hardware.radio@1.5::IRadioIndication
1512f6e1198e1aa0ebcbdb1694d0ed500a3e7791d6f305327866112331d82b66 android.hardware.radio@1.5::IRadioResponse
55f0a15642869ec98a55ea0a5ac049d3e1a6245ff7750deb6bcb7182057eee83 android.hardware.radio.config@1.3::types
b27ab0cd40b0b078cdcd024bfe1061c4c4c065f3519eeb9347fa359a3268a5ae android.hardware.radio.config@1.3::IRadioConfig
5971a891d7d8843e9fb9f44583a9a0a265ec42fd5e4e1c95c9803454d21fabf7 android.hardware.radio.config@1.3::types
a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardware.radio.config@1.3::IRadioConfig
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
7683fed9d253956071f18b152e6be657719536f98d9b534433d5e411bcde5061 android.hardware.radio.config@1.3::IRadioConfigResponse
0006ab8e8b0910cbd3bbb08d5f17d5fac7d65a2bdad5f2334e4851db9d1e6fa8 android.hardware.radio.config@1.3::IRadioConfigResponse
##
# END Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
##
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ cc_test {
        "android.hardware.radio@1.0",
        "android.hardware.radio.config@1.0",
        "android.hardware.radio.config@1.1",
        "android.hardware.radio.config@1.3",
    ],
    header_libs: ["radio.util.header@1.0"],
    test_suites: ["general-tests"]
+2 −2
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ void RadioHidlTest_v1_5::SetUp() {
    EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
    EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);

    sp<::android::hardware::radio::config::V1_1::IRadioConfig> radioConfig =
    sp<::android::hardware::radio::config::V1_3::IRadioConfig> radioConfig =
            ::testing::VtsHalHidlTargetTestBase::getService<
                    ::android::hardware::radio::config::V1_1::IRadioConfig>();
                    ::android::hardware::radio::config::V1_3::IRadioConfig>();

    /* Enforce Vts tesing with RadioConfig is existed. */
    ASSERT_NE(nullptr, radioConfig.get());
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#include <condition_variable>
#include <mutex>

#include <android/hardware/radio/config/1.1/IRadioConfig.h>
#include <android/hardware/radio/config/1.3/IRadioConfig.h>

#include <android/hardware/radio/1.5/IRadio.h>
#include <android/hardware/radio/1.5/IRadioIndication.h>
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@ hidl_interface {
        "android.hardware.radio.config@1.1",
        "android.hardware.radio.config@1.2",
        "android.hardware.radio@1.0",
        "android.hardware.radio@1.1",
        "android.hardware.radio@1.4",
        "android.hardware.radio@1.5",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
Loading