Handle review feedback for android.hardware.bluetooth.ranging

Bug: 318763088
Test: m android.hardware.bluetooth.ranging-update-api
Change-Id: I7f66278328d63ad1882aae87c575be7baaf45718
This commit is contained in:
Chienyuan Huang 2024-01-05 16:31:22 +00:00
parent 78b266ba5a
commit a6daccc3e5
9 changed files with 31 additions and 13 deletions

View file

@ -34,13 +34,13 @@
package android.hardware.bluetooth.ranging;
@VintfStability
parcelable ChannelSoundingSingleSideData {
@nullable List<android.hardware.bluetooth.ranging.StepTonePct> stepTonePcts;
@nullable android.hardware.bluetooth.ranging.StepTonePct[] stepTonePcts;
@nullable byte[] packetQuality;
@nullable byte[] packetRssiDbm;
@nullable android.hardware.bluetooth.ranging.Nadm[] packetNadm;
@nullable int[] measuredFreqOffset;
@nullable List<android.hardware.bluetooth.ranging.ComplexNumber> packetPct1;
@nullable List<android.hardware.bluetooth.ranging.ComplexNumber> packetPct2;
@nullable android.hardware.bluetooth.ranging.ComplexNumber[] packetPct1;
@nullable android.hardware.bluetooth.ranging.ComplexNumber[] packetPct2;
byte referencePowerDbm;
@nullable byte[] vendorSpecificCsSingleSidedata;
}

View file

@ -32,7 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
@Backing(type="int") @VintfStability
@Backing(type="byte") @VintfStability
enum ModeType {
ZERO = 0x00,
ONE = 0x01,

View file

@ -32,10 +32,10 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
@Backing(type="int") @VintfStability
@Backing(type="byte") @VintfStability
enum SubModeType {
ONE = 0x01,
TWO = 0x02,
THREE = 0x03,
UNUSED = 0xff,
UNUSED = 0xffu8,
}

View file

@ -16,9 +16,13 @@
package android.hardware.bluetooth.ranging;
/**
* Same as the BLE address type, except anonymous isn't supported for ranging.
*/
@VintfStability
@Backing(type="int")
enum AddressType {
PUBLIC = 0x00,
/* Still may be fixed on the device and is not randomized on boot */
RANDOM = 0x01,
}

View file

@ -21,6 +21,9 @@ import android.hardware.bluetooth.ranging.ModeType;
/**
* Raw ranging data of Channel Sounding.
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
*
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
*/
@VintfStability
parcelable ChannelSoudingRawData {

View file

@ -21,14 +21,17 @@ import android.hardware.bluetooth.ranging.Nadm;
import android.hardware.bluetooth.ranging.StepTonePct;
/**
* Raw ranging data of Channel Sounding from either Initator or Reflector
* Raw ranging data of Channel Sounding from either Initator or Reflector.
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
*
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
*/
@VintfStability
parcelable ChannelSoundingSingleSideData {
/**
* PCT (complex value) measured from mode-2 or mode-3 steps in a CS procedure (in time order).
*/
@nullable List<StepTonePct> stepTonePcts;
@nullable StepTonePct[] stepTonePcts;
/**
* Packet Quality from mode-1 or mode-3 steps in a CS procedures (in time order).
*/
@ -49,8 +52,8 @@ parcelable ChannelSoundingSingleSideData {
* Packet_PCT1 or packet_PCT2 of mode-1 or mode-3, if sounding sequence is used and sounding
* phase-based ranging is supported.
*/
@nullable List<ComplexNumber> packetPct1;
@nullable List<ComplexNumber> packetPct2;
@nullable ComplexNumber[] packetPct1;
@nullable ComplexNumber[] packetPct2;
/**
* Reference power level (-127 to 20) of the signal in the procedure, in dBm.
*/

View file

@ -17,7 +17,7 @@
package android.hardware.bluetooth.ranging;
@VintfStability
@Backing(type="int")
@Backing(type="byte")
enum ModeType {
ZERO = 0x00,
ONE = 0x01,

View file

@ -16,6 +16,12 @@
package android.hardware.bluetooth.ranging;
/**
* Normalized Attack Detector Metric.
* See Channel Sounding CR_PR, 3.13.24 for details.
*
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
*/
@VintfStability
@Backing(type="byte")
enum Nadm {
@ -26,5 +32,7 @@ enum Nadm {
ATTACK_IS_LIKELY = 0x04,
ATTACK_IS_VERY_LIKELY = 0x05,
ATTACK_IS_EXTREMELY_LIKELY = 0x06,
/* If a device is unable to determine a NADM value, then it shall report a NADM value of Unknown
*/
UNKNOWN = 0xFFu8,
}

View file

@ -17,10 +17,10 @@
package android.hardware.bluetooth.ranging;
@VintfStability
@Backing(type="int")
@Backing(type="byte")
enum SubModeType {
ONE = 0x01,
TWO = 0x02,
THREE = 0x03,
UNUSED = 0xff,
UNUSED = 0xffu8,
}