summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-15 22:43:26 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-15 22:43:26 +0000
commit4dd30a201bad6b1734efc0f3a97ec62829ddca77 (patch)
tree5897239d8b1ea98534bb5a034e82f997880622de
parent75c839f270302758004b0df2dcdd94830e09cbe6 (diff)
parent2f797666ec40c8732e558d39729dfec8808cb682 (diff)
downloaduwb-4dd30a201bad6b1734efc0f3a97ec62829ddca77.tar.gz
Snap for 10503122 from 2f797666ec40c8732e558d39729dfec8808cb682 to mainline-permission-releaseaml_per_340916010
Change-Id: Idb2e043a472f7cc2c2aa9e76b0cf9ff749e240ab
-rwxr-xr-xsrc/Android.bp3
-rw-r--r--src/rust/uwb_core/protos/uwb_service.proto1
-rw-r--r--src/rust/uwb_core/src/proto/mappings.rs4
-rw-r--r--src/rust/uwb_uci_packets/uci_packets.pdl1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/Android.bp b/src/Android.bp
index 193ac98..c0448b7 100755
--- a/src/Android.bp
+++ b/src/Android.bp
@@ -331,6 +331,9 @@ rust_test {
"libcutils",
"liblog",
"libutils",
+ "libbinder_ndk",
+ "libbinder",
+ "libc++",
],
// See b/268061150
stem: "libuci_hal_android_tests_host",
diff --git a/src/rust/uwb_core/protos/uwb_service.proto b/src/rust/uwb_core/protos/uwb_service.proto
index 2577ab0..abf58af 100644
--- a/src/rust/uwb_core/protos/uwb_service.proto
+++ b/src/rust/uwb_core/protos/uwb_service.proto
@@ -103,6 +103,7 @@ enum StatusCode {
UCI_STATUS_ERROR_CCC_SE_BUSY = 80;
UCI_STATUS_ERROR_CCC_LIFECYCLE = 81;
UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 82;
+ UCI_STATUS_REGULATION_UWB_OFF = 83;
// All vendor specific status code will be mapped to UCI_STATUS_VENDOR_SPECIFIC.
UCI_STATUS_RFU_OR_VENDOR_SPECIFIC = 255;
}
diff --git a/src/rust/uwb_core/src/proto/mappings.rs b/src/rust/uwb_core/src/proto/mappings.rs
index 1bd305b..cd21315 100644
--- a/src/rust/uwb_core/src/proto/mappings.rs
+++ b/src/rust/uwb_core/src/proto/mappings.rs
@@ -179,6 +179,7 @@ impl From<ProtoStatusCode> for StatusCode {
ProtoStatusCode::UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT => {
StatusCode::UciStatusErrorStoppedDueToOtherSessionConflict
}
+ ProtoStatusCode::UCI_STATUS_REGULATION_UWB_OFF => StatusCode::UciStatusRegulationUwbOff,
_ => StatusCode::VendorSpecificStatusCode2,
}
}
@@ -270,6 +271,9 @@ impl From<StatusCode> for ProtoStatusCode {
StatusCode::UciStatusErrorStoppedDueToOtherSessionConflict => {
ProtoStatusCode::UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT
}
+ StatusCode::UciStatusRegulationUwbOff => {
+ ProtoStatusCode::UCI_STATUS_REGULATION_UWB_OFF
+ }
_ => ProtoStatusCode::UCI_STATUS_RFU_OR_VENDOR_SPECIFIC,
}
}
diff --git a/src/rust/uwb_uci_packets/uci_packets.pdl b/src/rust/uwb_uci_packets/uci_packets.pdl
index 067f67a..94521c1 100644
--- a/src/rust/uwb_uci_packets/uci_packets.pdl
+++ b/src/rust/uwb_uci_packets/uci_packets.pdl
@@ -144,6 +144,7 @@ enum StatusCode : 8 {
UCI_STATUS_ERROR_CCC_SE_BUSY = 0x50,
UCI_STATUS_ERROR_CCC_LIFECYCLE = 0x51,
UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 0x52,
+ UCI_STATUS_REGULATION_UWB_OFF = 0x53,
},
// For internal usage, we will use 0xFF as default.