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

Commit eb64c56b authored by William Escande's avatar William Escande
Browse files

AICS: add aidl definition

AudioInputType is a bluetooth generic definition.
Status/GainMode/Mute are aics specific

Bug: 372328699
Flag: com.android.bluetooth.flags.aics_api
Test: m Bluetooth
Change-Id: I3f309b15c6a830a41fde03dd5c4e9f85fd757913
parent cf23fb65
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ cc_library_shared {
        "jni_headers",
        "libbluetooth_headers",
    ],
    aidl: {
        libs: ["bluetooth_constants"],
    },
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",

common/Android.bp

0 → 100644
+14 −0
Original line number Diff line number Diff line
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

aidl_library {
    name: "bluetooth_constants",
    srcs: [
        "bluetooth/constants/AudioInputType.aidl",
        "bluetooth/constants/aics/AudioInputStatus.aidl",
        "bluetooth/constants/aics/GainMode.aidl",
        "bluetooth/constants/aics/Mute.aidl",
    ],
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
}

common/OWNERS

0 → 100644
+1 −0
Original line number Diff line number Diff line
wescande@google.com
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024 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 bluetooth.constants;

/**
 * See Bluetooth SIG Assigned Numbers 6.12.2 Audio Input Type Definitions
 * {@hide}
 */
@JavaDerive(toString = true)
@Backing(type="int")
enum AudioInputType {
    UNSPECIFIED = 0x00,
    BLUETOOTH = 0x01,
    MICROPHONE = 0x02,
    ANALOG = 0x03,
    DIGITAL = 0x04,
    RADIO = 0x05,
    STREAMING = 0x06,
    AMBIENT = 0x07,
}
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024 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 bluetooth.constants.aics;

/**
 * See Audio Input Control Service 1.0 - 3.4 Audio Input Status
 * {@hide}
 */
@JavaDerive(toString = true)
@Backing(type="byte")
enum AudioInputStatus {
    INACTIVE = 0x00,
    ACTIVE = 0x01,
    // RFU 0x02 - 0xFF
}
Loading