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

Commit d22db0a7 authored by Roshan Pius's avatar Roshan Pius Committed by Android (Google) Code Review
Browse files

Merge "uwb(hal): Add a capabilities mechanism for vendor commands"

parents 4f9fe84d 1e1c8428
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,9 +53,6 @@ aidl_interface {
            ],
        },
        ndk: {
            vndk: {
                enabled: true,
            },
            apex_available: [
                "//apex_available:platform",
                "com.android.uwb",
+38 −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.uwb.fira_android;
@Backing(type="long") @VintfStability
enum UwbAndroidCapabilities {
  POWER_STATS_QUERY = 1,
}
+2 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ interface IUwbChip {
  void open(in android.hardware.uwb.IUwbClientCallback clientCallback);
  void close();
  void coreInit();
  int getSupportedVendorUciVersion();
  int getSupportedAndroidUciVersion();
  long getSupportedAndroidCapabilities();
  int sendUciMessage(in byte[] data);
}
+18 −8
Original line number Diff line number Diff line
@@ -52,11 +52,21 @@ interface IUwbChip {
    /**
     * Supported version of vendor UCI specification.
     *
      * This corresponds to the version of the "android.hardware.uwb.fira_android" types-only
     * @return Returns the version of the "android.hardware.uwb.fira_android" types-only
     * package included in the HAL implementation. This vendor params/commands package will be
     * updated on a different cadence to the main UWB HAL interface package.
     */
    int getSupportedVendorUciVersion();
    int getSupportedAndroidUciVersion();

    /**
     * Mechanism to allow HAL implementation to optionally expose features that are defined
     * in the "android.hardware.uwb.fira_android" types-only package.
     *
     * @return Returns the bitmask of capabilities
     * (android.hardware.uwb.fira_android.UwbAndroidCapabilities) that is supported by the
     * HAL implementation.
     */
    long getSupportedAndroidCapabilities();

    /**
     * Write the UCI message to the UWB Subsystem.
+31 −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.
 */

package android.hardware.uwb.fira_android;

/**
 * Android specific capabilities should be defined here.
 *
 * For any features enabled via the FIRA vendor commands for Android, use this bitmask
 * to allow devices to expose the features supported by the HAL implementation.
 *
 */
@VintfStability
@Backing(type="long")
enum UwbAndroidCapabilities {
    /** TODO: Change the name if necessary when the corresponding vendor commands are added */
    POWER_STATS_QUERY = 0x1,
}
Loading