Merge "Revert "Call into validateBufferSize and getTransportSize"" into qt-dev
diff --git a/current.txt b/current.txt
index 1d1b80a..3a6241c 100644
--- a/current.txt
+++ b/current.txt
@@ -401,8 +401,8 @@
65a021fa89085b62fc96b2b6d3bef2f9103cf4d63379c68bc154fd9eef672852 android.hardware.health@1.0::types
b7ecf29927055ec422ec44bf776223f07d79ad9f92ccf9becf167e62c2607e7a android.hardware.keymaster@4.0::IKeymasterDevice
574e8f1499436fb4075894dcae0b36682427956ecb114f17f1fe22d116a83c6b android.hardware.neuralnetworks@1.0::IPreparedModel
-417ab60fe1ef786778047e4486f3d868ebce570d91addd8fe4251515213072de android.hardware.neuralnetworks@1.0::types
-ec8aa14fe9b03f2b3fb9845346a4005b6d098ebe2277b2564f73a548a0fd14a7 android.hardware.neuralnetworks@1.1::types
+567de4ebb3a224721eabae40c4484fad2cd1608eb0e66ec9214eb88e9b15d3c9 android.hardware.neuralnetworks@1.0::types
+d51937a3567a50f239589e40300264c4b57f2c3582c6fc6df082f45eb74d90e3 android.hardware.neuralnetworks@1.1::types
1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse
ed9da80ec0c96991fd03f0a46107815d0e50f764656e49dba4980fa5c31d5bc3 android.hardware.radio@1.0::types
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
@@ -515,7 +515,7 @@
92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
36e1064c869965dee533c537cefbe87e54db8bd8cd45be7e0e93e00e8a43863a android.hardware.neuralnetworks@1.2::IPreparedModel
e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-b75126d572c1788682a679ab53c2dbdf3fcd75f754b1370dbf09aaad0e19d397 android.hardware.neuralnetworks@1.2::types
+73e995644b1bb2678ec3ab850feb7a1b4495501953951c22316cefd67b900b3e android.hardware.neuralnetworks@1.2::types
cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc
abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types
4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats
diff --git a/neuralnetworks/1.0/types.hal b/neuralnetworks/1.0/types.hal
index 89af35a..a358946 100644
--- a/neuralnetworks/1.0/types.hal
+++ b/neuralnetworks/1.0/types.hal
@@ -1197,6 +1197,11 @@
* shape of the output tensor. The number of elements implied by shape
* must be the same as the number of elements in the input tensor.
*
+ * If one component of shape is the special value -1, the size of that
+ * dimension is computed so that the total size remains constant. In
+ * particular, a shape of [-1] flattens into 1-D. At most one component
+ * of shape can be -1.
+ *
* Outputs:
* * 0: The output tensor, of shape specified by the input shape.
*
diff --git a/neuralnetworks/1.1/types.hal b/neuralnetworks/1.1/types.hal
index 99f873a..335b803 100644
--- a/neuralnetworks/1.1/types.hal
+++ b/neuralnetworks/1.1/types.hal
@@ -104,9 +104,6 @@
* in axis. If keep_dims is true, the reduced dimensions are retained with
* length 1.
*
- * If dimensions to reduce have no entries, all dimensions are reduced, and
- * a tensor with a single element is returned.
- *
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT32}
* * {@link OperandType::TENSOR_QUANT8_ASYMM}
@@ -116,8 +113,14 @@
* Inputs:
* * 0: A tensor, specifying the input.
* * 1: A 1-D Tensor of {@link OperandType::TENSOR_INT32}. The dimensions
- * to reduce. If None (the default), reduces all dimensions. Must be in
- * the range [-rank(input_tensor), rank(input_tensor)).
+ * to reduce. Must be in the range
+ * [-rank(input_tensor), rank(input_tensor)).
+ *
+ * NOTE: When the operation was introduced, the documentation
+ * incorrectly stated that if dimensions were empty, the operation
+ * would reduce across all dimensions. This behavior was never
+ * implemented.
+ *
* * 2: An {@link OperandType::INT32} scalar, keep_dims. If positive,
* retains reduced dimensions with length 1.
*
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index 839114f..087249a 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -1005,12 +1005,21 @@
* the input.
* * 1: An {@link OperandType::INT32} scalar, specifying the radius of
* the normalization window.
- * * 2: An {@link OperandType::FLOAT32} scalar, specifying the bias, must
- * not be zero.
- * * 3: An {@link OperandType::FLOAT32} scalar, specifying the scale
- * factor, alpha.
- * * 4: An {@link OperandType::FLOAT32} scalar, specifying the exponent,
- * beta.
+ * * 2: A scalar, specifying the bias, must not be zero.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the bias
+ * value must be of {@link OperandType::FLOAT16}.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT32}, the bias
+ * value must be of {@link OperandType::FLOAT32}.
+ * * 3: A scalar, specifying the scale factor, alpha.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the alpha
+ * value must be of {@link OperandType::FLOAT16}.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT32}, the alpha
+ * value must be of {@link OperandType::FLOAT32}.
+ * * 4: A scalar, specifying the exponent, beta.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the beta
+ * value must be of {@link OperandType::FLOAT16}.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT32}, the beta
+ * value must be of {@link OperandType::FLOAT32}.
* * 5: An optional {@link OperandType::INT32} scalar, default to -1,
* specifying the dimension normalization would be performed on.
* Negative index is used to specify axis from the end (e.g. -1 for
@@ -1548,6 +1557,11 @@
* shape of the output tensor. The number of elements implied by shape
* must be the same as the number of elements in the input tensor.
*
+ * If one component of shape is the special value -1, the size of that
+ * dimension is computed so that the total size remains constant. In
+ * particular, a shape of [-1] flattens into 1-D. At most one component
+ * of shape can be -1.
+ *
* Outputs:
* * 0: The output tensor, of shape specified by the input shape.
*
@@ -1949,9 +1963,6 @@
* in axis. If keep_dims is true, the reduced dimensions are retained with
* length 1.
*
- * If dimensions to reduce have no entries, all dimensions are reduced, and
- * a tensor with a single element is returned.
- *
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
* * {@link OperandType::TENSOR_FLOAT32}
@@ -1962,8 +1973,14 @@
* Inputs:
* * 0: A tensor, specifying the input.
* * 1: A 1-D Tensor of {@link OperandType::TENSOR_INT32}. The dimensions
- * to reduce. If None (the default), reduces all dimensions. Must be in
- * the range [-rank(input_tensor), rank(input_tensor)).
+ * to reduce. Must be in the range
+ * [-rank(input_tensor), rank(input_tensor)).
+ *
+ * NOTE: When the operation was introduced, the documentation
+ * incorrectly stated that if dimensions were empty, the operation
+ * would reduce across all dimensions. This behavior was never
+ * implemented.
+ *
* * 2: An {@link OperandType::INT32} scalar, keep_dims. If positive,
* retains reduced dimensions with length 1.
*
@@ -3487,8 +3504,12 @@
*
* Inputs:
* * 0: A tensor specifying the input logits.
- * * 1: An {@link OperandType::FLOAT32} scalar, specifying the positive
- * scaling factor for the exponent, beta.
+ * * 1: A scalar, specifying the positive scaling factor for the exponent,
+ * beta.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the beta
+ * value must be of {@link OperandType::FLOAT16}.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT32}, the beta
+ * value must be of {@link OperandType::FLOAT32}.
* * 2: An {@link OperandType::INT32} scalar specifying the axis to
* reduce across. Negative index is used to specify axis from the
* end (e.g. -1 for the last axis). Must be in the range [-n, n).
diff --git a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
index 1bebae7..030f489 100644
--- a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
@@ -78,6 +78,8 @@
/*
* Test IRadio.setSystemSelectionChannels() for the response returned.
+ *
+ * This test is excluded from manifest, due to non-implementation in Q. Tracked by b/130254624.
*/
TEST_F(RadioHidlTest_v1_3, setSystemSelectionChannels) {
serial = GetRandomSerialNumber();
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index a22cd72..a413863 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -258,6 +258,11 @@
* code.
*/
TEST_F(WifiStaIfaceHidlTest, SetScanningMacOui) {
+ if (!isCapabilitySupported(
+ IWifiStaIface::StaIfaceCapabilityMask::SCAN_RAND)) {
+ // No-op if SetScanningMacOui is not supported.
+ return;
+ }
const android::hardware::hidl_array<uint8_t, 3> kOui{
std::array<uint8_t, 3>{{0x10, 0x22, 0x33}}};
EXPECT_EQ(WifiStatusCode::SUCCESS,
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index 25eb289..b768959 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -1436,14 +1436,11 @@
}
std::string WifiChip::getFirstActiveWlanIfaceName() {
- for (unsigned idx = 0; idx < kMaxWlanIfaces; idx++) {
- const auto ifname = getWlanIfaceName(idx);
- if (findUsingName(sta_ifaces_, ifname)) return ifname;
- if (findUsingName(ap_ifaces_, ifname)) return ifname;
- }
+ if (sta_ifaces_.size() > 0) return sta_ifaces_[0]->getName();
+ if (ap_ifaces_.size() > 0) return ap_ifaces_[0]->getName();
// This could happen if the chip call is made before any STA/AP
// iface is created. Default to wlan0 for such cases.
- LOG(WARNING) << "No active wlan interfaces in use!";
+ LOG(WARNING) << "No active wlan interfaces in use! Using default";
return getWlanIfaceName(0);
}