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

Commit 9cdc2a6c authored by Sarah Chin's avatar Sarah Chin
Browse files

Create IRadio AIDL

Create IRadio AIDL from HIDL versions 1.0-1.6 using the hidl2aidl tool.
This is just a skeleton implementation to allow 1.7 APIs to be added to
the AIDL interface. Changes to the API surface and modularization to
come after this change is merged.

Test: build
Bug: 198331182
Change-Id: Ice71b7c159b98de8b36124f379167fb579a4ea2f
Merged-In: Ice71b7c159b98de8b36124f379167fb579a4ea2f
parent c39d782a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -413,6 +413,16 @@
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="aidl" optional="true">
        <name>android.hardware.radio</name>
        <version>1</version>
        <interface>
            <name>IRadio</name>
            <instance>slot1</instance>
            <instance>slot2</instance>
            <instance>slot3</instance>
        </interface>
    </hal>
    <hal format="hidl" optional="true">
        <name>android.hardware.radio</name>
        <version>1.6</version>

radio/aidl/Android.bp

0 → 100644
+54 −0
Original line number Diff line number Diff line
aidl_interface {
    name: "android.hardware.radio",
    vendor_available: true,
    srcs: ["android/hardware/radio/*.aidl"],
    stability: "vintf",
    backend: {
        cpp: {
            enabled: false,
        },
        java: {
            sdk_version: "module_current",
        },
        ndk: {
            vndk: {
                enabled: true,
            },
        },
    },
}

cc_library {
    name: "android.hardware.radio-translate-ndk",
    vendor_available: true,
    srcs: ["android/hardware/radio/translate-ndk.cpp"],
    shared_libs: [
        "libbinder_ndk",
        "libhidlbase",
        "android.hardware.radio-V1-ndk_platform",
        "android.hardware.radio@1.0",
        "android.hardware.radio@1.1",
        "android.hardware.radio@1.2",
        "android.hardware.radio@1.3",
        "android.hardware.radio@1.4",
        "android.hardware.radio@1.5",
        "android.hardware.radio@1.6",
    ],
    export_include_dirs: ["include"],
}

java_library {
    name: "android.hardware.radio-translate-java",
    srcs: ["android/hardware/radio/Translate.java"],
    libs: [
        "android.hardware.radio-V1-java",
        "android.hardware.radio-V1.0-java",
        "android.hardware.radio-V1.1-java",
        "android.hardware.radio-V1.2-java",
        "android.hardware.radio-V1.3-java",
        "android.hardware.radio-V1.4-java",
        "android.hardware.radio-V1.5-java",
        "android.hardware.radio-V1.6-java",
    ],
    sdk_version: "module_current",
}
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.radio;
@Backing(type="int") @VintfStability
enum AccessNetwork {
  UNKNOWN = 0,
  GERAN = 1,
  UTRAN = 2,
  EUTRAN = 3,
  CDMA2000 = 4,
  IWLAN = 5,
  NGRAN = 6,
}
+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.radio;
@VintfStability
parcelable ActivityStatsInfo {
  int sleepModeTimeMs;
  int idleModeTimeMs;
  int[] txmModetimeMs;
  int rxModeTimeMs;
}
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.radio;
@Backing(type="int") @VintfStability
enum AddressProperty {
  NONE = 0,
  DEPRECATED = 32,
}
Loading