Merge "Convert VtsHalWifiSupplicantV1_3TargetTest to be parameterized test"
diff --git a/automotive/can/1.0/ICanController.hal b/automotive/can/1.0/ICanController.hal
index 2c7494a..0c6f53e 100644
--- a/automotive/can/1.0/ICanController.hal
+++ b/automotive/can/1.0/ICanController.hal
@@ -97,8 +97,8 @@
*/
BAD_ADDRESS,
- /** Provided baud rate is not supported by the hardware. */
- BAD_BAUDRATE,
+ /** Provided bit rate is not supported by the hardware. */
+ BAD_BITRATE,
};
/**
@@ -152,13 +152,13 @@
} interfaceId;
/**
- * Baud rate for CAN communication.
+ * Bit rate for CAN communication.
*
- * Typical baud rates are: 100000, 125000, 250000, 500000.
+ * Typical bit rates are: 100000, 125000, 250000, 500000.
*
* For virtual interfaces this value is ignored.
*/
- uint32_t baudrate;
+ uint32_t bitrate;
};
/**
diff --git a/automotive/can/1.0/default/CanBusNative.cpp b/automotive/can/1.0/default/CanBusNative.cpp
index 047b090..ef04d01 100644
--- a/automotive/can/1.0/default/CanBusNative.cpp
+++ b/automotive/can/1.0/default/CanBusNative.cpp
@@ -22,8 +22,8 @@
namespace android::hardware::automotive::can::V1_0::implementation {
-CanBusNative::CanBusNative(const std::string& ifname, uint32_t baudrate)
- : CanBus(ifname), mBaudrate(baudrate) {}
+CanBusNative::CanBusNative(const std::string& ifname, uint32_t bitrate)
+ : CanBus(ifname), mBitrate(bitrate) {}
ICanController::Result CanBusNative::preUp() {
if (!netdevice::exists(mIfname)) {
@@ -31,7 +31,7 @@
return ICanController::Result::BAD_ADDRESS;
}
- if (mBaudrate == 0) {
+ if (mBitrate == 0) {
// interface is already up and we just want to register it
return ICanController::Result::OK;
}
@@ -41,9 +41,9 @@
return ICanController::Result::UNKNOWN_ERROR;
}
- if (!netdevice::can::setBitrate(mIfname, mBaudrate)) {
- LOG(ERROR) << "Can't set bitrate " << mBaudrate << " for " << mIfname;
- return ICanController::Result::BAD_BAUDRATE;
+ if (!netdevice::can::setBitrate(mIfname, mBitrate)) {
+ LOG(ERROR) << "Can't set bitrate " << mBitrate << " for " << mIfname;
+ return ICanController::Result::BAD_BITRATE;
}
return ICanController::Result::OK;
diff --git a/automotive/can/1.0/default/CanBusNative.h b/automotive/can/1.0/default/CanBusNative.h
index 7eda683..04d7194 100644
--- a/automotive/can/1.0/default/CanBusNative.h
+++ b/automotive/can/1.0/default/CanBusNative.h
@@ -21,13 +21,13 @@
namespace android::hardware::automotive::can::V1_0::implementation {
struct CanBusNative : public CanBus {
- CanBusNative(const std::string& ifname, uint32_t baudrate);
+ CanBusNative(const std::string& ifname, uint32_t bitrate);
protected:
virtual ICanController::Result preUp() override;
private:
- const uint32_t mBaudrate;
+ const uint32_t mBitrate;
};
} // namespace android::hardware::automotive::can::V1_0::implementation
diff --git a/automotive/can/1.0/default/CanBusSlcan.cpp b/automotive/can/1.0/default/CanBusSlcan.cpp
index e42005b..0feee8f 100644
--- a/automotive/can/1.0/default/CanBusSlcan.cpp
+++ b/automotive/can/1.0/default/CanBusSlcan.cpp
@@ -71,7 +71,7 @@
if (kBitrate != 0) {
const auto lookupIt = slcanprotocol::kBitrateCommands.find(kBitrate);
if (lookupIt == slcanprotocol::kBitrateCommands.end()) {
- return ICanController::Result::BAD_BAUDRATE;
+ return ICanController::Result::BAD_BITRATE;
}
canBitrateCommand = lookupIt->second;
}
diff --git a/automotive/can/1.0/default/CanController.cpp b/automotive/can/1.0/default/CanController.cpp
index cd17dd8..fb648c1 100644
--- a/automotive/can/1.0/default/CanController.cpp
+++ b/automotive/can/1.0/default/CanController.cpp
@@ -61,7 +61,7 @@
if (config.iftype == ICanController::InterfaceType::SOCKETCAN) {
// TODO(b/135918744): support serialno
if (config.interfaceId.getDiscriminator() == IfaceIdDisc::address) {
- busService = new CanBusNative(config.interfaceId.address(), config.baudrate);
+ busService = new CanBusNative(config.interfaceId.address(), config.bitrate);
} else {
return ICanController::Result::BAD_ADDRESS;
}
@@ -73,7 +73,7 @@
}
} else if (config.iftype == ICanController::InterfaceType::SLCAN) {
if (config.interfaceId.getDiscriminator() == IfaceIdDisc::address) {
- busService = new CanBusSlcan(config.interfaceId.address(), config.baudrate);
+ busService = new CanBusSlcan(config.interfaceId.address(), config.bitrate);
} else {
return ICanController::Result::BAD_ADDRESS;
}
diff --git a/automotive/can/1.0/tools/canhalctrl.cpp b/automotive/can/1.0/tools/canhalctrl.cpp
index 5c9849b..5494ba3 100644
--- a/automotive/can/1.0/tools/canhalctrl.cpp
+++ b/automotive/can/1.0/tools/canhalctrl.cpp
@@ -29,12 +29,12 @@
static void usage() {
std::cerr << "CAN bus HAL Control tool" << std::endl;
std::cerr << std::endl << "usage:" << std::endl << std::endl;
- std::cerr << "canhalctrl up <bus name> <type> <interface> [baudrate]" << std::endl;
+ std::cerr << "canhalctrl up <bus name> <type> <interface> [bitrate]" << std::endl;
std::cerr << "where:" << std::endl;
std::cerr << " bus name - name under which ICanBus will be published" << std::endl;
std::cerr << " type - one of: virtual, socketcan, slcan, indexed" << std::endl;
std::cerr << " interface - hardware identifier (like can0, vcan0, /dev/ttyUSB0)" << std::endl;
- std::cerr << " baudrate - such as 100000, 125000, 250000, 500000" << std::endl;
+ std::cerr << " bitrate - such as 100000, 125000, 250000, 500000" << std::endl;
std::cerr << std::endl;
std::cerr << "canhalctrl down <bus name>" << std::endl;
std::cerr << "where:" << std::endl;
@@ -59,7 +59,7 @@
}
static int up(const std::string& busName, ICanController::InterfaceType type,
- const std::string& interface, uint32_t baudrate) {
+ const std::string& interface, uint32_t bitrate) {
bool anySupported = false;
for (auto&& service : getControlServices()) {
auto ctrl = ICanController::getService(service);
@@ -74,7 +74,7 @@
ICanController::BusConfiguration config = {};
config.name = busName;
config.iftype = type;
- config.baudrate = baudrate;
+ config.bitrate = bitrate;
if (type == ICanController::InterfaceType::INDEXED) {
config.interfaceId.index(std::stol(interface));
@@ -146,12 +146,12 @@
return -1;
}
- long long baudrate = 0;
+ long long bitrate = 0;
if (argc == 4) {
- baudrate = std::stoll(argv[3]);
+ bitrate = std::stoll(argv[3]);
}
- return up(busName, *type, interface, baudrate);
+ return up(busName, *type, interface, bitrate);
} else if (cmd == "down") {
if (argc != 1) {
std::cerr << "Invalid number of arguments to down command: " << argc << std::endl;
diff --git a/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp b/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp
index 9bc789a..b2edd78 100644
--- a/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp
+++ b/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp
@@ -172,7 +172,7 @@
ICanController::BusConfiguration config = {};
config.name = "compattestsrv";
config.iftype = iftype;
- config.baudrate = 125000;
+ config.bitrate = 125000;
// using random-ish addresses, which may not be valid - we can't test the success case
if (iddisc == IdDisc::address) {
diff --git a/current.txt b/current.txt
index 3f169db..0fec290 100644
--- a/current.txt
+++ b/current.txt
@@ -648,15 +648,18 @@
9e59fffceed0dd72a9799e04505db5f777bbbea1af0695ba4107ef6d967c6fda android.hardware.neuralnetworks@1.3::IDevice
258825966435b3ed08832055bb736d81516013e405f161d9ccde9a90cfcdde83 android.hardware.neuralnetworks@1.3::IPreparedModel
94e803236398bed1febb11cc21051bc42ec003700139b099d6c479e02a7ca3c3 android.hardware.neuralnetworks@1.3::IPreparedModelCallback
-618a628f8c94d6f6e4cb401b69fa50ccb8b82191ea434e3a071252289b4f312c android.hardware.neuralnetworks@1.3::types
+f3c1e7298da628a755b452cd3325e8d0fe867a2debb873069baab6a27434a72d android.hardware.neuralnetworks@1.3::types
3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi
-514dc8b810658c45d7b0d34132b708cee2658ecedd9c7efc57d0d666ef182484 android.hardware.wifi.hostapd@1.2::IHostapd
+42e72d7c8fd843d2611ffb9142bfae61dcdb5325860c6602825863f086a91bff android.hardware.wifi.hostapd@1.2::IHostapd
11f6448d15336361180391c8ebcdfd2d7cf77b3782d577e594d583aadc9c2877 android.hardware.wifi.hostapd@1.2::types
a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardware.wifi.supplicant@1.3::ISupplicant
c72cb37b3f66ef65aeb5c6438a3fbe17bbe847fdf62d1a76eafd7f3a8a526105 android.hardware.wifi.supplicant@1.3::ISupplicantStaIface
342a8e12db4dca643f2755eb4167e8f103d96502053a25a1f51f42107a4530f1 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
8835e9799cddf7c239f60beff467cbdf164331f70a8b6c06ed78982d7810d835 android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
91015479f5a0fba9872e98d3cca4680995de64f42ae71461b4b7e5acc5a196ab android.hardware.wifi.supplicant@1.3::types
+##
+# BEGIN Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
+##
2c0587a1e83facba604949c31163486f21eb5b47a29c8f29119a47d3bd052103 android.hardware.radio@1.5::types
b5cfa87882b416105fe01e8a40a856d36c93d64f1103d77e12b1281cea13b0bd android.hardware.radio@1.5::IRadio
bc59237dbd93949238081f762710552e76670cb648c0e198138551460ac54b1e android.hardware.radio@1.5::IRadioIndication
@@ -665,5 +668,8 @@
b27ab0cd40b0b078cdcd024bfe1061c4c4c065f3519eeb9347fa359a3268a5ae android.hardware.radio.config@1.3::IRadioConfig
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
7683fed9d253956071f18b152e6be657719536f98d9b534433d5e411bcde5061 android.hardware.radio.config@1.3::IRadioConfigResponse
+##
+# END Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
+##
b46d358537168c478762c3d34d5fe1555a3fcd89cd1f43621350ada395e6f795 android.hardware.soundtrigger@2.3::types
15924fbf38b3c282299a37e48c72405c97e322f844f815081db6acbca22d4165 android.hardware.soundtrigger@2.3::ISoundTriggerHw
diff --git a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
index 53b9202..b173e2e 100644
--- a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
+++ b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
@@ -39,8 +39,10 @@
// TODO own a CommandReaderBase rather than subclassing
class ComposerCommandEngine : protected CommandReaderBase {
public:
- ComposerCommandEngine(ComposerHal* hal, ComposerResources* resources)
- : mHal(hal), mResources(resources) {}
+ ComposerCommandEngine(ComposerHal* hal, ComposerResources* resources)
+ : mHal(hal), mResources(resources) {
+ mWriter = createCommandWriter(kWriterInitialSize);
+ }
virtual ~ComposerCommandEngine() = default;
@@ -74,16 +76,16 @@
return Error::BAD_PARAMETER;
}
- return mWriter.writeQueue(outQueueChanged, outCommandLength, outCommandHandles)
- ? Error::NONE
- : Error::NO_RESOURCES;
+ return mWriter->writeQueue(outQueueChanged, outCommandLength, outCommandHandles)
+ ? Error::NONE
+ : Error::NO_RESOURCES;
}
- const MQDescriptorSync<uint32_t>* getOutputMQDescriptor() { return mWriter.getMQDescriptor(); }
+ const MQDescriptorSync<uint32_t>* getOutputMQDescriptor() { return mWriter->getMQDescriptor(); }
void reset() {
CommandReaderBase::reset();
- mWriter.reset();
+ mWriter->reset();
}
protected:
@@ -140,13 +142,17 @@
}
}
+ virtual std::unique_ptr<CommandWriterBase> createCommandWriter(size_t writerInitialSize) {
+ return std::make_unique<CommandWriterBase>(writerInitialSize);
+ }
+
bool executeSelectDisplay(uint16_t length) {
if (length != CommandWriterBase::kSelectDisplayLength) {
return false;
}
mCurrentDisplay = read64();
- mWriter.selectDisplay(mCurrentDisplay);
+ mWriter->selectDisplay(mCurrentDisplay);
return true;
}
@@ -174,7 +180,7 @@
auto err = mHal->setColorTransform(mCurrentDisplay, matrix, transform);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -208,7 +214,7 @@
close(fence);
}
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -239,7 +245,7 @@
close(fence);
}
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -260,10 +266,10 @@
&displayRequestMask, &requestedLayers, &requestMasks);
mResources->setDisplayMustValidateState(mCurrentDisplay, false);
if (err == Error::NONE) {
- mWriter.setChangedCompositionTypes(changedLayers, compositionTypes);
- mWriter.setDisplayRequests(displayRequestMask, requestedLayers, requestMasks);
+ mWriter->setChangedCompositionTypes(changedLayers, compositionTypes);
+ mWriter->setDisplayRequests(displayRequestMask, requestedLayers, requestMasks);
} else {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -283,9 +289,9 @@
? Error::NOT_VALIDATED
: mHal->presentDisplay(mCurrentDisplay, &presentFence, &layers, &fences);
if (err == Error::NONE) {
- mWriter.setPresentOrValidateResult(1);
- mWriter.setPresentFence(presentFence);
- mWriter.setReleaseFences(layers, fences);
+ mWriter->setPresentOrValidateResult(1);
+ mWriter->setPresentFence(presentFence);
+ mWriter->setReleaseFences(layers, fences);
return true;
}
}
@@ -301,11 +307,11 @@
&displayRequestMask, &requestedLayers, &requestMasks);
mResources->setDisplayMustValidateState(mCurrentDisplay, false);
if (err == Error::NONE) {
- mWriter.setPresentOrValidateResult(0);
- mWriter.setChangedCompositionTypes(changedLayers, compositionTypes);
- mWriter.setDisplayRequests(displayRequestMask, requestedLayers, requestMasks);
+ mWriter->setPresentOrValidateResult(0);
+ mWriter->setChangedCompositionTypes(changedLayers, compositionTypes);
+ mWriter->setDisplayRequests(displayRequestMask, requestedLayers, requestMasks);
} else {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -318,7 +324,7 @@
auto err = mHal->acceptDisplayChanges(mCurrentDisplay);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -334,10 +340,10 @@
std::vector<int> fences;
auto err = mHal->presentDisplay(mCurrentDisplay, &presentFence, &layers, &fences);
if (err == Error::NONE) {
- mWriter.setPresentFence(presentFence);
- mWriter.setReleaseFences(layers, fences);
+ mWriter->setPresentFence(presentFence);
+ mWriter->setReleaseFences(layers, fences);
} else {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -351,7 +357,7 @@
auto err = mHal->setLayerCursorPosition(mCurrentDisplay, mCurrentLayer, readSigned(),
readSigned());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -382,7 +388,7 @@
close(fence);
}
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -397,7 +403,7 @@
auto damage = readRegion(length / 4);
auto err = mHal->setLayerSurfaceDamage(mCurrentDisplay, mCurrentLayer, damage);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -410,7 +416,7 @@
auto err = mHal->setLayerBlendMode(mCurrentDisplay, mCurrentLayer, readSigned());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -423,7 +429,7 @@
auto err = mHal->setLayerColor(mCurrentDisplay, mCurrentLayer, readColor());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -436,7 +442,7 @@
auto err = mHal->setLayerCompositionType(mCurrentDisplay, mCurrentLayer, readSigned());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -449,7 +455,7 @@
auto err = mHal->setLayerDataspace(mCurrentDisplay, mCurrentLayer, readSigned());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -462,7 +468,7 @@
auto err = mHal->setLayerDisplayFrame(mCurrentDisplay, mCurrentLayer, readRect());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -475,7 +481,7 @@
auto err = mHal->setLayerPlaneAlpha(mCurrentDisplay, mCurrentLayer, readFloat());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -496,7 +502,7 @@
err = mHal->setLayerSidebandStream(mCurrentDisplay, mCurrentLayer, stream);
}
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -509,7 +515,7 @@
auto err = mHal->setLayerSourceCrop(mCurrentDisplay, mCurrentLayer, readFRect());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -522,7 +528,7 @@
auto err = mHal->setLayerTransform(mCurrentDisplay, mCurrentLayer, readSigned());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -537,7 +543,7 @@
auto region = readRegion(length / 4);
auto err = mHal->setLayerVisibleRegion(mCurrentDisplay, mCurrentLayer, region);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -550,7 +556,7 @@
auto err = mHal->setLayerZOrder(mCurrentDisplay, mCurrentLayer, read());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -579,12 +585,12 @@
};
}
- ComposerHal* mHal;
- ComposerResources* mResources;
-
// 64KiB minus a small space for metadata such as read/write pointers
static constexpr size_t kWriterInitialSize = 64 * 1024 / sizeof(uint32_t) - 16;
- CommandWriterBase mWriter{kWriterInitialSize};
+
+ ComposerHal* mHal;
+ ComposerResources* mResources;
+ std::unique_ptr<CommandWriterBase> mWriter;
Display mCurrentDisplay = 0;
Layer mCurrentLayer = 0;
diff --git a/graphics/composer/2.2/utils/hal/include/composer-hal/2.2/ComposerCommandEngine.h b/graphics/composer/2.2/utils/hal/include/composer-hal/2.2/ComposerCommandEngine.h
index d9f6226..8d70ba2 100644
--- a/graphics/composer/2.2/utils/hal/include/composer-hal/2.2/ComposerCommandEngine.h
+++ b/graphics/composer/2.2/utils/hal/include/composer-hal/2.2/ComposerCommandEngine.h
@@ -49,6 +49,11 @@
}
}
+ std::unique_ptr<V2_1::CommandWriterBase> createCommandWriter(
+ size_t writerInitialSize) override {
+ return std::make_unique<CommandWriterBase>(writerInitialSize);
+ }
+
bool executeSetLayerPerFrameMetadata(uint16_t length) {
// (key, value) pairs
if (length % 2 != 0) {
@@ -65,7 +70,7 @@
auto err = mHal->setLayerPerFrameMetadata(mCurrentDisplay, mCurrentLayer, metadata);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -78,7 +83,7 @@
auto err = mHal->setLayerFloatColor(mCurrentDisplay, mCurrentLayer, readFloatColor());
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerCommandEngine.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerCommandEngine.h
index 329dbed..02f6212 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerCommandEngine.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerCommandEngine.h
@@ -50,6 +50,11 @@
}
}
+ std::unique_ptr<V2_1::CommandWriterBase> createCommandWriter(
+ size_t writerInitialSize) override {
+ return std::make_unique<CommandWriterBase>(writerInitialSize);
+ }
+
bool executeSetLayerColorTransform(uint16_t length) {
if (length != CommandWriterBase::kSetLayerColorTransformLength) {
return false;
@@ -61,7 +66,7 @@
}
auto err = mHal->setLayerColorTransform(mCurrentDisplay, mCurrentLayer, matrix);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
@@ -97,7 +102,7 @@
}
auto err = mHal->setLayerPerFrameMetadataBlobs(mCurrentDisplay, mCurrentLayer, metadata);
if (err != Error::NONE) {
- mWriter.setError(getCommandLoc(), err);
+ mWriter->setError(getCommandLoc(), err);
}
return true;
}
@@ -111,8 +116,8 @@
private:
using BaseType2_1 = V2_1::hal::ComposerCommandEngine;
- using BaseType2_1::mWriter;
using BaseType2_2 = V2_2::hal::ComposerCommandEngine;
+ using BaseType2_1::mWriter;
ComposerHal* mHal;
};
diff --git a/graphics/composer/2.4/IComposerCallback.hal b/graphics/composer/2.4/IComposerCallback.hal
index fea24a1..f343cee 100644
--- a/graphics/composer/2.4/IComposerCallback.hal
+++ b/graphics/composer/2.4/IComposerCallback.hal
@@ -42,4 +42,14 @@
* @param updatedTimeline is the new timeline for the vsync period change.
*/
oneway onVsyncPeriodTimingChanged(Display display, VsyncPeriodChangeTimeline updatedTimeline);
+
+ /**
+ * Notifies the client that the conditions which previously led to returning
+ * SEAMLESS_NOT_POSSIBLE from setActiveConfigWithConstraints have changed and now seamless may
+ * be possible. Client should retry calling setActiveConfigWithConstraints.
+ *
+ * @param display is a display setActiveConfigWithConstraints previously failed with
+ * SEAMLESS_NOT_POSSIBLE.
+ */
+ oneway onSeamlessPossible(Display display);
};
diff --git a/graphics/composer/2.4/IComposerClient.hal b/graphics/composer/2.4/IComposerClient.hal
index 06b4c5e..1b8170b 100644
--- a/graphics/composer/2.4/IComposerClient.hal
+++ b/graphics/composer/2.4/IComposerClient.hal
@@ -185,6 +185,9 @@
* share the same config group as the current config.
* SEAMLESS_NOT_POSSIBLE when seamlessRequired was true but the display cannot achieve
* the vsync period change without a noticeable visual artifact.
+ * When the conditions change and it may be possible to change
+ * the vsync period seamlessly, onSeamlessPossible callback
+ * must be called to indicate that caller should retry.
* @return timeline is the timeline for the vsync period change.
*/
setActiveConfigWithConstraints(Display display, Config config,
diff --git a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h
index dcd959d..d48a9e7 100644
--- a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h
+++ b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerClient.h
@@ -83,6 +83,12 @@
ret.description().c_str());
}
+ void onSeamlessPossible(Display display) override {
+ auto ret = mCallback->onSeamlessPossible(display);
+ ALOGE_IF(!ret.isOk(), "failed to send onSealmessPossible: %s",
+ ret.description().c_str());
+ }
+
protected:
const sp<IComposerCallback> mCallback;
V2_1::hal::ComposerResources* const mResources;
diff --git a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h
index a1e56ae..bbc5405 100644
--- a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h
+++ b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerHal.h
@@ -49,6 +49,7 @@
VsyncPeriodNanos vsyncPeriodNanos) = 0;
virtual void onVsyncPeriodTimingChanged(Display display,
const VsyncPeriodChangeTimeline& timeline) = 0;
+ virtual void onSeamlessPossible(Display display) = 0;
};
virtual void registerEventCallback_2_4(EventCallback_2_4* callback) = 0;
diff --git a/graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h b/graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h
index 9e7684d..07d8607 100644
--- a/graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h
+++ b/graphics/composer/2.4/utils/passthrough/include/composer-passthrough/2.4/HwcHal.h
@@ -61,10 +61,12 @@
BaseType2_1::mDispatch.registerCallback(
mDevice, HWC2_CALLBACK_VSYNC_2_4, this,
reinterpret_cast<hwc2_function_pointer_t>(vsync_2_4_Hook));
-
BaseType2_1::mDispatch.registerCallback(
mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED, this,
reinterpret_cast<hwc2_function_pointer_t>(vsyncPeriodTimingChangedHook));
+ BaseType2_1::mDispatch.registerCallback(
+ mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this,
+ reinterpret_cast<hwc2_function_pointer_t>(seamlessPossibleHook));
}
void unregisterEventCallback_2_4() override {
@@ -80,6 +82,8 @@
BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_2_4, this, nullptr);
BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED,
this, nullptr);
+ BaseType2_1::mDispatch.registerCallback(mDevice, HWC2_CALLBACK_SEAMLESS_POSSIBLE, this,
+ nullptr);
mEventCallback_2_4 = nullptr;
}
@@ -272,6 +276,11 @@
hal->mEventCallback_2_4->onVsyncPeriodTimingChanged(display, timeline);
}
+ static void seamlessPossibleHook(hwc2_callback_data_t callbackData, hwc2_display_t display) {
+ auto hal = static_cast<HwcHalImpl*>(callbackData);
+ hal->mEventCallback_2_4->onSeamlessPossible(display);
+ }
+
private:
struct {
HWC2_PFN_GET_DISPLAY_CONNECTION_TYPE getDisplayConnectionType;
diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal
index 74c259c..62c5833 100644
--- a/neuralnetworks/1.3/types.hal
+++ b/neuralnetworks/1.3/types.hal
@@ -4747,7 +4747,7 @@
RESIZE_NEAREST_NEIGHBOR = @1.2::OperationType:RESIZE_NEAREST_NEIGHBOR,
/**
- * Quantized version of {@link OperationType:LSTM}.
+ * Quantized version of {@link OperationType::LSTM}.
*
* The input and the output use asymmetric quantized types, while the rest
* use symmetric ones.
diff --git a/neuralnetworks/1.3/types.t b/neuralnetworks/1.3/types.t
index e06f5d6..0d20d06 100644
--- a/neuralnetworks/1.3/types.t
+++ b/neuralnetworks/1.3/types.t
@@ -57,6 +57,8 @@
%insert Operation_1.2
+%insert Operation_1.3
+
/**
* DEPRECATED. Since NNAPI 1.2, extensions are the preferred alternative to
* OEM operation and data types.
diff --git a/wifi/hostapd/1.2/IHostapd.hal b/wifi/hostapd/1.2/IHostapd.hal
index 5e6d80a..5126d12 100644
--- a/wifi/hostapd/1.2/IHostapd.hal
+++ b/wifi/hostapd/1.2/IHostapd.hal
@@ -16,6 +16,7 @@
package android.hardware.wifi.hostapd@1.2;
+import @1.0::IHostapd.EncryptionType;
import @1.0::IHostapd.NetworkParams;
import @1.1::IHostapd;
import HostapdStatus;
@@ -27,6 +28,12 @@
* Top-level object for managing SoftAPs.
*/
interface IHostapd extends @1.1::IHostapd {
+ /** Possible Security types. */
+ enum EncryptionType : @1.0::IHostapd.EncryptionType {
+ WPA3_SAE_TRANSITION,
+ WPA3_SAE,
+ };
+
/**
* Band bitmMask to use for the SoftAp operations.
* A combinatoin of these bits are used to identify the allowed bands
@@ -151,6 +158,24 @@
};
/**
+ * Parameters to use for setting up the access point network.
+ */
+ struct NetworkParams {
+ /**
+ * Baseline information as defined in HAL 1.0.
+ */
+ @1.0::IHostapd.NetworkParams V1_0;
+ /** Key management mask for the replace V1_0.encryptionType. */
+ EncryptionType encryptionType;
+ /**
+ * Passphrase for WPA3_SAE network, WPA3_SAE_TRANSITION and
+ * WPA2_PSK. Replaces @1.0::IHostapd.NetworkParams.pskPassphrase.
+ */
+ string passphrase;
+ };
+
+
+ /**
* Adds a new access point for hostapd to control.
*
* This should trigger the setup of an access point with the specified
diff --git a/wifi/hostapd/1.2/vts/functional/hostapd_hidl_test.cpp b/wifi/hostapd/1.2/vts/functional/hostapd_hidl_test.cpp
index 94cbb42..9f57934 100644
--- a/wifi/hostapd/1.2/vts/functional/hostapd_hidl_test.cpp
+++ b/wifi/hostapd/1.2/vts/functional/hostapd_hidl_test.cpp
@@ -41,6 +41,9 @@
constexpr unsigned char kNwSsid[] = {'t', 'e', 's', 't', '1',
'2', '3', '4', '5'};
constexpr char kNwPassphrase[] = "test12345";
+constexpr char kInvalidMaxPskNwPassphrase[] =
+ "0123456789012345678901234567890123456789012345678901234567890123456789";
+constexpr char kInvalidMinPskNwPassphrase[] = "test";
constexpr int kIfaceChannel = 6;
constexpr int kIfaceInvalidChannel = 567;
constexpr uint8_t kTestZeroMacAddr[] = {[0 ... 5] = 0x0};
@@ -61,7 +64,7 @@
ASSERT_NE(hostapd_.get(), nullptr);
}
- virtual void TearDown() override { stopHostapd(wifi_instance_name_); }
+ virtual void TearDown() override { stopHostapd(hostapd_instance_name_); }
protected:
std::string getPrimaryWlanIfaceName() {
@@ -133,31 +136,59 @@
}
IHostapd::NetworkParams getOpenNwParams() {
- IHostapd::NetworkParams nw_params;
- nw_params.ssid =
+ IHostapd::NetworkParams nw_params_1_2;
+ ::android::hardware::wifi::hostapd::V1_0::IHostapd::NetworkParams
+ nw_params_1_0;
+ nw_params_1_0.ssid =
std::vector<uint8_t>(kNwSsid, kNwSsid + sizeof(kNwSsid));
- nw_params.isHidden = false;
- nw_params.encryptionType = IHostapd::EncryptionType::NONE;
- return nw_params;
+ nw_params_1_0.isHidden = false;
+ nw_params_1_2.V1_0 = nw_params_1_0;
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::NONE;
+ return nw_params_1_2;
}
IHostapd::NetworkParams getPskNwParams() {
- IHostapd::NetworkParams nw_params;
- nw_params.ssid =
- std::vector<uint8_t>(kNwSsid, kNwSsid + sizeof(kNwSsid));
- nw_params.isHidden = false;
- nw_params.encryptionType = IHostapd::EncryptionType::WPA2;
- nw_params.pskPassphrase = kNwPassphrase;
- return nw_params;
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
+ nw_params_1_2.passphrase = kNwPassphrase;
+ return nw_params_1_2;
}
IHostapd::NetworkParams getInvalidPskNwParams() {
- IHostapd::NetworkParams nw_params;
- nw_params.ssid =
- std::vector<uint8_t>(kNwSsid, kNwSsid + sizeof(kNwSsid));
- nw_params.isHidden = false;
- nw_params.encryptionType = IHostapd::EncryptionType::WPA2;
- return nw_params;
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
+ nw_params_1_2.passphrase = kInvalidMaxPskNwPassphrase;
+
+ return nw_params_1_2;
+ }
+
+ IHostapd::NetworkParams getSaeTransitionNwParams() {
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType =
+ IHostapd::EncryptionType::WPA3_SAE_TRANSITION;
+ nw_params_1_2.passphrase = kNwPassphrase;
+ return nw_params_1_2;
+ }
+
+ IHostapd::NetworkParams getInvalidSaeTransitionNwParams() {
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
+ nw_params_1_2.passphrase = kInvalidMinPskNwPassphrase;
+ return nw_params_1_2;
+ }
+
+ IHostapd::NetworkParams getSaeNwParams() {
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA3_SAE;
+ nw_params_1_2.passphrase = kNwPassphrase;
+ return nw_params_1_2;
+ }
+
+ IHostapd::NetworkParams getInvalidSaeNwParams() {
+ IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
+ nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA3_SAE;
+ nw_params_1_2.passphrase = "";
+ return nw_params_1_2;
}
IHostapd::IfaceParams getIfaceParamsWithInvalidChannel() {
@@ -239,6 +270,27 @@
}
/**
+ * Adds an access point with SAE Transition network config & ACS disabled.
+ * Access point creation should pass.
+ */
+TEST_P(HostapdHidlTest, AddSaeTransitionAccessPointWithoutAcs) {
+ auto status =
+ HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
+ getSaeTransitionNwParams());
+ EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
+}
+
+/**
+ * Adds an access point with SAE network config & ACS disabled.
+ * Access point creation should pass.
+ */
+TEST_P(HostapdHidlTest, AddSAEAccessPointWithoutAcs) {
+ auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
+ getIfaceParamsWithoutAcs(), getSaeNwParams());
+ EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
+}
+
+/**
* Adds & then removes an access point with PSK network config & ACS enabled.
* Access point creation & removal should pass.
*/
@@ -293,6 +345,28 @@
}
/**
+ * Adds an access point with invalid SAE transition network config.
+ * Access point creation should fail.
+ */
+TEST_P(HostapdHidlTest, AddInvalidSaeTransitionAccessPointWithoutAcs) {
+ auto status =
+ HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
+ getInvalidSaeTransitionNwParams());
+ EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
+}
+
+/**
+ * Adds an access point with invalid SAE network config.
+ * Access point creation should fail.
+ */
+TEST_P(HostapdHidlTest, AddInvalidSaeAccessPointWithoutAcs) {
+ auto status =
+ HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
+ getInvalidSaeNwParams());
+ EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
+}
+
+/**
* forceClientDisconnect should return FAILURE_IFACE_UNKNOWN
* when hotspot interface doesn't init..
*/