diff options
215 files changed, 8017 insertions, 109 deletions
diff --git a/audio/aidl/Android.bp b/audio/aidl/Android.bp index 46d177f79d..0b5b99340a 100644 --- a/audio/aidl/Android.bp +++ b/audio/aidl/Android.bp @@ -33,7 +33,7 @@ aidl_interface { "android/hardware/audio/common/SourceMetadata.aidl", ], imports: [ - "android.media.audio.common.types", + "android.media.audio.common.types-V1", ], stability: "vintf", backend: { diff --git a/automotive/audiocontrol/aidl/Android.bp b/automotive/audiocontrol/aidl/Android.bp index 0a3e1f5913..e5f7a4f8c1 100644 --- a/automotive/audiocontrol/aidl/Android.bp +++ b/automotive/audiocontrol/aidl/Android.bp @@ -14,8 +14,8 @@ aidl_interface { vendor_available: true, srcs: ["android/hardware/automotive/audiocontrol/*.aidl"], imports: [ - "android.hardware.audio.common", - "android.media.audio.common.types", + "android.hardware.audio.common-V1", + "android.media.audio.common.types-V1", ], stability: "vintf", backend: { diff --git a/automotive/can/1.0/default/CanController.cpp b/automotive/can/1.0/default/CanController.cpp index 9c0f2c57a2..1b5bf5b48b 100644 --- a/automotive/can/1.0/default/CanController.cpp +++ b/automotive/can/1.0/default/CanController.cpp @@ -292,14 +292,6 @@ Return<ICanController::Result> CanController::upInterface(const ICanController:: return ICanController::Result::OK; } -static bool unregisterCanBusService(const hidl_string& name, sp<CanBus> busService) { - auto manager = hidl::manager::V1_2::IServiceManager::getService(); - if (!manager) return false; - const auto res = manager->tryUnregister(ICanBus::descriptor, name, busService); - if (!res.isOk()) return false; - return res; -} - Return<bool> CanController::downInterface(const hidl_string& name) { LOG(VERBOSE) << "Attempting to bring interface down: " << name; @@ -313,12 +305,6 @@ Return<bool> CanController::downInterface(const hidl_string& name) { auto success = true; - if (!unregisterCanBusService(name, busEntry.mapped())) { - LOG(ERROR) << "Couldn't unregister " << name; - // don't return yet, let's try to do best-effort cleanup - success = false; - } - if (!busEntry.mapped()->down()) { LOG(ERROR) << "Couldn't bring " << name << " down"; success = false; diff --git a/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp b/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp index 294cd17758..f8ae871b33 100644 --- a/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp +++ b/automotive/can/1.0/vts/functional/VtsHalCanControllerV1_0TargetTest.cpp @@ -33,18 +33,45 @@ using hardware::hidl_vec; using InterfaceType = ICanController::InterfaceType; using IfId = ICanController::BusConfig::InterfaceId; +struct Bus { + DISALLOW_COPY_AND_ASSIGN(Bus); + + Bus(sp<ICanController> controller, const ICanController::BusConfig& config) + : mIfname(config.name), mController(controller) { + // Don't bring up the bus, we just need a wrapper for the ICanBus object + /* Not using ICanBus::getService here, since it ignores interfaces not in the manifest + * file -- this is a test, so we don't want to add fake services to a device manifest. */ + auto manager = hidl::manager::V1_2::IServiceManager::getService(); + auto service = manager->get(ICanBus::descriptor, config.name); + mBus = ICanBus::castFrom(service); + } + + ICanBus* operator->() const { return mBus.get(); } + sp<ICanBus> get() { return mBus; } + + Return<Result> send(const CanMessage& msg) { return mBus->send(msg); } + + private: + const std::string mIfname; + sp<ICanController> mController; + sp<ICanBus> mBus; +}; + class CanControllerHalTest : public ::testing::TestWithParam<std::string> { protected: virtual void SetUp() override; virtual void TearDown() override; static void SetUpTestCase(); + Bus makeBus(const std::string ifaceName); + hidl_vec<InterfaceType> getSupportedInterfaceTypes(); bool isSupported(InterfaceType iftype); bool up(InterfaceType iftype, const std::string srvname, std::string ifname, ICanController::Result expected); - void assertRegistered(const std::string srvname, bool expectRegistered); + void assertRegistered(const std::string srvname, const std::string ifaceName, + bool expectRegistered); sp<ICanController> mCanController; static hidl_vec<hidl_string> mBusNames; @@ -117,16 +144,33 @@ bool CanControllerHalTest::up(InterfaceType iftype, std::string srvname, std::st return true; } -void CanControllerHalTest::assertRegistered(std::string srvname, bool expectRegistered) { +void CanControllerHalTest::assertRegistered(const std::string srvname, const std::string ifaceName, + bool expectRegistered) { /* Not using ICanBus::tryGetService here, since it ignores interfaces not in the manifest * file -- this is a test, so we don't want to add fake services to a device manifest. */ auto manager = hidl::manager::V1_2::IServiceManager::getService(); auto busService = manager->get(ICanBus::descriptor, srvname); + if (!expectRegistered) { + /* We can't unregister a HIDL interface defined in the manifest, so we'll just check to make + * sure that the interface behind it is down */ + auto bus = makeBus(ifaceName); + const auto result = bus->send({}); + ASSERT_EQ(Result::INTERFACE_DOWN, result); + return; + } ASSERT_EQ(expectRegistered, busService.withDefault(nullptr) != nullptr) << "ICanBus/" << srvname << (expectRegistered ? " is not " : " is ") << "registered" << " (should be otherwise)"; } +Bus CanControllerHalTest::makeBus(const std::string ifaceName) { + ICanController::BusConfig config = {}; + config.name = mBusNames[0]; + config.interfaceId.virtualif({ifaceName}); + + return Bus(mCanController, config); +} + TEST_P(CanControllerHalTest, SupportsSomething) { const auto supported = getSupportedInterfaceTypes(); ASSERT_GT(supported.size(), 0u); @@ -134,15 +178,17 @@ TEST_P(CanControllerHalTest, SupportsSomething) { TEST_P(CanControllerHalTest, BringUpDown) { const std::string name = mBusNames[0]; + const std::string iface = "vcan57"; + mCanController->downInterface(name); + + assertRegistered(name, iface, false); - assertRegistered(name, false); - if (!up(InterfaceType::VIRTUAL, name, "vcan57", ICanController::Result::OK)) GTEST_SKIP(); - assertRegistered(name, true); + if (!up(InterfaceType::VIRTUAL, name, iface, ICanController::Result::OK)) GTEST_SKIP(); + assertRegistered(name, iface, true); const auto dnresult = mCanController->downInterface(name); ASSERT_TRUE(dnresult); - - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, DownFake) { @@ -152,18 +198,19 @@ TEST_P(CanControllerHalTest, DownFake) { TEST_P(CanControllerHalTest, UpTwice) { const std::string name = mBusNames[0]; + const std::string iface = "vcan72"; - assertRegistered(name, false); - if (!up(InterfaceType::VIRTUAL, name, "vcan72", ICanController::Result::OK)) GTEST_SKIP(); - assertRegistered(name, true); + assertRegistered(name, iface, false); + if (!up(InterfaceType::VIRTUAL, name, iface, ICanController::Result::OK)) GTEST_SKIP(); + assertRegistered(name, iface, true); if (!up(InterfaceType::VIRTUAL, name, "vcan73", ICanController::Result::INVALID_STATE)) { GTEST_SKIP(); } - assertRegistered(name, true); + assertRegistered(name, iface, true); const auto result = mCanController->downInterface(name); ASSERT_TRUE(result); - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, ConfigCompatibility) { @@ -230,63 +277,67 @@ TEST_P(CanControllerHalTest, ConfigCompatibility) { TEST_P(CanControllerHalTest, FailEmptyName) { const std::string name = ""; + const std::string iface = "vcan57"; - assertRegistered(name, false); - if (!up(InterfaceType::VIRTUAL, name, "vcan57", ICanController::Result::BAD_SERVICE_NAME)) { + assertRegistered(name, iface, false); + if (!up(InterfaceType::VIRTUAL, name, iface, ICanController::Result::BAD_SERVICE_NAME)) { GTEST_SKIP(); } - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, FailBadName) { // 33 characters (name can be at most 32 characters long) const std::string name = "ab012345678901234567890123456789c"; + const std::string iface = "vcan57"; - assertRegistered(name, false); - if (!up(InterfaceType::VIRTUAL, name, "vcan57", ICanController::Result::BAD_SERVICE_NAME)) { + assertRegistered(name, iface, false); + if (!up(InterfaceType::VIRTUAL, name, iface, ICanController::Result::BAD_SERVICE_NAME)) { GTEST_SKIP(); } - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, FailBadVirtualAddress) { const std::string name = mBusNames[0]; + const std::string iface = ""; - assertRegistered(name, false); - if (!up(InterfaceType::VIRTUAL, name, "", ICanController::Result::BAD_INTERFACE_ID)) { + assertRegistered(name, iface, false); + if (!up(InterfaceType::VIRTUAL, name, iface, ICanController::Result::BAD_INTERFACE_ID)) { GTEST_SKIP(); } - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, FailBadSocketcanAddress) { const std::string name = mBusNames[0]; + const std::string iface = "can87"; - assertRegistered(name, false); - if (!up(InterfaceType::SOCKETCAN, name, "can87", ICanController::Result::BAD_INTERFACE_ID)) { + assertRegistered(name, iface, false); + if (!up(InterfaceType::SOCKETCAN, name, iface, ICanController::Result::BAD_INTERFACE_ID)) { GTEST_SKIP(); } - assertRegistered(name, false); + assertRegistered(name, iface, false); auto supported = up(InterfaceType::SOCKETCAN, name, "", ICanController::Result::BAD_INTERFACE_ID); ASSERT_TRUE(supported); - assertRegistered(name, false); + assertRegistered(name, iface, false); } TEST_P(CanControllerHalTest, FailBadSlcanAddress) { const std::string name = mBusNames[0]; + const std::string iface = "/dev/shouldnotexist123"; - assertRegistered(name, false); - if (!up(InterfaceType::SLCAN, name, "/dev/shouldnotexist123", - ICanController::Result::BAD_INTERFACE_ID)) { + assertRegistered(name, iface, false); + if (!up(InterfaceType::SLCAN, name, iface, ICanController::Result::BAD_INTERFACE_ID)) { GTEST_SKIP(); } - assertRegistered(name, false); + assertRegistered(name, iface, false); auto supported = up(InterfaceType::SLCAN, name, "", ICanController::Result::BAD_INTERFACE_ID); ASSERT_TRUE(supported); - assertRegistered(name, false); + assertRegistered(name, iface, false); } /** diff --git a/automotive/evs/aidl/vts/FrameHandler.cpp b/automotive/evs/aidl/vts/FrameHandler.cpp index bab832b09c..e51be674d7 100644 --- a/automotive/evs/aidl/vts/FrameHandler.cpp +++ b/automotive/evs/aidl/vts/FrameHandler.cpp @@ -19,22 +19,73 @@ #include "FrameHandler.h" #include "FormatConvert.h" +#include <aidl/android/hardware/graphics/common/HardwareBuffer.h> #include <aidl/android/hardware/graphics/common/HardwareBufferDescription.h> #include <aidlcommonsupport/NativeHandle.h> #include <android-base/logging.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicBufferAllocator.h> +namespace { + using ::aidl::android::hardware::automotive::evs::BufferDesc; using ::aidl::android::hardware::automotive::evs::CameraDesc; using ::aidl::android::hardware::automotive::evs::EvsEventDesc; using ::aidl::android::hardware::automotive::evs::EvsEventType; using ::aidl::android::hardware::automotive::evs::IEvsCamera; using ::aidl::android::hardware::automotive::evs::IEvsDisplay; +using ::aidl::android::hardware::common::NativeHandle; +using ::aidl::android::hardware::graphics::common::HardwareBuffer; using ::aidl::android::hardware::graphics::common::HardwareBufferDescription; using ::ndk::ScopedAStatus; using std::chrono_literals::operator""s; +NativeHandle dupNativeHandle(const NativeHandle& handle, bool doDup) { + NativeHandle dup; + + dup.fds = std::vector<::ndk::ScopedFileDescriptor>(handle.fds.size()); + if (!doDup) { + for (auto i = 0; i < handle.fds.size(); ++i) { + dup.fds.at(i).set(handle.fds[i].get()); + } + } else { + for (auto i = 0; i < handle.fds.size(); ++i) { + dup.fds[i] = std::move(handle.fds[i].dup()); + } + } + dup.ints = handle.ints; + + return std::move(dup); +} + +HardwareBuffer dupHardwareBuffer(const HardwareBuffer& buffer, bool doDup) { + HardwareBuffer dup = { + .description = buffer.description, + .handle = dupNativeHandle(buffer.handle, doDup), + }; + + return std::move(dup); +} + +BufferDesc dupBufferDesc(const BufferDesc& src, bool doDup) { + BufferDesc dup = { + .buffer = dupHardwareBuffer(src.buffer, doDup), + .pixelSizeBytes = src.pixelSizeBytes, + .bufferId = src.bufferId, + .deviceId = src.deviceId, + .timestamp = src.timestamp, + .metadata = src.metadata, + }; + + return std::move(dup); +} + +bool comparePayload(const EvsEventDesc& l, const EvsEventDesc& r) { + return std::equal(l.payload.begin(), l.payload.end(), r.payload.begin()); +} + +} // namespace + FrameHandler::FrameHandler(const std::shared_ptr<IEvsCamera>& pCamera, const CameraDesc& cameraInfo, const std::shared_ptr<IEvsDisplay>& pDisplay, BufferControlFlag mode) : mCamera(pCamera), mCameraInfo(cameraInfo), mDisplay(pDisplay), mReturnMode(mode) { @@ -169,15 +220,24 @@ ScopedAStatus FrameHandler::deliverFrame(const std::vector<BufferDesc>& buffers) mFrameSignal.notify_all(); switch (mReturnMode) { - case eAutoReturn: + case eAutoReturn: { // Send the camera buffer back now that the client has seen it LOG(DEBUG) << "Calling doneWithFrame"; - mCamera->doneWithFrame(buffers); + if (!mCamera->doneWithFrame(buffers).isOk()) { + LOG(WARNING) << "Failed to return buffers"; + } break; - case eNoAutoReturn: + } + + case eNoAutoReturn: { // Hang onto the buffer handles for now -- the client will return it explicitly later - // mHeldBuffers.push(buffers); + std::vector<BufferDesc> buffersToHold; + for (const auto& buffer : buffers) { + buffersToHold.push_back(dupBufferDesc(buffer, /* doDup = */ true)); + } + mHeldBuffers.push(std::move(buffersToHold)); break; + } } LOG(DEBUG) << "Frame handling complete"; @@ -188,8 +248,7 @@ ScopedAStatus FrameHandler::notify(const EvsEventDesc& event) { // Local flag we use to keep track of when the stream is stopping std::unique_lock<std::mutex> lock(mEventLock); mLatestEventDesc.aType = event.aType; - mLatestEventDesc.payload[0] = event.payload[0]; - mLatestEventDesc.payload[1] = event.payload[1]; + mLatestEventDesc.payload = event.payload; if (mLatestEventDesc.aType == EvsEventType::STREAM_STOPPED) { // Signal that the last frame has been received and the stream is stopped mRunning = false; @@ -319,13 +378,9 @@ bool FrameHandler::waitForEvent(const EvsEventDesc& aTargetEvent, EvsEventDesc& bool result = mEventSignal.wait_until( lock, now + 5s, [this, aTargetEvent, ignorePayload, &aReceivedEvent, &found]() { found = (mLatestEventDesc.aType == aTargetEvent.aType) && - (ignorePayload || - (mLatestEventDesc.payload[0] == aTargetEvent.payload[0] && - mLatestEventDesc.payload[1] == aTargetEvent.payload[1])); - + (ignorePayload || comparePayload(mLatestEventDesc, aTargetEvent)); aReceivedEvent.aType = mLatestEventDesc.aType; - aReceivedEvent.payload[0] = mLatestEventDesc.payload[0]; - aReceivedEvent.payload[1] = mLatestEventDesc.payload[1]; + aReceivedEvent.payload = mLatestEventDesc.payload; return found; }); diff --git a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp index 7fcac38aea..a442368c4e 100644 --- a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp +++ b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp @@ -139,7 +139,12 @@ class EvsAidlTest : public ::testing::TestWithParam<std::string> { ASSERT_NE(mEnumerator, nullptr); // Get the ultrasonics array list - ASSERT_TRUE(mEnumerator->getUltrasonicsArrayList(&mUltrasonicsArraysInfo).isOk()) + auto result = mEnumerator->getUltrasonicsArrayList(&mUltrasonicsArraysInfo); + ASSERT_TRUE(result.isOk() || + // TODO(b/149874793): Remove below conditions when + // getUltrasonicsArrayList() is implemented. + (!result.isOk() && result.getServiceSpecificError() == + static_cast<int32_t>(EvsResult::NOT_IMPLEMENTED))) << "Failed to get a list of available ultrasonics arrays"; LOG(INFO) << "We have " << mCameraInfo.size() << " ultrasonics arrays."; } @@ -523,7 +528,7 @@ TEST_P(EvsAidlTest, CameraStreamBuffering) { // Ask for a very large number of buffers in flight to ensure it errors correctly auto badResult = pCam->setMaxFramesInFlight(0xFFFFFFFF); EXPECT_TRUE(!badResult.isOk() && badResult.getServiceSpecificError() == - static_cast<int>(EvsResult::BUFFER_NOT_AVAILABLE)); + static_cast<int>(EvsResult::INVALID_ARG)); // Now ask for exactly two buffers in flight as we'll test behavior in that case ASSERT_TRUE(pCam->setMaxFramesInFlight(kBuffersToHold).isOk()); @@ -587,7 +592,7 @@ TEST_P(EvsAidlTest, CameraToDisplayRoundTrip) { std::shared_ptr<IEvsDisplay> pDisplay; ASSERT_TRUE(mEnumerator->openDisplay(targetDisplayId, &pDisplay).isOk()); EXPECT_NE(pDisplay, nullptr); - LOG(INFO) << "Display " << targetDisplayId << " is in use."; + LOG(INFO) << "Display " << static_cast<int>(targetDisplayId) << " is in use."; // Get the display descriptor DisplayDesc displayDesc; @@ -1137,8 +1142,8 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cmd); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cmd)); + aTargetEvent.payload.push_back(val0); if (!frameHandlerPrimary->waitForEvent(aTargetEvent, aNotification0)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1152,8 +1157,8 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cmd); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cmd)); + aTargetEvent.payload.push_back(val0); if (!frameHandlerSecondary->waitForEvent(aTargetEvent, aNotification1)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1188,11 +1193,13 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { static_cast<EvsEventType>(aNotification0.aType)); ASSERT_EQ(EvsEventType::PARAMETER_CHANGED, static_cast<EvsEventType>(aNotification1.aType)); + ASSERT_GE(aNotification0.payload.size(), 2); + ASSERT_GE(aNotification1.payload.size(), 2); ASSERT_EQ(cmd, static_cast<CameraParam>(aNotification0.payload[0])); ASSERT_EQ(cmd, static_cast<CameraParam>(aNotification1.payload[0])); for (auto&& v : values) { - ASSERT_EQ(v, static_cast<int32_t>(aNotification0.payload[1])); - ASSERT_EQ(v, static_cast<int32_t>(aNotification1.payload[1])); + ASSERT_EQ(v, aNotification0.payload[1]); + ASSERT_EQ(v, aNotification1.payload[1]); } // Clients expects to receive a parameter change notification @@ -1281,8 +1288,8 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cmd); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cmd)); + aTargetEvent.payload.push_back(val0); if (!frameHandlerPrimary->waitForEvent(aTargetEvent, aNotification0)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1295,8 +1302,8 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cmd); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cmd)); + aTargetEvent.payload.push_back(val0); if (!frameHandlerSecondary->waitForEvent(aTargetEvent, aNotification1)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1336,11 +1343,13 @@ TEST_P(EvsAidlTest, MultiCameraParameter) { static_cast<EvsEventType>(aNotification0.aType)); ASSERT_EQ(EvsEventType::PARAMETER_CHANGED, static_cast<EvsEventType>(aNotification1.aType)); + ASSERT_GE(aNotification0.payload.size(), 2); + ASSERT_GE(aNotification1.payload.size(), 2); ASSERT_EQ(cmd, static_cast<CameraParam>(aNotification0.payload[0])); ASSERT_EQ(cmd, static_cast<CameraParam>(aNotification1.payload[0])); for (auto&& v : values) { - ASSERT_EQ(v, static_cast<int32_t>(aNotification0.payload[1])); - ASSERT_EQ(v, static_cast<int32_t>(aNotification1.payload[1])); + ASSERT_EQ(v, aNotification0.payload[1]); + ASSERT_EQ(v, aNotification1.payload[1]); } } @@ -1461,8 +1470,9 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(CameraParam::AUTO_FOCUS); - aTargetEvent.payload[1] = 0; + aTargetEvent.payload.push_back( + static_cast<int32_t>(CameraParam::AUTO_FOCUS)); + aTargetEvent.payload.push_back(0); if (!frameHandler0->waitForEvent(aTargetEvent, aNotification)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1504,8 +1514,8 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cam1Cmds[0]); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cam1Cmds[0])); + aTargetEvent.payload.push_back(val0); if (!frameHandler1->waitForEvent(aTargetEvent, aNotification)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1533,9 +1543,10 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { // Verify a change notification ASSERT_EQ(static_cast<EvsEventType>(aNotification.aType), EvsEventType::PARAMETER_CHANGED); + ASSERT_GE(aNotification.payload.size(), 2); ASSERT_EQ(static_cast<CameraParam>(aNotification.payload[0]), cam1Cmds[0]); for (auto&& v : values) { - ASSERT_EQ(v, static_cast<int32_t>(aNotification.payload[1])); + ASSERT_EQ(v, aNotification.payload[1]); } listener = std::thread([&frameHandler1, &aNotification, &listening, &eventCond] { @@ -1582,8 +1593,9 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(CameraParam::AUTO_FOCUS); - aTargetEvent.payload[1] = 0; + aTargetEvent.payload.push_back( + static_cast<int32_t>(CameraParam::AUTO_FOCUS)); + aTargetEvent.payload.push_back(0); if (!frameHandler1->waitForEvent(aTargetEvent, aNotification)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1621,8 +1633,8 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::PARAMETER_CHANGED; - aTargetEvent.payload[0] = static_cast<uint32_t>(cam0Cmds[0]); - aTargetEvent.payload[1] = val0; + aTargetEvent.payload.push_back(static_cast<int32_t>(cam0Cmds[0])); + aTargetEvent.payload.push_back(val0); if (!frameHandler0->waitForEvent(aTargetEvent, aNotification)) { LOG(WARNING) << "A timer is expired before a target event is fired."; } @@ -1646,9 +1658,10 @@ TEST_P(EvsAidlTest, HighPriorityCameraClient) { } // Verify a change notification ASSERT_EQ(static_cast<EvsEventType>(aNotification.aType), EvsEventType::PARAMETER_CHANGED); + ASSERT_GE(aNotification.payload.size(), 2); ASSERT_EQ(static_cast<CameraParam>(aNotification.payload[0]), cam0Cmds[0]); for (auto&& v : values) { - ASSERT_EQ(v, static_cast<int32_t>(aNotification.payload[1])); + ASSERT_EQ(v, aNotification.payload[1]); } // Turn off the display (yes, before the stream stops -- it should be handled) diff --git a/automotive/sv/1.0/default/Android.bp b/automotive/sv/1.0/default/Android.bp index da974a0509..82e11a837a 100644 --- a/automotive/sv/1.0/default/Android.bp +++ b/automotive/sv/1.0/default/Android.bp @@ -29,9 +29,7 @@ cc_binary { relative_install_path: "hw", srcs: [ "service.cpp", - "SurroundViewService.cpp", - "SurroundView2dSession.cpp", - "SurroundView3dSession.cpp", + ":automotiveSvV1.0_sources", ], init_rc: ["android.hardware.automotive.sv@1.0-service.rc"], vintf_fragments: ["android.hardware.automotive.sv@1.0-service.xml"], @@ -54,3 +52,17 @@ cc_binary { "-g", ], } + +filegroup { + name: "automotiveSvV1.0_sources", + srcs: [ + "SurroundViewService.cpp", + "SurroundView2dSession.cpp", + "SurroundView3dSession.cpp", + ], +} + +cc_library_headers { + name: "automotiveSvV1.0_headers", + export_include_dirs: ["."], +} diff --git a/automotive/sv/1.0/default/tests/fuzzer/Android.bp b/automotive/sv/1.0/default/tests/fuzzer/Android.bp new file mode 100644 index 0000000000..394c532631 --- /dev/null +++ b/automotive/sv/1.0/default/tests/fuzzer/Android.bp @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2022 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 { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "hardware_interfaces_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["hardware_interfaces_license"], +} + +cc_fuzz { + name: "automotiveSvV1.0_fuzzer", + srcs: [ + "AutomotiveSvV1_0Fuzzer.cpp", + "SurroundViewStream.cpp", + ":automotiveSvV1.0_sources", + ], + header_libs: [ + "automotiveSvV1.0_headers", + ], + shared_libs: [ + "android.hardware.automotive.sv@1.0", + "android.hidl.allocator@1.0", + "libhidlbase", + "libutils", + "libhidlmemory", + "liblog", + ], + fuzz_config: { + cc: [ + "android-media-fuzzing-reports@google.com", + ], + componentid: 533764, + }, +} diff --git a/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.cpp b/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.cpp new file mode 100644 index 0000000000..98834f5561 --- /dev/null +++ b/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.cpp @@ -0,0 +1,433 @@ +/* + * Copyright (C) 2022 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. + * + */ + +#include "AutomotiveSvV1_0Fuzzer.h" +#include <SurroundViewStream.h> +#include <android/hidl/allocator/1.0/IAllocator.h> +#include <hidlmemory/mapping.h> + +namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer { + +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hidl::allocator::V1_0::IAllocator; + +constexpr uint32_t kMinConfigDimension = 0; +constexpr uint32_t kMaxConfigDimension = 4096; +constexpr uint32_t kVertexByteSize = (3 * sizeof(float)) + 4; +constexpr uint32_t kIdByteSize = 2; +constexpr size_t kMaxCharacters = 30; +constexpr size_t kMaxVertices = 10; +constexpr size_t kMaxCameraPoints = 10; +constexpr size_t kMaxViews = 10; +constexpr size_t kMaxOverlays = 10; +constexpr size_t kMinSvBuffers = 0; +constexpr size_t kMaxSvBuffers = 10; + +void SurroundViewFuzzer::invoke2dSessionAPI() { + sp<ISurroundView2dSession> surroundView2dSession; + + while (mFuzzedDataProvider.remaining_bytes() > 0) { + auto surroundView2dFunc = mFuzzedDataProvider.PickValueInArray< + const std::function<void()>>({ + [&]() { + mSurroundViewService->start2dSession( + [&surroundView2dSession](const sp<ISurroundView2dSession>& session, + SvResult result) { + if (result == SvResult::OK) { + surroundView2dSession = session; + } + }); + }, + [&]() { + if (surroundView2dSession) { + sp<SurroundViewStream> handler = + sp<SurroundViewStream>::make(surroundView2dSession); + surroundView2dSession->startStream(handler); + mIs2dStreamStarted = true; + } + }, + [&]() { + if (surroundView2dSession) { + surroundView2dSession->get2dMappingInfo( + []([[maybe_unused]] Sv2dMappingInfo info) {}); + } + }, + [&]() { + if (surroundView2dSession) { + Sv2dConfig config; + config.width = mFuzzedDataProvider.ConsumeIntegralInRange<uint32_t>( + kMinConfigDimension, kMaxConfigDimension); + if (mFuzzedDataProvider.ConsumeBool()) { + config.blending = static_cast<SvQuality>( + mFuzzedDataProvider.ConsumeIntegral<uint32_t>()); + } else { + config.blending = mFuzzedDataProvider.ConsumeBool() ? (SvQuality::HIGH) + : (SvQuality::LOW); + } + surroundView2dSession->set2dConfig(config); + } + }, + [&]() { + if (surroundView2dSession) { + surroundView2dSession->get2dConfig([&](Sv2dConfig) {}); + } + }, + [&]() { + if (surroundView2dSession) { + hidl_vec<Point2dInt> points2dCamera; + const size_t camPoints = mFuzzedDataProvider.ConsumeIntegralInRange<size_t>( + 1, kMaxCameraPoints); + points2dCamera.resize(camPoints); + for (size_t i = 0; i < camPoints; ++i) { + points2dCamera[i].x = mFuzzedDataProvider.ConsumeFloatingPoint<float>(); + points2dCamera[i].y = mFuzzedDataProvider.ConsumeFloatingPoint<float>(); + } + + hidl_vec<hidl_string> cameraIds; + mSurroundViewService->getCameraIds( + [&cameraIds](const hidl_vec<hidl_string>& camIds) { + cameraIds = camIds; + }); + hidl_string cameraId; + if (cameraIds.size() > 0 && mFuzzedDataProvider.ConsumeBool()) { + const size_t cameraIndex = + mFuzzedDataProvider.ConsumeIntegralInRange<size_t>( + 0, cameraIds.size() - 1); + cameraId = cameraIds[cameraIndex]; + } else { + cameraId = + mFuzzedDataProvider.ConsumeRandomLengthString(kMaxCharacters); + } + surroundView2dSession->projectCameraPoints( + points2dCamera, cameraId, + []([[maybe_unused]] const hidl_vec<Point2dFloat>& outPoints) {}); + } + }, + [&]() { + if (surroundView2dSession) { + SvFramesDesc frames; + frames.timestampNs = mFuzzedDataProvider.ConsumeIntegral<uint64_t>(); + frames.sequenceId = mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + size_t numSvBuffers = mFuzzedDataProvider.ConsumeIntegralInRange<size_t>( + kMinSvBuffers, kMaxSvBuffers); + frames.svBuffers.resize(numSvBuffers); + for (int i = 0; i < numSvBuffers; ++i) { + frames.svBuffers[i].viewId = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + frames.svBuffers[i].hardwareBuffer.nativeHandle = new native_handle_t(); + frames.svBuffers[i].hardwareBuffer.description[0] = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + frames.svBuffers[i].hardwareBuffer.description[1] = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + } + surroundView2dSession->doneWithFrames(frames); + for (int i = 0; i < numSvBuffers; ++i) { + delete frames.svBuffers[i].hardwareBuffer.nativeHandle; + } + } + }, + [&]() { + if (surroundView2dSession) { + surroundView2dSession->stopStream(); + mIs2dStreamStarted = false; + } + }, + [&]() { + mSurroundViewService->stop2dSession( + mFuzzedDataProvider.ConsumeBool() ? surroundView2dSession : nullptr); + }, + }); + surroundView2dFunc(); + } + + if (surroundView2dSession && mIs2dStreamStarted) { + surroundView2dSession->stopStream(); + } +} + +void SurroundViewFuzzer::invoke3dSessionAPI() { + sp<ISurroundView3dSession> surroundView3dSession; + while (mFuzzedDataProvider.remaining_bytes() > 0) { + auto surroundView3dFunc = mFuzzedDataProvider.PickValueInArray< + const std::function<void()>>({ + [&]() { + mSurroundViewService->start3dSession( + [&surroundView3dSession](const sp<ISurroundView3dSession>& session, + SvResult result) { + if (result == SvResult::OK) { + surroundView3dSession = session; + } + }); + }, + [&]() { + if (surroundView3dSession) { + sp<SurroundViewStream> handler = + sp<SurroundViewStream>::make(surroundView3dSession); + surroundView3dSession->startStream(handler); + mIs3dStreamStarted = true; + } + }, + [&]() { + if (surroundView3dSession) { + const size_t numViews = + mFuzzedDataProvider.ConsumeIntegralInRange<size_t>(1, kMaxViews); + std::vector<View3d> views(numViews); + for (size_t i = 0; i < numViews; ++i) { + views[i].viewId = mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + } + surroundView3dSession->setViews(views); + } + }, + [&]() { + if (surroundView3dSession) { + Sv3dConfig config; + config.width = mFuzzedDataProvider.ConsumeIntegralInRange<uint32_t>( + kMinConfigDimension, kMaxConfigDimension); + config.height = mFuzzedDataProvider.ConsumeIntegralInRange<uint32_t>( + kMinConfigDimension, kMaxConfigDimension); + if (mFuzzedDataProvider.ConsumeBool()) { + config.carDetails = static_cast<SvQuality>( + mFuzzedDataProvider.ConsumeIntegral<uint32_t>()); + } else { + config.carDetails = mFuzzedDataProvider.ConsumeBool() + ? (SvQuality::HIGH) + : (SvQuality::LOW); + } + surroundView3dSession->set3dConfig(config); + } + }, + [&]() { + if (surroundView3dSession) { + surroundView3dSession->get3dConfig([&](Sv3dConfig) {}); + } + }, + [&]() { + if (surroundView3dSession) { + Point2dInt cameraPoint; + cameraPoint.x = mFuzzedDataProvider.ConsumeFloatingPoint<float>(); + cameraPoint.y = mFuzzedDataProvider.ConsumeFloatingPoint<float>(); + std::vector<Point2dInt> cameraPoints = {cameraPoint}; + hidl_vec<hidl_string> cameraIds; + mSurroundViewService->getCameraIds( + [&cameraIds](const hidl_vec<hidl_string>& camIds) { + cameraIds = camIds; + }); + hidl_string cameraId; + if (cameraIds.size() > 0 && mFuzzedDataProvider.ConsumeBool()) { + const size_t cameraIndex = + mFuzzedDataProvider.ConsumeIntegralInRange<size_t>( + 0, cameraIds.size() - 1); + cameraId = cameraIds[cameraIndex]; + } else { + cameraId = + mFuzzedDataProvider.ConsumeRandomLengthString(kMaxCharacters); + } + std::vector<Point3dFloat> points3d; + surroundView3dSession->projectCameraPointsTo3dSurface( + cameraPoints, cameraId, + [&points3d]([[maybe_unused]] const hidl_vec<Point3dFloat>& + points3dproj) { points3d = points3dproj; }); + } + }, + [&]() { + if (surroundView3dSession) { + // success case + surroundView3dSession->updateOverlays(mOverlaysdata); + } + }, + [&]() { + if (surroundView3dSession) { + initSampleOverlaysData(); + // Fail with ID mismatch + // Set id of second overlay in shared memory to 2 (expected is 1). + auto& overlaysDescVector = mOverlaysdata.overlaysMemoryDesc; + auto& pIMemory = mMemory; + int32_t indexPosition = mFuzzedDataProvider.ConsumeIntegralInRange<int32_t>( + 0, mNumOverlays - 1); + int32_t mismatchedValueIndex = + mFuzzedDataProvider.ConsumeIntegralInRange<int32_t>( + 0, mNumOverlays - 1); + setIndexOfOverlaysMemory(overlaysDescVector, pIMemory, indexPosition, + overlaysDescVector[mismatchedValueIndex].id); + surroundView3dSession->updateOverlays(mOverlaysdata); + } + }, + [&]() { + if (surroundView3dSession) { + // Fail with NULL memory + // Set shared memory to null. + mOverlaysdata.overlaysMemory = hidl_memory(); + surroundView3dSession->updateOverlays(mOverlaysdata); + } + }, + [&]() { + if (surroundView3dSession) { + SvFramesDesc frames; + frames.timestampNs = mFuzzedDataProvider.ConsumeIntegral<uint64_t>(); + frames.sequenceId = mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + size_t numSvBuffers = mFuzzedDataProvider.ConsumeIntegralInRange<size_t>( + kMinSvBuffers, kMaxSvBuffers); + frames.svBuffers.resize(numSvBuffers); + for (int i = 0; i < numSvBuffers; ++i) { + frames.svBuffers[i].viewId = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + frames.svBuffers[i].hardwareBuffer.nativeHandle = new native_handle_t(); + frames.svBuffers[i].hardwareBuffer.description[0] = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + frames.svBuffers[i].hardwareBuffer.description[1] = + mFuzzedDataProvider.ConsumeIntegral<uint32_t>(); + } + surroundView3dSession->doneWithFrames(frames); + for (int i = 0; i < numSvBuffers; ++i) { + delete frames.svBuffers[i].hardwareBuffer.nativeHandle; + } + } + }, + [&]() { + if (surroundView3dSession) { + surroundView3dSession->stopStream(); + mIs3dStreamStarted = false; + } + }, + [&]() { + mSurroundViewService->stop3dSession( + mFuzzedDataProvider.ConsumeBool() ? surroundView3dSession : nullptr); + }, + }); + surroundView3dFunc(); + } + if (surroundView3dSession && mIs3dStreamStarted) { + surroundView3dSession->stopStream(); + } +} + +void SurroundViewFuzzer::process() { + mFuzzedDataProvider.ConsumeBool() ? invoke2dSessionAPI() : invoke3dSessionAPI(); +} + +std::pair<hidl_memory, sp<IMemory>> SurroundViewFuzzer::getMappedSharedMemory(int32_t bytesSize) { + const auto nullResult = std::make_pair(hidl_memory(), nullptr); + + sp<IAllocator> ashmemAllocator = IAllocator::getService("ashmem"); + if (ashmemAllocator.get() == nullptr) { + return nullResult; + } + + // Allocate shared memory. + hidl_memory hidlMemory; + bool allocateSuccess = false; + Return<void> result = + ashmemAllocator->allocate(bytesSize, [&](bool success, const hidl_memory& hidlMem) { + if (!success) { + return; + } + allocateSuccess = success; + hidlMemory = hidlMem; + }); + + // Check result of allocated memory. + if (!result.isOk() || !allocateSuccess) { + return nullResult; + } + + // Map shared memory. + sp<IMemory> pIMemory = mapMemory(hidlMemory); + if (pIMemory.get() == nullptr) { + return nullResult; + } + + return std::make_pair(hidlMemory, pIMemory); +} + +void SurroundViewFuzzer::setIndexOfOverlaysMemory( + const std::vector<OverlayMemoryDesc>& overlaysMemDesc, sp<IMemory> pIMemory, + int32_t indexPosition, uint16_t indexValue) { + // Count the number of vertices until the index. + int32_t totalVerticesCount = 0; + for (int32_t i = 0; i < indexPosition; ++i) { + totalVerticesCount += overlaysMemDesc[i].verticesCount; + } + + const int32_t indexBytePosition = + (indexPosition * kIdByteSize) + (kVertexByteSize * totalVerticesCount); + + uint8_t* pSharedMemoryData = (uint8_t*)((void*)pIMemory->getPointer()); + pSharedMemoryData += indexBytePosition; + uint16_t* pIndex16bit = (uint16_t*)pSharedMemoryData; + + // Modify shared memory. + pIMemory->update(); + *pIndex16bit = indexValue; + pIMemory->commit(); +} + +void SurroundViewFuzzer::initSampleOverlaysData() { + const size_t mNumOverlays = + mFuzzedDataProvider.ConsumeIntegralInRange<size_t>(kMinOverlays, kMaxOverlays); + mOverlaysdata.overlaysMemoryDesc.resize(mNumOverlays); + + int32_t sharedMemBytesSize = 0; + std::vector<OverlayMemoryDesc> overlaysDescVector = {}; + OverlayMemoryDesc overlayMemDesc[mNumOverlays]; + for (size_t i = 0; i < mNumOverlays; ++i) { + overlayMemDesc[i].id = i; + overlayMemDesc[i].verticesCount = + mFuzzedDataProvider.ConsumeIntegralInRange<size_t>(1, kMaxVertices); + overlayMemDesc[i].overlayPrimitive = mFuzzedDataProvider.ConsumeBool() + ? (OverlayPrimitive::TRIANGLES) + : (OverlayPrimitive::TRIANGLES_STRIP); + mOverlaysdata.overlaysMemoryDesc[i] = overlayMemDesc[i]; + + sharedMemBytesSize += kIdByteSize + kVertexByteSize * overlayMemDesc[i].verticesCount; + overlaysDescVector.push_back(overlayMemDesc[i]); + } + + std::pair<hidl_memory, sp<IMemory>> sharedMem = getMappedSharedMemory(sharedMemBytesSize); + sp<IMemory> pIMemory = std::get<1>(sharedMem); + if (pIMemory.get() == nullptr) { + mOverlaysdata = OverlaysData(); + mMemory = nullptr; + return; + } + + // Get pointer to shared memory data and set all bytes to 0. + uint8_t* pSharedMemoryData = (uint8_t*)((void*)pIMemory->getPointer()); + pIMemory->update(); + memset(pSharedMemoryData, 0, sharedMemBytesSize); + pIMemory->commit(); + + // Set indexes in shared memory. + for (size_t i = 0; i < mNumOverlays; ++i) { + setIndexOfOverlaysMemory(overlaysDescVector, pIMemory, i, overlayMemDesc[i].id); + } + + mOverlaysdata.overlaysMemoryDesc = overlaysDescVector; + mOverlaysdata.overlaysMemory = std::get<0>(sharedMem); + mMemory = pIMemory; +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + if (size < 1) { + return 0; + } + SurroundViewFuzzer surroundViewFuzzer(data, size); + surroundViewFuzzer.process(); + return 0; +} +} // namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer diff --git a/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.h b/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.h new file mode 100644 index 0000000000..23e5a313b2 --- /dev/null +++ b/automotive/sv/1.0/default/tests/fuzzer/AutomotiveSvV1_0Fuzzer.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2022 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. + * + */ +#pragma once +#include <SurroundViewService.h> +#include <android/hidl/memory/1.0/IMemory.h> +#include <fuzzer/FuzzedDataProvider.h> + +namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer { + +using ::android::sp; +using ::android::hidl::memory::V1_0::IMemory; + +constexpr size_t kMinOverlays = 2; + +class SurroundViewFuzzer { + public: + SurroundViewFuzzer(const uint8_t* data, size_t size) : mFuzzedDataProvider(data, size) { + mSurroundViewService = sp<SurroundViewService>::make(); + } + ~SurroundViewFuzzer() = default; + void process(); + + private: + void invoke2dSessionAPI(); + void invoke3dSessionAPI(); + std::pair<hidl_memory, sp<IMemory>> getMappedSharedMemory(int32_t bytesSize); + void initSampleOverlaysData(); + void setIndexOfOverlaysMemory(const std::vector<OverlayMemoryDesc>& overlaysMemDesc, + sp<IMemory> pIMemory, int32_t indexPosition, uint16_t indexValue); + OverlaysData mOverlaysdata = {}; + size_t mNumOverlays = kMinOverlays; + sp<IMemory> mMemory = nullptr; + FuzzedDataProvider mFuzzedDataProvider; + sp<SurroundViewService> mSurroundViewService = nullptr; + bool mIs2dStreamStarted = false; + bool mIs3dStreamStarted = false; +}; +} // namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer diff --git a/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.cpp b/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.cpp new file mode 100644 index 0000000000..b81a08c24a --- /dev/null +++ b/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2022 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. + */ + +#include "SurroundViewStream.h" + +namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer { + +using std::lock_guard; + +SurroundViewStream::SurroundViewStream(sp<ISurroundViewSession> pSession) + : mSession(pSession), mReceiveFramesCount(0) {} + +Return<void> SurroundViewStream::notify(SvEvent svEvent) { + lock_guard<mutex> lock(mLock); + switch (svEvent) { + case SvEvent::STREAM_STARTED: + case SvEvent::CONFIG_UPDATED: + case SvEvent::STREAM_STOPPED: + case SvEvent::FRAME_DROPPED: + case SvEvent::TIMEOUT: + mReceivedEvents.emplace_back(svEvent); + break; + default: + break; + } + + return android::hardware::Void(); +} + +Return<void> SurroundViewStream::receiveFrames(const SvFramesDesc& svFramesDesc) { + lock_guard<mutex> lock(mLock); + if ((mLastReceivedFrames.timestampNs >= svFramesDesc.timestampNs || + mLastReceivedFrames.sequenceId >= svFramesDesc.sequenceId) && + mReceiveFramesCount != 0) { + // The incoming frames are with invalid timestamp or sequenceId + mAllFramesValid = false; + } + + for (int i = 0; i < svFramesDesc.svBuffers.size(); ++i) { + if (svFramesDesc.svBuffers[i].hardwareBuffer.nativeHandle == nullptr) { + mAllFramesValid = false; + // The incoming frames are with invalid nativeHandle + break; + } + } + + ++mReceiveFramesCount; + + // Store all the information except for the handle + mLastReceivedFrames.timestampNs = svFramesDesc.timestampNs; + mLastReceivedFrames.sequenceId = svFramesDesc.sequenceId; + mLastReceivedFrames.svBuffers.resize(svFramesDesc.svBuffers.size()); + for (int i = 0; i < svFramesDesc.svBuffers.size(); ++i) { + mLastReceivedFrames.svBuffers[i].viewId = svFramesDesc.svBuffers[i].viewId; + mLastReceivedFrames.svBuffers[i].hardwareBuffer.description = + svFramesDesc.svBuffers[i].hardwareBuffer.description; + } + + return android::hardware::Void(); +} +} // namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer diff --git a/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.h b/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.h new file mode 100644 index 0000000000..8135bc1631 --- /dev/null +++ b/automotive/sv/1.0/default/tests/fuzzer/SurroundViewStream.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022 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. + */ + +#pragma once + +#include <android/hardware/automotive/sv/1.0/ISurroundViewSession.h> +#include <android/hardware/automotive/sv/1.0/ISurroundViewStream.h> +#include <android/hardware/automotive/sv/1.0/types.h> + +#include <thread> +#include <vector> + +namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer { + +using android::sp; +using android::hardware::Return; +using std::mutex; +using std::vector; + +class SurroundViewStream : public ISurroundViewStream { + public: + SurroundViewStream(sp<ISurroundViewSession> session); + + Return<void> notify(SvEvent svEvent) override; + Return<void> receiveFrames(const SvFramesDesc& svFramesDesc) override; + + bool checkEventReceived(SvEvent svEvent); + SvFramesDesc getLastReceivedFrames(); + int getReceiveFramesCount(); + bool areAllFramesValid(); + void setDoNotReturnFrames(bool flag); + + private: + mutex mLock; + + vector<SvEvent> mReceivedEvents; + sp<ISurroundViewSession> mSession; + SvFramesDesc mLastReceivedFrames; + int mReceiveFramesCount; + bool mAllFramesValid = true; +}; +} // namespace android::hardware::automotive::sv::V1_0::implementation::fuzzer diff --git a/automotive/vehicle/aidl/Android.bp b/automotive/vehicle/aidl/Android.bp index 1ca62ac207..9aeb4d2c78 100644 --- a/automotive/vehicle/aidl/Android.bp +++ b/automotive/vehicle/aidl/Android.bp @@ -41,4 +41,11 @@ aidl_interface { ], }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h index fda0da929b..4d96fd38ae 100644 --- a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +++ b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h @@ -292,8 +292,9 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { .prop = toInt(VehicleProperty::EV_CHARGE_CURRENT_DRAW_LIMIT), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, + .configArray = {/*max current draw allowed by vehicle in amperes=*/20}, }, - .initialValue = {.floatValues = {(float)VehicleUnit::AMPERE}}}, + .initialValue = {.floatValues = {(float)12.5}}}, {.config = { diff --git a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp index b2417bd242..902fb40c6b 100644 --- a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp +++ b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp @@ -71,7 +71,7 @@ TEST(WorkerThreadTest, ScheduleReturnsFalseWhenQueueIsFull) { TEST(WorkerThreadTest, TasksExecuteInOrder) { constexpr int NUM_TASKS = 10000; - WorkerThread worker(NUM_TASKS); + WorkerThread worker(NUM_TASKS + 1); std::mutex mut; std::condition_variable cv; diff --git a/camera/common/aidl/Android.bp b/camera/common/aidl/Android.bp index 39857efc95..19de22d586 100644 --- a/camera/common/aidl/Android.bp +++ b/camera/common/aidl/Android.bp @@ -25,4 +25,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/.hash b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/.hash new file mode 100644 index 0000000000..84cd552c29 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/.hash @@ -0,0 +1 @@ +d1a423213d80e15de2b10e54d908ac5c29644fef diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraDeviceStatus.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraDeviceStatus.aidl new file mode 100644 index 0000000000..a53a914884 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraDeviceStatus.aidl @@ -0,0 +1,40 @@ +/* + * 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.camera.common; +@Backing(type="int") @VintfStability +enum CameraDeviceStatus { + NOT_PRESENT = 0, + PRESENT = 1, + ENUMERATING = 2, +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraMetadataType.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraMetadataType.aidl new file mode 100644 index 0000000000..287dea3ffc --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraMetadataType.aidl @@ -0,0 +1,43 @@ +/* + * 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.camera.common; +@Backing(type="int") @VintfStability +enum CameraMetadataType { + BYTE = 0, + INT32 = 1, + FLOAT = 2, + INT64 = 3, + DOUBLE = 4, + RATIONAL = 5, +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraResourceCost.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraResourceCost.aidl new file mode 100644 index 0000000000..467f4510af --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/CameraResourceCost.aidl @@ -0,0 +1,39 @@ +/* + * 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.camera.common; +@VintfStability +parcelable CameraResourceCost { + int resourceCost; + String[] conflictingDevices; +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/Status.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/Status.aidl new file mode 100644 index 0000000000..86589276e7 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/Status.aidl @@ -0,0 +1,44 @@ +/* + * 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.camera.common; +@Backing(type="int") @VintfStability +enum Status { + OK = 0, + ILLEGAL_ARGUMENT = 1, + CAMERA_IN_USE = 2, + MAX_CAMERAS_IN_USE = 3, + OPERATION_NOT_SUPPORTED = 4, + CAMERA_DISCONNECTED = 5, + INTERNAL_ERROR = 6, +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TagBoundaryId.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TagBoundaryId.aidl new file mode 100644 index 0000000000..cd5048347e --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TagBoundaryId.aidl @@ -0,0 +1,39 @@ +/* + * 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.camera.common; +@Backing(type="long") @VintfStability +enum TagBoundaryId { + AOSP = 0, + VENDOR = 2147483648, +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TorchModeStatus.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TorchModeStatus.aidl new file mode 100644 index 0000000000..cb1a2ae3d3 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/TorchModeStatus.aidl @@ -0,0 +1,40 @@ +/* + * 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.camera.common; +@Backing(type="int") @VintfStability +enum TorchModeStatus { + NOT_AVAILABLE = 0, + AVAILABLE_OFF = 1, + AVAILABLE_ON = 2, +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTag.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTag.aidl new file mode 100644 index 0000000000..b8b4ef4a38 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTag.aidl @@ -0,0 +1,40 @@ +/* + * 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.camera.common; +@VintfStability +parcelable VendorTag { + int tagId; + String tagName; + android.hardware.camera.common.CameraMetadataType tagType; +} diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTagSection.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTagSection.aidl new file mode 100644 index 0000000000..140fba4545 --- /dev/null +++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/1/android/hardware/camera/common/VendorTagSection.aidl @@ -0,0 +1,39 @@ +/* + * 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.camera.common; +@VintfStability +parcelable VendorTagSection { + String sectionName; + android.hardware.camera.common.VendorTag[] tags; +} diff --git a/camera/metadata/aidl/Android.bp b/camera/metadata/aidl/Android.bp index c5f16e64d9..31d4b4d62c 100644 --- a/camera/metadata/aidl/Android.bp +++ b/camera/metadata/aidl/Android.bp @@ -25,4 +25,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp index bde56b315c..462698c87a 100644 --- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp +++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp @@ -1554,7 +1554,7 @@ TEST_P(CameraAidlTest, processMultiCaptureRequestPreview) { CaptureRequest& request = requests[0]; request.frameNumber = frameNumber; request.fmqSettingsSize = 0; - request.settings.metadata = settings; + request.settings = settingsMetadata; std::vector<StreamBuffer>& outputBuffers = request.outputBuffers; diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml index 8b3830a373..acee459ca0 100644 --- a/compatibility_matrices/compatibility_matrix.current.xml +++ b/compatibility_matrices/compatibility_matrix.current.xml @@ -277,9 +277,9 @@ <instance>default</instance> </interface> </hal> - <hal format="hidl" optional="false"> + <hal format="hidl" optional="true"> <name>android.hardware.graphics.allocator</name> - <!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test --> + <!-- New, non-Go devices should use 4.0 or the AIDL hal. --> <version>2.0</version> <version>3.0</version> <version>4.0</version> diff --git a/contexthub/aidl/Android.bp b/contexthub/aidl/Android.bp index 5926b776e1..a8654455e7 100644 --- a/contexthub/aidl/Android.bp +++ b/contexthub/aidl/Android.bp @@ -35,4 +35,11 @@ aidl_interface { apps_enabled: false, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/.hash b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/.hash new file mode 100644 index 0000000000..b01d289b28 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/.hash @@ -0,0 +1 @@ +10abe2e5202d9b80ccebf5f6376d711a9a212b27 diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/AsyncEventType.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/AsyncEventType.aidl new file mode 100644 index 0000000000..8e0ff89c12 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/AsyncEventType.aidl @@ -0,0 +1,38 @@ +/* + * 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.contexthub; +@Backing(type="int") @VintfStability +enum AsyncEventType { + RESTARTED = 1, +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubInfo.aidl new file mode 100644 index 0000000000..e5735566e7 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubInfo.aidl @@ -0,0 +1,48 @@ +/* + * 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.contexthub; +@VintfStability +parcelable ContextHubInfo { + String name; + String vendor; + String toolchain; + int id; + float peakMips; + int maxSupportedMessageLengthBytes; + long chrePlatformId; + byte chreApiMajorVersion; + byte chreApiMinorVersion; + char chrePatchVersion; + String[] supportedPermissions; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubMessage.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubMessage.aidl new file mode 100644 index 0000000000..e38c251928 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/ContextHubMessage.aidl @@ -0,0 +1,42 @@ +/* + * 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.contexthub; +@VintfStability +parcelable ContextHubMessage { + long nanoappId; + char hostEndPoint; + int messageType; + byte[] messageBody; + String[] permissions; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/HostEndpointInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/HostEndpointInfo.aidl new file mode 100644 index 0000000000..84e8531eb9 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/HostEndpointInfo.aidl @@ -0,0 +1,46 @@ +/* + * 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.contexthub; +@VintfStability +parcelable HostEndpointInfo { + char hostEndpointId; + android.hardware.contexthub.HostEndpointInfo.Type type; + @nullable String packageName; + @nullable String attributionTag; + @Backing(type="int") @VintfStability + enum Type { + FRAMEWORK = 1, + APP = 2, + } +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHub.aidl new file mode 100644 index 0000000000..f0676bec74 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHub.aidl @@ -0,0 +1,49 @@ +/* + * 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.contexthub; +@VintfStability +interface IContextHub { + List<android.hardware.contexthub.ContextHubInfo> getContextHubs(); + void loadNanoapp(in int contextHubId, in android.hardware.contexthub.NanoappBinary appBinary, in int transactionId); + void unloadNanoapp(in int contextHubId, in long appId, in int transactionId); + void disableNanoapp(in int contextHubId, in long appId, in int transactionId); + void enableNanoapp(in int contextHubId, in long appId, in int transactionId); + void onSettingChanged(in android.hardware.contexthub.Setting setting, in boolean enabled); + void queryNanoapps(in int contextHubId); + void registerCallback(in int contextHubId, in android.hardware.contexthub.IContextHubCallback cb); + void sendMessageToHub(in int contextHubId, in android.hardware.contexthub.ContextHubMessage message); + void onHostEndpointConnected(in android.hardware.contexthub.HostEndpointInfo hostEndpointInfo); + void onHostEndpointDisconnected(char hostEndpointId); + const int EX_CONTEXT_HUB_UNSPECIFIED = -1; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHubCallback.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHubCallback.aidl new file mode 100644 index 0000000000..f81f7cfdee --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/IContextHubCallback.aidl @@ -0,0 +1,41 @@ +/* + * 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.contexthub; +@VintfStability +interface IContextHubCallback { + void handleNanoappInfo(in android.hardware.contexthub.NanoappInfo[] appInfo); + void handleContextHubMessage(in android.hardware.contexthub.ContextHubMessage msg, in String[] msgContentPerms); + void handleContextHubAsyncEvent(in android.hardware.contexthub.AsyncEventType evt); + void handleTransactionResult(in int transactionId, in boolean success); +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappBinary.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappBinary.aidl new file mode 100644 index 0000000000..d53b28f943 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappBinary.aidl @@ -0,0 +1,46 @@ +/* + * 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.contexthub; +@VintfStability +parcelable NanoappBinary { + long nanoappId; + int nanoappVersion; + int flags; + byte targetChreApiMajorVersion; + byte targetChreApiMinorVersion; + byte[] customBinary; + const int FLAG_SIGNED = 1; + const int FLAG_ENCRYPTED = 2; + const int FLAG_TCM_CAPABLE = 4; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappInfo.aidl new file mode 100644 index 0000000000..7175d7f329 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappInfo.aidl @@ -0,0 +1,42 @@ +/* + * 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.contexthub; +@VintfStability +parcelable NanoappInfo { + long nanoappId; + int nanoappVersion; + boolean enabled; + String[] permissions; + android.hardware.contexthub.NanoappRpcService[] rpcServices; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappRpcService.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappRpcService.aidl new file mode 100644 index 0000000000..a6a1644195 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/NanoappRpcService.aidl @@ -0,0 +1,39 @@ +/* + * 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.contexthub; +@VintfStability +parcelable NanoappRpcService { + long id; + int version; +} diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/Setting.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/Setting.aidl new file mode 100644 index 0000000000..d998478db6 --- /dev/null +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/1/android/hardware/contexthub/Setting.aidl @@ -0,0 +1,44 @@ +/* + * 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.contexthub; +@Backing(type="byte") @VintfStability +enum Setting { + LOCATION = 1, + WIFI_MAIN = 2, + WIFI_SCANNING = 3, + AIRPLANE_MODE = 4, + MICROPHONE = 5, + BT_MAIN = 6, + BT_SCANNING = 7, +} diff --git a/drm/aidl/Android.bp b/drm/aidl/Android.bp index 1d97e80aca..0fdba31c84 100644 --- a/drm/aidl/Android.bp +++ b/drm/aidl/Android.bp @@ -30,4 +30,11 @@ aidl_interface { }, }, double_loadable: true, + versions_with_info: [ + { + version: "1", + imports: ["android.hardware.common-V2"], + }, + ], + } diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/.hash b/drm/aidl/aidl_api/android.hardware.drm/1/.hash new file mode 100644 index 0000000000..886e28c0cb --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/.hash @@ -0,0 +1 @@ +7b4b0a0f36a7a6bb22d2016375e4a9d4a033592f diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/CryptoSchemes.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/CryptoSchemes.aidl new file mode 100644 index 0000000000..1d3c293eca --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/CryptoSchemes.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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.drm; +@VintfStability +parcelable CryptoSchemes { + List<android.hardware.drm.Uuid> uuids; + List<android.hardware.drm.SupportedContentType> mimeTypes; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DecryptArgs.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DecryptArgs.aidl new file mode 100644 index 0000000000..9c574a48ef --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DecryptArgs.aidl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 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.drm; +@VintfStability +parcelable DecryptArgs { + boolean secure; + byte[] keyId; + byte[] iv; + android.hardware.drm.Mode mode; + android.hardware.drm.Pattern pattern; + android.hardware.drm.SubSample[] subSamples; + android.hardware.drm.SharedBuffer source; + long offset; + android.hardware.drm.DestinationBuffer destination; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DestinationBuffer.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DestinationBuffer.aidl new file mode 100644 index 0000000000..8c3ba7d0b7 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DestinationBuffer.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +union DestinationBuffer { + android.hardware.drm.SharedBuffer nonsecureMemory; + android.hardware.common.NativeHandle secureMemory; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetric.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetric.aidl new file mode 100644 index 0000000000..c78dff0b16 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetric.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@VintfStability +parcelable DrmMetric { + String name; + List<android.hardware.drm.DrmMetricNamedValue> attributes; + List<android.hardware.drm.DrmMetricNamedValue> values; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricGroup.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricGroup.aidl new file mode 100644 index 0000000000..4128eaa54d --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricGroup.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable DrmMetricGroup { + List<android.hardware.drm.DrmMetric> metrics; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricNamedValue.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricNamedValue.aidl new file mode 100644 index 0000000000..76ec35c0cf --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricNamedValue.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable DrmMetricNamedValue { + String name; + android.hardware.drm.DrmMetricValue value; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricValue.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricValue.aidl new file mode 100644 index 0000000000..806491357c --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/DrmMetricValue.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@VintfStability +union DrmMetricValue { + long int64Value; + double doubleValue; + String stringValue; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/EventType.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/EventType.aidl new file mode 100644 index 0000000000..80ebb285ae --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/EventType.aidl @@ -0,0 +1,42 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum EventType { + PROVISION_REQUIRED = 0, + KEY_NEEDED = 1, + KEY_EXPIRED = 2, + VENDOR_DEFINED = 3, + SESSION_RECLAIMED = 4, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl new file mode 100644 index 0000000000..5704fb0726 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl @@ -0,0 +1,45 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum HdcpLevel { + HDCP_UNKNOWN = 0, + HDCP_NONE = 1, + HDCP_V1 = 2, + HDCP_V2 = 3, + HDCP_V2_1 = 4, + HDCP_V2_2 = 5, + HDCP_NO_OUTPUT = 6, + HDCP_V2_3 = 7, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevels.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevels.aidl new file mode 100644 index 0000000000..a6f86ace67 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevels.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable HdcpLevels { + android.hardware.drm.HdcpLevel connectedLevel; + android.hardware.drm.HdcpLevel maxLevel; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ICryptoPlugin.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ICryptoPlugin.aidl new file mode 100644 index 0000000000..31c45e0e1f --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ICryptoPlugin.aidl @@ -0,0 +1,43 @@ +/* + * 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.drm; +@VintfStability +interface ICryptoPlugin { + int decrypt(in android.hardware.drm.DecryptArgs args); + List<android.hardware.drm.LogMessage> getLogMessages(); + void notifyResolution(in int width, in int height); + boolean requiresSecureDecoderComponent(in String mime); + void setMediaDrmSession(in byte[] sessionId); + void setSharedBufferBase(in android.hardware.drm.SharedBuffer base); +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmFactory.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmFactory.aidl new file mode 100644 index 0000000000..82efbb7ea0 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmFactory.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@VintfStability +interface IDrmFactory { + @nullable android.hardware.drm.IDrmPlugin createDrmPlugin(in android.hardware.drm.Uuid uuid, in String appPackageName); + @nullable android.hardware.drm.ICryptoPlugin createCryptoPlugin(in android.hardware.drm.Uuid uuid, in byte[] initData); + android.hardware.drm.CryptoSchemes getSupportedCryptoSchemes(); +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPlugin.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPlugin.aidl new file mode 100644 index 0000000000..ae10062c81 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPlugin.aidl @@ -0,0 +1,76 @@ +/* + * 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.drm; +@VintfStability +interface IDrmPlugin { + void closeSession(in byte[] sessionId); + byte[] decrypt(in byte[] sessionId, in byte[] keyId, in byte[] input, in byte[] iv); + byte[] encrypt(in byte[] sessionId, in byte[] keyId, in byte[] input, in byte[] iv); + android.hardware.drm.HdcpLevels getHdcpLevels(); + android.hardware.drm.KeyRequest getKeyRequest(in byte[] scope, in byte[] initData, in String mimeType, in android.hardware.drm.KeyType keyType, in android.hardware.drm.KeyValue[] optionalParameters); + List<android.hardware.drm.LogMessage> getLogMessages(); + List<android.hardware.drm.DrmMetricGroup> getMetrics(); + android.hardware.drm.NumberOfSessions getNumberOfSessions(); + List<android.hardware.drm.KeySetId> getOfflineLicenseKeySetIds(); + android.hardware.drm.OfflineLicenseState getOfflineLicenseState(in android.hardware.drm.KeySetId keySetId); + byte[] getPropertyByteArray(in String propertyName); + String getPropertyString(in String propertyName); + android.hardware.drm.ProvisionRequest getProvisionRequest(in String certificateType, in String certificateAuthority); + android.hardware.drm.SecureStop getSecureStop(in android.hardware.drm.SecureStopId secureStopId); + List<android.hardware.drm.SecureStopId> getSecureStopIds(); + List<android.hardware.drm.SecureStop> getSecureStops(); + android.hardware.drm.SecurityLevel getSecurityLevel(in byte[] sessionId); + byte[] openSession(in android.hardware.drm.SecurityLevel securityLevel); + android.hardware.drm.KeySetId provideKeyResponse(in byte[] scope, in byte[] response); + android.hardware.drm.ProvideProvisionResponseResult provideProvisionResponse(in byte[] response); + List<android.hardware.drm.KeyValue> queryKeyStatus(in byte[] sessionId); + void releaseAllSecureStops(); + void releaseSecureStop(in android.hardware.drm.SecureStopId secureStopId); + void releaseSecureStops(in android.hardware.drm.OpaqueData ssRelease); + void removeAllSecureStops(); + void removeKeys(in byte[] sessionId); + void removeOfflineLicense(in android.hardware.drm.KeySetId keySetId); + void removeSecureStop(in android.hardware.drm.SecureStopId secureStopId); + boolean requiresSecureDecoder(in String mime, in android.hardware.drm.SecurityLevel level); + void restoreKeys(in byte[] sessionId, in android.hardware.drm.KeySetId keySetId); + void setCipherAlgorithm(in byte[] sessionId, in String algorithm); + void setListener(in android.hardware.drm.IDrmPluginListener listener); + void setMacAlgorithm(in byte[] sessionId, in String algorithm); + void setPlaybackId(in byte[] sessionId, in String playbackId); + void setPropertyByteArray(in String propertyName, in byte[] value); + void setPropertyString(in String propertyName, in String value); + byte[] sign(in byte[] sessionId, in byte[] keyId, in byte[] message); + byte[] signRSA(in byte[] sessionId, in String algorithm, in byte[] message, in byte[] wrappedkey); + boolean verify(in byte[] sessionId, in byte[] keyId, in byte[] message, in byte[] signature); +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPluginListener.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPluginListener.aidl new file mode 100644 index 0000000000..0a4b4b70bc --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/IDrmPluginListener.aidl @@ -0,0 +1,41 @@ +/* + * 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.drm; +@VintfStability +interface IDrmPluginListener { + oneway void onEvent(in android.hardware.drm.EventType eventType, in byte[] sessionId, in byte[] data); + oneway void onExpirationUpdate(in byte[] sessionId, in long expiryTimeInMS); + oneway void onKeysChange(in byte[] sessionId, in android.hardware.drm.KeyStatus[] keyStatusList, in boolean hasNewUsableKey); + oneway void onSessionLostState(in byte[] sessionId); +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequest.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequest.aidl new file mode 100644 index 0000000000..267f532755 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequest.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@VintfStability +parcelable KeyRequest { + byte[] request; + android.hardware.drm.KeyRequestType requestType; + String defaultUrl; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequestType.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequestType.aidl new file mode 100644 index 0000000000..34b9615c55 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyRequestType.aidl @@ -0,0 +1,43 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum KeyRequestType { + INITIAL = 0, + RENEWAL = 1, + RELEASE = 2, + UNKNOWN = 3, + NONE = 4, + UPDATE = 5, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeySetId.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeySetId.aidl new file mode 100644 index 0000000000..58dfe1a412 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeySetId.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable KeySetId { + byte[] keySetId; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatus.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatus.aidl new file mode 100644 index 0000000000..53ab70f0fb --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatus.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable KeyStatus { + byte[] keyId; + android.hardware.drm.KeyStatusType type; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatusType.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatusType.aidl new file mode 100644 index 0000000000..261516f8ef --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyStatusType.aidl @@ -0,0 +1,43 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum KeyStatusType { + USABLE = 0, + EXPIRED = 1, + OUTPUT_NOT_ALLOWED = 2, + STATUS_PENDING = 3, + INTERNAL_ERROR = 4, + USABLE_IN_FUTURE = 5, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyType.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyType.aidl new file mode 100644 index 0000000000..7a9d633578 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyType.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum KeyType { + OFFLINE = 0, + STREAMING = 1, + RELEASE = 2, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyValue.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyValue.aidl new file mode 100644 index 0000000000..35d7b77bc9 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/KeyValue.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable KeyValue { + String key; + String value; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogMessage.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogMessage.aidl new file mode 100644 index 0000000000..93f76e1c41 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogMessage.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@VintfStability +parcelable LogMessage { + long timeMs; + android.hardware.drm.LogPriority priority; + String message; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogPriority.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogPriority.aidl new file mode 100644 index 0000000000..83362c359f --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/LogPriority.aidl @@ -0,0 +1,45 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum LogPriority { + UNKNOWN = 0, + DEFAULT = 1, + VERBOSE = 2, + DEBUG = 3, + INFO = 4, + WARN = 5, + ERROR = 6, + FATAL = 7, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Mode.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Mode.aidl new file mode 100644 index 0000000000..7379774093 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Mode.aidl @@ -0,0 +1,41 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum Mode { + UNENCRYPTED = 0, + AES_CTR = 1, + AES_CBC_CTS = 2, + AES_CBC = 3, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/NumberOfSessions.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/NumberOfSessions.aidl new file mode 100644 index 0000000000..a421125fc3 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/NumberOfSessions.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable NumberOfSessions { + int currentSessions; + int maxSessions; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OfflineLicenseState.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OfflineLicenseState.aidl new file mode 100644 index 0000000000..629564d706 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OfflineLicenseState.aidl @@ -0,0 +1,40 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum OfflineLicenseState { + UNKNOWN = 0, + USABLE = 1, + INACTIVE = 2, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OpaqueData.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OpaqueData.aidl new file mode 100644 index 0000000000..3085889faf --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/OpaqueData.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable OpaqueData { + byte[] opaqueData; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Pattern.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Pattern.aidl new file mode 100644 index 0000000000..b01562e67e --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Pattern.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable Pattern { + int encryptBlocks; + int skipBlocks; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvideProvisionResponseResult.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvideProvisionResponseResult.aidl new file mode 100644 index 0000000000..827de59093 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvideProvisionResponseResult.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable ProvideProvisionResponseResult { + byte[] certificate; + byte[] wrappedKey; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvisionRequest.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvisionRequest.aidl new file mode 100644 index 0000000000..84c56621f2 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/ProvisionRequest.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable ProvisionRequest { + byte[] request; + String defaultUrl; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStop.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStop.aidl new file mode 100644 index 0000000000..81d2dfe75c --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStop.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable SecureStop { + byte[] opaqueData; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStopId.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStopId.aidl new file mode 100644 index 0000000000..2b904c8629 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecureStopId.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable SecureStopId { + byte[] secureStopId; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecurityLevel.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecurityLevel.aidl new file mode 100644 index 0000000000..65b2b9d2ae --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SecurityLevel.aidl @@ -0,0 +1,44 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum SecurityLevel { + UNKNOWN = 0, + SW_SECURE_CRYPTO = 1, + SW_SECURE_DECODE = 2, + HW_SECURE_CRYPTO = 3, + HW_SECURE_DECODE = 4, + HW_SECURE_ALL = 5, + DEFAULT = 6, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SharedBuffer.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SharedBuffer.aidl new file mode 100644 index 0000000000..314fe7cf00 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SharedBuffer.aidl @@ -0,0 +1,41 @@ +/* + * 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.drm; +@VintfStability +parcelable SharedBuffer { + int bufferId; + long offset; + long size; + android.hardware.common.NativeHandle handle; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Status.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Status.aidl new file mode 100644 index 0000000000..c64068958f --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Status.aidl @@ -0,0 +1,77 @@ +/* + * 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.drm; +@Backing(type="int") @VintfStability +enum Status { + OK = 0, + ERROR_DRM_NO_LICENSE = 1, + ERROR_DRM_LICENSE_EXPIRED = 2, + ERROR_DRM_SESSION_NOT_OPENED = 3, + ERROR_DRM_CANNOT_HANDLE = 4, + ERROR_DRM_INVALID_STATE = 5, + BAD_VALUE = 6, + ERROR_DRM_NOT_PROVISIONED = 7, + ERROR_DRM_RESOURCE_BUSY = 8, + ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION = 9, + ERROR_DRM_DEVICE_REVOKED = 10, + ERROR_DRM_DECRYPT = 11, + ERROR_DRM_UNKNOWN = 12, + ERROR_DRM_INSUFFICIENT_SECURITY = 13, + ERROR_DRM_FRAME_TOO_LARGE = 14, + ERROR_DRM_SESSION_LOST_STATE = 15, + ERROR_DRM_RESOURCE_CONTENTION = 16, + CANNOT_DECRYPT_ZERO_SUBSAMPLES = 17, + CRYPTO_LIBRARY_ERROR = 18, + GENERAL_OEM_ERROR = 19, + GENERAL_PLUGIN_ERROR = 20, + INIT_DATA_INVALID = 21, + KEY_NOT_LOADED = 22, + LICENSE_PARSE_ERROR = 23, + LICENSE_POLICY_ERROR = 24, + LICENSE_RELEASE_ERROR = 25, + LICENSE_REQUEST_REJECTED = 26, + LICENSE_RESTORE_ERROR = 27, + LICENSE_STATE_ERROR = 28, + MALFORMED_CERTIFICATE = 29, + MEDIA_FRAMEWORK_ERROR = 30, + MISSING_CERTIFICATE = 31, + PROVISIONING_CERTIFICATE_ERROR = 32, + PROVISIONING_CONFIGURATION_ERROR = 33, + PROVISIONING_PARSE_ERROR = 34, + PROVISIONING_REQUEST_REJECTED = 35, + RETRYABLE_PROVISIONING_ERROR = 36, + SECURE_STOP_RELEASE_ERROR = 37, + STORAGE_READ_FAILURE = 38, + STORAGE_WRITE_FAILURE = 39, +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SubSample.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SubSample.aidl new file mode 100644 index 0000000000..57d815eeb2 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SubSample.aidl @@ -0,0 +1,39 @@ +/* + * 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.drm; +@VintfStability +parcelable SubSample { + int numBytesOfClearData; + int numBytesOfEncryptedData; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SupportedContentType.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SupportedContentType.aidl new file mode 100644 index 0000000000..6ef5db860a --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/SupportedContentType.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2022 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.drm; +@VintfStability +parcelable SupportedContentType { + String mime; + android.hardware.drm.SecurityLevel minLevel; + android.hardware.drm.SecurityLevel maxLevel; +} diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Uuid.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Uuid.aidl new file mode 100644 index 0000000000..3c2cfa2037 --- /dev/null +++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/Uuid.aidl @@ -0,0 +1,38 @@ +/* + * 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.drm; +@VintfStability +parcelable Uuid { + byte[16] uuid; +} diff --git a/dumpstate/aidl/Android.bp b/dumpstate/aidl/Android.bp index 22d836baa3..d9acc7a59c 100644 --- a/dumpstate/aidl/Android.bp +++ b/dumpstate/aidl/Android.bp @@ -39,4 +39,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/.hash b/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/.hash new file mode 100644 index 0000000000..d5c42266e9 --- /dev/null +++ b/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/.hash @@ -0,0 +1 @@ +d7c8d1b9054ec2fb0510edb68b95ca69fd038719 diff --git a/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/android/hardware/dumpstate/IDumpstateDevice.aidl b/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/android/hardware/dumpstate/IDumpstateDevice.aidl new file mode 100644 index 0000000000..4d78a4c09c --- /dev/null +++ b/dumpstate/aidl/aidl_api/android.hardware.dumpstate/1/android/hardware/dumpstate/IDumpstateDevice.aidl @@ -0,0 +1,53 @@ +/* + * 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.dumpstate; +@VintfStability +interface IDumpstateDevice { + void dumpstateBoard(in ParcelFileDescriptor[] fd, in android.hardware.dumpstate.IDumpstateDevice.DumpstateMode mode, in long timeoutMillis); + boolean getVerboseLoggingEnabled(); + void setVerboseLoggingEnabled(in boolean enable); + const int ERROR_UNSUPPORTED_MODE = 1; + const int ERROR_DEVICE_LOGGING_NOT_ENABLED = 2; + @Backing(type="int") @VintfStability + enum DumpstateMode { + FULL = 0, + INTERACTIVE = 1, + REMOTE = 2, + WEAR = 3, + CONNECTIVITY = 4, + WIFI = 5, + DEFAULT = 6, + PROTO = 7, + } +} diff --git a/graphics/allocator/aidl/Android.bp b/graphics/allocator/aidl/Android.bp index ea8a599578..272ab48809 100644 --- a/graphics/allocator/aidl/Android.bp +++ b/graphics/allocator/aidl/Android.bp @@ -37,4 +37,11 @@ aidl_interface { min_sdk_version: "29", }, }, + versions_with_info: [ + { + version: "1", + imports: ["android.hardware.common-V2"], + }, + ], + } diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/.hash b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/.hash new file mode 100644 index 0000000000..783f3d7902 --- /dev/null +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/.hash @@ -0,0 +1 @@ +0dab5f7fc46756d126ac127cd6033fc242eff0aa diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationError.aidl b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationError.aidl new file mode 100644 index 0000000000..6e7b739ed5 --- /dev/null +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationError.aidl @@ -0,0 +1,40 @@ +/* + * Copyright 2022 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.graphics.allocator; +@Backing(type="int") @VintfStability +enum AllocationError { + BAD_DESCRIPTOR = 0, + NO_RESOURCES = 1, + UNSUPPORTED = 2, +} diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationResult.aidl b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationResult.aidl new file mode 100644 index 0000000000..73cfeb5422 --- /dev/null +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/AllocationResult.aidl @@ -0,0 +1,39 @@ +/* + * Copyright 2022 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.graphics.allocator; +@VintfStability +parcelable AllocationResult { + int stride; + android.hardware.common.NativeHandle[] buffers; +} diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/IAllocator.aidl b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/IAllocator.aidl new file mode 100644 index 0000000000..fe0b0a214b --- /dev/null +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/1/android/hardware/graphics/allocator/IAllocator.aidl @@ -0,0 +1,38 @@ +/* + * Copyright 2022 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.graphics.allocator; +@VintfStability +interface IAllocator { + android.hardware.graphics.allocator.AllocationResult allocate(in byte[] descriptor, in int count); +} diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h new file mode 100644 index 0000000000..34cda6a770 --- /dev/null +++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerServiceWriter.h @@ -0,0 +1,128 @@ +/* + * Copyright 2022 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. + */ + +#pragma once + +#include <aidl/android/hardware/graphics/composer3/CommandResultPayload.h> +#include <aidl/android/hardware/graphics/composer3/IComposerClient.h> +#include <inttypes.h> +#include <string.h> + +#include <algorithm> +#include <limits> +#include <memory> +#include <vector> + +#include "Util.h" + +namespace aidl::android::hardware::graphics::composer3::impl { + +class ComposerServiceWriter { + public: + ComposerServiceWriter() { reset(); } + + virtual ~ComposerServiceWriter() { reset(); } + + void reset() { mCommandsResults.clear(); } + + void setError(int32_t index, int32_t errorCode) { + CommandError error; + error.commandIndex = index; + error.errorCode = errorCode; + mCommandsResults.emplace_back(std::move(error)); + } + + void setPresentOrValidateResult(int64_t display, PresentOrValidate::Result result) { + PresentOrValidate presentOrValidate; + presentOrValidate.display = display; + presentOrValidate.result = result; + mCommandsResults.emplace_back(std::move(presentOrValidate)); + } + + void setChangedCompositionTypes(int64_t display, const std::vector<int64_t>& layers, + const std::vector<Composition>& types) { + ChangedCompositionTypes changedCompositionTypes; + changedCompositionTypes.display = display; + changedCompositionTypes.layers.reserve(layers.size()); + for (int i = 0; i < layers.size(); i++) { + auto layer = ChangedCompositionLayer{.layer = layers[i], .composition = types[i]}; + changedCompositionTypes.layers.emplace_back(std::move(layer)); + } + mCommandsResults.emplace_back(std::move(changedCompositionTypes)); + } + + void setDisplayRequests(int64_t display, int32_t displayRequestMask, + const std::vector<int64_t>& layers, + const std::vector<int32_t>& layerRequestMasks) { + DisplayRequest displayRequest; + displayRequest.display = display; + displayRequest.mask = displayRequestMask; + displayRequest.layerRequests.reserve(layers.size()); + for (int i = 0; i < layers.size(); i++) { + auto layerRequest = + DisplayRequest::LayerRequest{.layer = layers[i], .mask = layerRequestMasks[i]}; + displayRequest.layerRequests.emplace_back(std::move(layerRequest)); + } + mCommandsResults.emplace_back(std::move(displayRequest)); + } + + void setPresentFence(int64_t display, ::ndk::ScopedFileDescriptor presentFence) { + if (presentFence.get() >= 0) { + PresentFence presentFenceCommand; + presentFenceCommand.fence = std::move(presentFence); + presentFenceCommand.display = display; + mCommandsResults.emplace_back(std::move(presentFenceCommand)); + } else { + LOG(WARNING) << __func__ << ": invalid present fence " << presentFence.get(); + } + } + + void setReleaseFences(int64_t display, const std::vector<int64_t>& layers, + std::vector<::ndk::ScopedFileDescriptor> releaseFences) { + ReleaseFences releaseFencesCommand; + releaseFencesCommand.display = display; + for (int i = 0; i < layers.size(); i++) { + if (releaseFences[i].get() >= 0) { + ReleaseFences::Layer layer; + layer.layer = layers[i]; + layer.fence = std::move(releaseFences[i]); + releaseFencesCommand.layers.emplace_back(std::move(layer)); + } else { + LOG(WARNING) << __func__ << ": invalid release fence " << releaseFences[i].get(); + } + } + mCommandsResults.emplace_back(std::move(releaseFencesCommand)); + } + + void setClientTargetProperty(int64_t display, const ClientTargetProperty& clientTargetProperty, + float brightness, const DimmingStage& dimmingStage) { + ClientTargetPropertyWithBrightness clientTargetPropertyWithBrightness; + clientTargetPropertyWithBrightness.display = display; + clientTargetPropertyWithBrightness.clientTargetProperty = clientTargetProperty; + clientTargetPropertyWithBrightness.brightness = brightness; + clientTargetPropertyWithBrightness.dimmingStage = dimmingStage; + mCommandsResults.emplace_back(std::move(clientTargetPropertyWithBrightness)); + } + + std::vector<CommandResultPayload> getPendingCommandResults() { + return std::move(mCommandsResults); + } + + private: + std::vector<CommandResultPayload> mCommandsResults; +}; + +} // namespace aidl::android::hardware::graphics::composer3::impl
\ No newline at end of file diff --git a/health/aidl/Android.bp b/health/aidl/Android.bp index 86bca69e07..f0cd33f868 100644 --- a/health/aidl/Android.bp +++ b/health/aidl/Android.bp @@ -42,6 +42,13 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } cc_library { diff --git a/health/aidl/OWNERS b/health/aidl/OWNERS index cd06415b92..fcad499e7d 100644 --- a/health/aidl/OWNERS +++ b/health/aidl/OWNERS @@ -1,2 +1,4 @@ # Bug component: 30545 elsk@google.com +smoreland@google.com +stayfan@google.com diff --git a/health/aidl/aidl_api/android.hardware.health/1/.hash b/health/aidl/aidl_api/android.hardware.health/1/.hash new file mode 100644 index 0000000000..92740100b5 --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/.hash @@ -0,0 +1 @@ +94e77215594f8ad98ab33a769263d48fdabed92e diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryCapacityLevel.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryCapacityLevel.aidl new file mode 100644 index 0000000000..e5438865c1 --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryCapacityLevel.aidl @@ -0,0 +1,44 @@ +/* + * 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.health; +@Backing(type="int") @VintfStability +enum BatteryCapacityLevel { + UNSUPPORTED = -1, + UNKNOWN = 0, + CRITICAL = 1, + LOW = 2, + NORMAL = 3, + HIGH = 4, + FULL = 5, +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryHealth.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryHealth.aidl new file mode 100644 index 0000000000..4ce7952af2 --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryHealth.aidl @@ -0,0 +1,44 @@ +/* + * 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.health; +@Backing(type="int") @VintfStability +enum BatteryHealth { + UNKNOWN = 1, + GOOD = 2, + OVERHEAT = 3, + DEAD = 4, + OVER_VOLTAGE = 5, + UNSPECIFIED_FAILURE = 6, + COLD = 7, +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryStatus.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryStatus.aidl new file mode 100644 index 0000000000..340b2ecc3f --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/BatteryStatus.aidl @@ -0,0 +1,42 @@ +/* + * 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.health; +@Backing(type="int") @VintfStability +enum BatteryStatus { + UNKNOWN = 1, + CHARGING = 2, + DISCHARGING = 3, + NOT_CHARGING = 4, + FULL = 5, +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/DiskStats.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/DiskStats.aidl new file mode 100644 index 0000000000..5aa58900bb --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/DiskStats.aidl @@ -0,0 +1,48 @@ +/* + * 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.health; +@VintfStability +parcelable DiskStats { + long reads; + long readMerges; + long readSectors; + long readTicks; + long writes; + long writeMerges; + long writeSectors; + long writeTicks; + long ioInFlight; + long ioTicks; + long ioInQueue; +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/HealthInfo.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/HealthInfo.aidl new file mode 100644 index 0000000000..97d9e845db --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/HealthInfo.aidl @@ -0,0 +1,61 @@ +/* + * 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.health; +@VintfStability +parcelable HealthInfo { + boolean chargerAcOnline; + boolean chargerUsbOnline; + boolean chargerWirelessOnline; + boolean chargerDockOnline; + int maxChargingCurrentMicroamps; + int maxChargingVoltageMicrovolts; + android.hardware.health.BatteryStatus batteryStatus; + android.hardware.health.BatteryHealth batteryHealth; + boolean batteryPresent; + int batteryLevel; + int batteryVoltageMillivolts; + int batteryTemperatureTenthsCelsius; + int batteryCurrentMicroamps; + int batteryCycleCount; + int batteryFullChargeUah; + int batteryChargeCounterUah; + String batteryTechnology; + int batteryCurrentAverageMicroamps; + android.hardware.health.DiskStats[] diskStats; + android.hardware.health.StorageInfo[] storageInfos; + android.hardware.health.BatteryCapacityLevel batteryCapacityLevel; + long batteryChargeTimeToFullNowSeconds; + int batteryFullChargeDesignCapacityUah; + const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = -1; +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealth.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealth.aidl new file mode 100644 index 0000000000..7016ae4c86 --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealth.aidl @@ -0,0 +1,51 @@ +/* + * 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.health; +@VintfStability +interface IHealth { + void registerCallback(in android.hardware.health.IHealthInfoCallback callback); + void unregisterCallback(in android.hardware.health.IHealthInfoCallback callback); + void update(); + int getChargeCounterUah(); + int getCurrentNowMicroamps(); + int getCurrentAverageMicroamps(); + int getCapacity(); + long getEnergyCounterNwh(); + android.hardware.health.BatteryStatus getChargeStatus(); + android.hardware.health.StorageInfo[] getStorageInfo(); + android.hardware.health.DiskStats[] getDiskStats(); + android.hardware.health.HealthInfo getHealthInfo(); + const int STATUS_UNKNOWN = 2; + const int STATUS_CALLBACK_DIED = 4; +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealthInfoCallback.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealthInfoCallback.aidl new file mode 100644 index 0000000000..1b6366fa7a --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/IHealthInfoCallback.aidl @@ -0,0 +1,38 @@ +/* + * 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.health; +@VintfStability +interface IHealthInfoCallback { + oneway void healthInfoChanged(in android.hardware.health.HealthInfo info); +} diff --git a/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/StorageInfo.aidl b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/StorageInfo.aidl new file mode 100644 index 0000000000..eaae5a6110 --- /dev/null +++ b/health/aidl/aidl_api/android.hardware.health/1/android/hardware/health/StorageInfo.aidl @@ -0,0 +1,41 @@ +/* + * 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.health; +@VintfStability +parcelable StorageInfo { + int eol; + int lifetimeA; + int lifetimeB; + String version; +} diff --git a/identity/aidl/vts/Android.bp b/identity/aidl/vts/Android.bp index a471efb5b4..fee58a48a1 100644 --- a/identity/aidl/vts/Android.bp +++ b/identity/aidl/vts/Android.bp @@ -57,6 +57,7 @@ cc_test { "general-tests", "vts", ], + require_root: true, } java_test_host { diff --git a/input/common/aidl/Android.bp b/input/common/aidl/Android.bp index b96f4d0635..390d8b54b1 100644 --- a/input/common/aidl/Android.bp +++ b/input/common/aidl/Android.bp @@ -20,4 +20,11 @@ aidl_interface { enabled: false, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/.hash b/input/common/aidl/aidl_api/android.hardware.input.common/1/.hash new file mode 100644 index 0000000000..6a5e1345b4 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/.hash @@ -0,0 +1 @@ +a796f8e2fe447a0ddba069b6edd1aba2b1c9fc42 diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Action.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Action.aidl new file mode 100644 index 0000000000..a2e0381188 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Action.aidl @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Action { + DOWN = 0, + UP = 1, + MOVE = 2, + CANCEL = 3, + OUTSIDE = 4, + POINTER_DOWN = 5, + POINTER_UP = 6, + HOVER_MOVE = 7, + SCROLL = 8, + HOVER_ENTER = 9, + HOVER_EXIT = 10, + BUTTON_PRESS = 11, + BUTTON_RELEASE = 12, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Axis.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Axis.aidl new file mode 100644 index 0000000000..2114c7deb1 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Axis.aidl @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Axis { + X = 0, + Y = 1, + PRESSURE = 2, + SIZE = 3, + TOUCH_MAJOR = 4, + TOUCH_MINOR = 5, + TOOL_MAJOR = 6, + TOOL_MINOR = 7, + ORIENTATION = 8, + VSCROLL = 9, + HSCROLL = 10, + Z = 11, + RX = 12, + RY = 13, + RZ = 14, + HAT_X = 15, + HAT_Y = 16, + LTRIGGER = 17, + RTRIGGER = 18, + THROTTLE = 19, + RUDDER = 20, + WHEEL = 21, + GAS = 22, + BRAKE = 23, + DISTANCE = 24, + TILT = 25, + SCROLL = 26, + RELATIVE_X = 27, + RELATIVE_Y = 28, + GENERIC_1 = 32, + GENERIC_2 = 33, + GENERIC_3 = 34, + GENERIC_4 = 35, + GENERIC_5 = 36, + GENERIC_6 = 37, + GENERIC_7 = 38, + GENERIC_8 = 39, + GENERIC_9 = 40, + GENERIC_10 = 41, + GENERIC_11 = 42, + GENERIC_12 = 43, + GENERIC_13 = 44, + GENERIC_14 = 45, + GENERIC_15 = 46, + GENERIC_16 = 47, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Button.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Button.aidl new file mode 100644 index 0000000000..10ad65a19a --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Button.aidl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Button { + NONE = 0, + PRIMARY = 1, + SECONDARY = 2, + TERTIARY = 4, + BACK = 8, + FORWARD = 16, + STYLUS_PRIMARY = 32, + STYLUS_SECONDARY = 64, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Classification.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Classification.aidl new file mode 100644 index 0000000000..ddd524685f --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Classification.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="byte") @VintfStability +enum Classification { + NONE = 0, + AMBIGUOUS_GESTURE = 1, + DEEP_PRESS = 2, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/EdgeFlag.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/EdgeFlag.aidl new file mode 100644 index 0000000000..1040049b81 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/EdgeFlag.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum EdgeFlag { + NONE = 0, + TOP = 1, + BOTTOM = 2, + LEFT = 4, + RIGHT = 8, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Flag.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Flag.aidl new file mode 100644 index 0000000000..d3fcd9ff16 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Flag.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Flag { + WINDOW_IS_OBSCURED = 1, + IS_GENERATED_GESTURE = 8, + TAINTED = -2147483648, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Meta.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Meta.aidl new file mode 100644 index 0000000000..2c229f9f36 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Meta.aidl @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Meta { + NONE = 0, + ALT_ON = 2, + ALT_LEFT_ON = 16, + ALT_RIGHT_ON = 32, + SHIFT_ON = 1, + SHIFT_LEFT_ON = 64, + SHIFT_RIGHT_ON = 128, + SYM_ON = 4, + FUNCTION_ON = 8, + CTRL_ON = 4096, + CTRL_LEFT_ON = 8192, + CTRL_RIGHT_ON = 16384, + META_ON = 65536, + META_LEFT_ON = 131072, + META_RIGHT_ON = 262144, + CAPS_LOCK_ON = 1048576, + NUM_LOCK_ON = 2097152, + SCROLL_LOCK_ON = 4194304, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/MotionEvent.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/MotionEvent.aidl new file mode 100644 index 0000000000..84af4bf4ca --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/MotionEvent.aidl @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2022 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.input.common; +@VintfStability +parcelable MotionEvent { + int deviceId; + android.hardware.input.common.Source source; + int displayId; + long downTime; + long eventTime; + android.hardware.input.common.Action action; + byte actionIndex; + android.hardware.input.common.Button actionButton; + android.hardware.input.common.Flag flags; + android.hardware.input.common.PolicyFlag policyFlags; + android.hardware.input.common.EdgeFlag edgeFlags; + android.hardware.input.common.Meta metaState; + android.hardware.input.common.Button buttonState; + float xPrecision; + float yPrecision; + android.hardware.input.common.PointerProperties[] pointerProperties; + android.hardware.input.common.PointerCoords[] pointerCoords; + int deviceTimestamp; + android.hardware.input.common.VideoFrame[] frames; +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerCoords.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerCoords.aidl new file mode 100644 index 0000000000..353a106868 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerCoords.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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.input.common; +@VintfStability +parcelable PointerCoords { + long bits; + float[] values; +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerProperties.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerProperties.aidl new file mode 100644 index 0000000000..a49581b438 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PointerProperties.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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.input.common; +@VintfStability +parcelable PointerProperties { + int id; + android.hardware.input.common.ToolType toolType; +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PolicyFlag.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PolicyFlag.aidl new file mode 100644 index 0000000000..247e868fcb --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/PolicyFlag.aidl @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum PolicyFlag { + WAKE = 1, + VIRTUAL = 2, + FUNCTION = 4, + GESTURE = 8, + INJECTED = 16777216, + TRUSTED = 33554432, + FILTERED = 67108864, + DISABLE_KEY_REPEAT = 134217728, + INTERACTIVE = 536870912, + PASS_TO_USER = 1073741824, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Source.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Source.aidl new file mode 100644 index 0000000000..396e06de97 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/Source.aidl @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="int") @VintfStability +enum Source { + UNKNOWN = 0, + KEYBOARD = 257, + DPAD = 513, + GAMEPAD = 1025, + TOUCHSCREEN = 4098, + MOUSE = 8194, + STYLUS = 16386, + BLUETOOTH_STYLUS = 49154, + TRACKBALL = 65540, + MOUSE_RELATIVE = 131076, + TOUCHPAD = 1048584, + TOUCH_NAVIGATION = 2097152, + ROTARY_ENCODER = 4194304, + JOYSTICK = 16777232, + HDMI = 33554433, + SENSOR = 67108864, + ANY = -256, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/SourceClass.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/SourceClass.aidl new file mode 100644 index 0000000000..96eede24b0 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/SourceClass.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="byte") @VintfStability +enum SourceClass { + NONE = 0, + BUTTON = 1, + POINTER = 2, + NAVIGATION = 4, + POSITION = 8, + JOYSTICK = 16, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/ToolType.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/ToolType.aidl new file mode 100644 index 0000000000..ac1b69d74e --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/ToolType.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2022 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.input.common; +@Backing(type="byte") @VintfStability +enum ToolType { + UNKNOWN = 0, + FINGER = 1, + STYLUS = 2, + MOUSE = 3, + ERASER = 4, +} diff --git a/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/VideoFrame.aidl b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/VideoFrame.aidl new file mode 100644 index 0000000000..14985c51d5 --- /dev/null +++ b/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/VideoFrame.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2022 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.input.common; +@VintfStability +parcelable VideoFrame { + char[] data; + int height; + int width; + long timestamp; +} diff --git a/ir/aidl/Android.bp b/ir/aidl/Android.bp index 5dbf68fdbe..2485f5bf87 100644 --- a/ir/aidl/Android.bp +++ b/ir/aidl/Android.bp @@ -39,4 +39,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/ir/aidl/aidl_api/android.hardware.ir/1/.hash b/ir/aidl/aidl_api/android.hardware.ir/1/.hash new file mode 100644 index 0000000000..30d216650f --- /dev/null +++ b/ir/aidl/aidl_api/android.hardware.ir/1/.hash @@ -0,0 +1 @@ +3e04aed366e96850c6164287eaf78a8e4ab071b0 diff --git a/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/ConsumerIrFreqRange.aidl b/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/ConsumerIrFreqRange.aidl new file mode 100644 index 0000000000..4a0d286938 --- /dev/null +++ b/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/ConsumerIrFreqRange.aidl @@ -0,0 +1,39 @@ +/* + * 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.ir; +@VintfStability +parcelable ConsumerIrFreqRange { + int minHz; + int maxHz; +} diff --git a/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/IConsumerIr.aidl b/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/IConsumerIr.aidl new file mode 100644 index 0000000000..07bf4b4af2 --- /dev/null +++ b/ir/aidl/aidl_api/android.hardware.ir/1/android/hardware/ir/IConsumerIr.aidl @@ -0,0 +1,39 @@ +/* + * 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.ir; +@VintfStability +interface IConsumerIr { + android.hardware.ir.ConsumerIrFreqRange[] getCarrierFreqs(); + void transmit(in int carrierFreqHz, in int[] pattern); +} diff --git a/nfc/aidl/Android.bp b/nfc/aidl/Android.bp index 30365f636f..b9578f4858 100644 --- a/nfc/aidl/Android.bp +++ b/nfc/aidl/Android.bp @@ -40,4 +40,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/.hash b/nfc/aidl/aidl_api/android.hardware.nfc/1/.hash new file mode 100644 index 0000000000..46ec1e2a33 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/.hash @@ -0,0 +1 @@ +37acf94ceb095ad537b66c3bd77c30a6ad5f5b0e diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfc.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfc.aidl new file mode 100644 index 0000000000..7a0ae54963 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfc.aidl @@ -0,0 +1,47 @@ +/* + * 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.nfc; +@VintfStability +interface INfc { + void open(in android.hardware.nfc.INfcClientCallback clientCallback); + void close(in android.hardware.nfc.NfcCloseType type); + void coreInitialized(); + void factoryReset(); + android.hardware.nfc.NfcConfig getConfig(); + void powerCycle(); + void preDiscover(); + int write(in byte[] data); + void setEnableVerboseLogging(in boolean enable); + boolean isVerboseLoggingEnabled(); +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfcClientCallback.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfcClientCallback.aidl new file mode 100644 index 0000000000..8150e818d7 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/INfcClientCallback.aidl @@ -0,0 +1,39 @@ +/* + * 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.nfc; +@VintfStability +interface INfcClientCallback { + void sendData(in byte[] data); + void sendEvent(in android.hardware.nfc.NfcEvent event, in android.hardware.nfc.NfcStatus status); +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcCloseType.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcCloseType.aidl new file mode 100644 index 0000000000..7d44d48e3e --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcCloseType.aidl @@ -0,0 +1,39 @@ +/* + * 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.nfc; +@Backing(type="int") @VintfStability +enum NfcCloseType { + DISABLE = 0, + HOST_SWITCHED_OFF = 1, +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcConfig.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcConfig.aidl new file mode 100644 index 0000000000..92e0a9a82c --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcConfig.aidl @@ -0,0 +1,52 @@ +/* + * 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.nfc; +@VintfStability +parcelable NfcConfig { + boolean nfaPollBailOutMode; + android.hardware.nfc.PresenceCheckAlgorithm presenceCheckAlgorithm; + android.hardware.nfc.ProtocolDiscoveryConfig nfaProprietaryCfg; + byte defaultOffHostRoute; + byte defaultOffHostRouteFelica; + byte defaultSystemCodeRoute; + byte defaultSystemCodePowerState; + byte defaultRoute; + byte offHostESEPipeId; + byte offHostSIMPipeId; + int maxIsoDepTransceiveLength; + byte[] hostAllowlist; + byte[] offHostRouteUicc; + byte[] offHostRouteEse; + byte defaultIsoDepRoute; +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcEvent.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcEvent.aidl new file mode 100644 index 0000000000..dda258eb08 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcEvent.aidl @@ -0,0 +1,43 @@ +/* + * 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.nfc; +@Backing(type="int") @VintfStability +enum NfcEvent { + OPEN_CPLT = 0, + CLOSE_CPLT = 1, + POST_INIT_CPLT = 2, + PRE_DISCOVER_CPLT = 3, + HCI_NETWORK_RESET = 4, + ERROR = 5, +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcStatus.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcStatus.aidl new file mode 100644 index 0000000000..2632480bdb --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/NfcStatus.aidl @@ -0,0 +1,42 @@ +/* + * 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.nfc; +@Backing(type="int") @VintfStability +enum NfcStatus { + OK = 0, + FAILED = 1, + ERR_TRANSPORT = 2, + ERR_CMD_TIMEOUT = 3, + REFUSED = 4, +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/PresenceCheckAlgorithm.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/PresenceCheckAlgorithm.aidl new file mode 100644 index 0000000000..9a9be215a6 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/PresenceCheckAlgorithm.aidl @@ -0,0 +1,40 @@ +/* + * 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.nfc; +@Backing(type="byte") @VintfStability +enum PresenceCheckAlgorithm { + DEFAULT = 0, + I_BLOCK = 1, + ISO_DEP_NAK = 2, +} diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/ProtocolDiscoveryConfig.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/ProtocolDiscoveryConfig.aidl new file mode 100644 index 0000000000..021dfe22d4 --- /dev/null +++ b/nfc/aidl/aidl_api/android.hardware.nfc/1/android/hardware/nfc/ProtocolDiscoveryConfig.aidl @@ -0,0 +1,46 @@ +/* + * 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.nfc; +@VintfStability +parcelable ProtocolDiscoveryConfig { + byte protocol18092Active; + byte protocolBPrime; + byte protocolDual; + byte protocol15693; + byte protocolKovio; + byte protocolMifare; + byte discoveryPollKovio; + byte discoveryPollBPrime; + byte discoveryListenBPrime; +} diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp index c3288799a0..72f160d797 100644 --- a/radio/aidl/Android.bp +++ b/radio/aidl/Android.bp @@ -26,6 +26,13 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } aidl_interface { @@ -106,6 +113,13 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: ["android.hardware.radio-V1"], + }, + ], + } aidl_interface { diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/.hash b/radio/aidl/aidl_api/android.hardware.radio/1/.hash new file mode 100644 index 0000000000..f6b2564745 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/.hash @@ -0,0 +1 @@ +31b668688e937e8e1eff48fea7b4bb37681114a0 diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/AccessNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/AccessNetwork.aidl new file mode 100644 index 0000000000..8ce689f501 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/AccessNetwork.aidl @@ -0,0 +1,44 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum AccessNetwork { + UNKNOWN = 0, + GERAN = 1, + UTRAN = 2, + EUTRAN = 3, + CDMA2000 = 4, + IWLAN = 5, + NGRAN = 6, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioAccessFamily.aidl new file mode 100644 index 0000000000..ecc2a9be7c --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioAccessFamily.aidl @@ -0,0 +1,58 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioAccessFamily { + UNKNOWN = 1, + GPRS = 2, + EDGE = 4, + UMTS = 8, + IS95A = 16, + IS95B = 32, + ONE_X_RTT = 64, + EVDO_0 = 128, + EVDO_A = 256, + HSDPA = 512, + HSUPA = 1024, + HSPA = 2048, + EVDO_B = 4096, + EHRPD = 8192, + LTE = 16384, + HSPAP = 32768, + GSM = 65536, + TD_SCDMA = 131072, + IWLAN = 262144, + LTE_CA = 524288, + NR = 1048576, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioConst.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioConst.aidl new file mode 100644 index 0000000000..b91bf03511 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioConst.aidl @@ -0,0 +1,41 @@ +/* + * 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.radio; +@JavaDerive(toString=true) @VintfStability +parcelable RadioConst { + const int MAX_RILDS = 3; + const int MAX_UUID_LENGTH = 64; + const int CARD_MAX_APPS = 8; + const int P2_CONSTANT_NO_P2 = -1; +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioError.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioError.aidl new file mode 100644 index 0000000000..98606e588b --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioError.aidl @@ -0,0 +1,126 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioError { + NONE = 0, + RADIO_NOT_AVAILABLE = 1, + GENERIC_FAILURE = 2, + PASSWORD_INCORRECT = 3, + SIM_PIN2 = 4, + SIM_PUK2 = 5, + REQUEST_NOT_SUPPORTED = 6, + CANCELLED = 7, + OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, + OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, + SMS_SEND_FAIL_RETRY = 10, + SIM_ABSENT = 11, + SUBSCRIPTION_NOT_AVAILABLE = 12, + MODE_NOT_SUPPORTED = 13, + FDN_CHECK_FAILURE = 14, + ILLEGAL_SIM_OR_ME = 15, + MISSING_RESOURCE = 16, + NO_SUCH_ELEMENT = 17, + DIAL_MODIFIED_TO_USSD = 18, + DIAL_MODIFIED_TO_SS = 19, + DIAL_MODIFIED_TO_DIAL = 20, + USSD_MODIFIED_TO_DIAL = 21, + USSD_MODIFIED_TO_SS = 22, + USSD_MODIFIED_TO_USSD = 23, + SS_MODIFIED_TO_DIAL = 24, + SS_MODIFIED_TO_USSD = 25, + SUBSCRIPTION_NOT_SUPPORTED = 26, + SS_MODIFIED_TO_SS = 27, + LCE_NOT_SUPPORTED = 36, + NO_MEMORY = 37, + INTERNAL_ERR = 38, + SYSTEM_ERR = 39, + MODEM_ERR = 40, + INVALID_STATE = 41, + NO_RESOURCES = 42, + SIM_ERR = 43, + INVALID_ARGUMENTS = 44, + INVALID_SIM_STATE = 45, + INVALID_MODEM_STATE = 46, + INVALID_CALL_ID = 47, + NO_SMS_TO_ACK = 48, + NETWORK_ERR = 49, + REQUEST_RATE_LIMITED = 50, + SIM_BUSY = 51, + SIM_FULL = 52, + NETWORK_REJECT = 53, + OPERATION_NOT_ALLOWED = 54, + EMPTY_RECORD = 55, + INVALID_SMS_FORMAT = 56, + ENCODING_ERR = 57, + INVALID_SMSC_ADDRESS = 58, + NO_SUCH_ENTRY = 59, + NETWORK_NOT_READY = 60, + NOT_PROVISIONED = 61, + NO_SUBSCRIPTION = 62, + NO_NETWORK_FOUND = 63, + DEVICE_IN_USE = 64, + ABORTED = 65, + INVALID_RESPONSE = 66, + OEM_ERROR_1 = 501, + OEM_ERROR_2 = 502, + OEM_ERROR_3 = 503, + OEM_ERROR_4 = 504, + OEM_ERROR_5 = 505, + OEM_ERROR_6 = 506, + OEM_ERROR_7 = 507, + OEM_ERROR_8 = 508, + OEM_ERROR_9 = 509, + OEM_ERROR_10 = 510, + OEM_ERROR_11 = 511, + OEM_ERROR_12 = 512, + OEM_ERROR_13 = 513, + OEM_ERROR_14 = 514, + OEM_ERROR_15 = 515, + OEM_ERROR_16 = 516, + OEM_ERROR_17 = 517, + OEM_ERROR_18 = 518, + OEM_ERROR_19 = 519, + OEM_ERROR_20 = 520, + OEM_ERROR_21 = 521, + OEM_ERROR_22 = 522, + OEM_ERROR_23 = 523, + OEM_ERROR_24 = 524, + OEM_ERROR_25 = 525, + SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED = 67, + ACCESS_BARRED = 68, + BLOCKED_DUE_TO_CALL = 69, + RF_HARDWARE_ISSUE = 70, + NO_RF_CALIBRATION_INFO = 71, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioIndicationType.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioIndicationType.aidl new file mode 100644 index 0000000000..54ea3a4b4f --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioIndicationType.aidl @@ -0,0 +1,39 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioIndicationType { + UNSOLICITED = 0, + UNSOLICITED_ACK_EXP = 1, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfo.aidl new file mode 100644 index 0000000000..b2a7a062f9 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfo.aidl @@ -0,0 +1,40 @@ +/* + * 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.radio; +@JavaDerive(toString=true) @VintfStability +parcelable RadioResponseInfo { + android.hardware.radio.RadioResponseType type; + int serial; + android.hardware.radio.RadioError error; +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfoModem.aidl new file mode 100644 index 0000000000..37ed7bb230 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseInfoModem.aidl @@ -0,0 +1,41 @@ +/* + * 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.radio; +@JavaDerive(toString=true) @VintfStability +parcelable RadioResponseInfoModem { + android.hardware.radio.RadioResponseType type; + int serial; + android.hardware.radio.RadioError error; + boolean isEnabled; +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseType.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseType.aidl new file mode 100644 index 0000000000..5cd99c43b0 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioResponseType.aidl @@ -0,0 +1,40 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioResponseType { + SOLICITED = 0, + SOLICITED_ACK = 1, + SOLICITED_ACK_EXP = 2, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnology.aidl new file mode 100644 index 0000000000..9dad0a4977 --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnology.aidl @@ -0,0 +1,58 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioTechnology { + UNKNOWN = 0, + GPRS = 1, + EDGE = 2, + UMTS = 3, + IS95A = 4, + IS95B = 5, + ONE_X_RTT = 6, + EVDO_0 = 7, + EVDO_A = 8, + HSDPA = 9, + HSUPA = 10, + HSPA = 11, + EVDO_B = 12, + EHRPD = 13, + LTE = 14, + HSPAP = 15, + GSM = 16, + TD_SCDMA = 17, + IWLAN = 18, + LTE_CA = 19, + NR = 20, +} diff --git a/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnologyFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnologyFamily.aidl new file mode 100644 index 0000000000..e6fdce269d --- /dev/null +++ b/radio/aidl/aidl_api/android.hardware.radio/1/android/hardware/radio/RadioTechnologyFamily.aidl @@ -0,0 +1,39 @@ +/* + * 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.radio; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RadioTechnologyFamily { + THREE_GPP = 0, + THREE_GPP2 = 1, +} diff --git a/security/dice/aidl/Android.bp b/security/dice/aidl/Android.bp index 8c31e26fe9..97781b325b 100644 --- a/security/dice/aidl/Android.bp +++ b/security/dice/aidl/Android.bp @@ -51,5 +51,12 @@ aidl_interface { ], }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + // versions: ["1"], } diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash new file mode 100644 index 0000000000..3f08fd85f5 --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/.hash @@ -0,0 +1 @@ +02994f275fd7b1b40610c10eaeb0573f4312e358 diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl new file mode 100644 index 0000000000..5af73583aa --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Bcc.aidl @@ -0,0 +1,39 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability +parcelable Bcc { + byte[] data; +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl new file mode 100644 index 0000000000..8baca94ce8 --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/BccHandover.aidl @@ -0,0 +1,41 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability +parcelable BccHandover { + byte[32] cdiAttest; + byte[32] cdiSeal; + android.hardware.security.dice.Bcc bcc; +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl new file mode 100644 index 0000000000..78dd2f886c --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Config.aidl @@ -0,0 +1,39 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability +parcelable Config { + byte[] desc; +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl new file mode 100644 index 0000000000..383f4d1f26 --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/IDiceDevice.aidl @@ -0,0 +1,42 @@ +/* + * 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.security.dice; +/* @hide */ +@SensitiveData @VintfStability +interface IDiceDevice { + android.hardware.security.dice.Signature sign(in android.hardware.security.dice.InputValues[] id, in byte[] payload); + android.hardware.security.dice.Bcc getAttestationChain(in android.hardware.security.dice.InputValues[] inputValues); + android.hardware.security.dice.BccHandover derive(in android.hardware.security.dice.InputValues[] inputValues); + void demote(in android.hardware.security.dice.InputValues[] inputValues); +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl new file mode 100644 index 0000000000..e43c4292e4 --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/InputValues.aidl @@ -0,0 +1,44 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability +parcelable InputValues { + byte[64] codeHash; + android.hardware.security.dice.Config config; + byte[64] authorityHash; + @nullable byte[] authorityDescriptor; + android.hardware.security.dice.Mode mode = android.hardware.security.dice.Mode.NOT_INITIALIZED; + byte[64] hidden; +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl new file mode 100644 index 0000000000..295c32ec0c --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Mode.aidl @@ -0,0 +1,42 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@Backing(type="int") @VintfStability +enum Mode { + NOT_INITIALIZED = 0, + NORMAL = 1, + DEBUG = 2, + RECOVERY = 3, +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl new file mode 100644 index 0000000000..c13afa6d95 --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/ResponseCode.aidl @@ -0,0 +1,41 @@ +/* + * Copyright 2020, 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.security.dice; +@Backing(type="int") @VintfStability +enum ResponseCode { + PERMISSION_DENIED = 1, + SYSTEM_ERROR = 2, + NOT_IMPLEMENTED = 3, + DEMOTION_FAILED = 4, +} diff --git a/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl new file mode 100644 index 0000000000..294170d11f --- /dev/null +++ b/security/dice/aidl/aidl_api/android.hardware.security.dice/1/android/hardware/security/dice/Signature.aidl @@ -0,0 +1,39 @@ +/* + * Copyright 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.security.dice; +/* @hide */ +@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability +parcelable Signature { + byte[] data; +} diff --git a/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl b/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl index 50244004fb..cfbf171393 100644 --- a/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl +++ b/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl @@ -106,7 +106,8 @@ parcelable ProtectedData { * ] * * SignedMacAad = [ - * challenge : bstr, + * challenge : bstr .size (32..64), // Size between 32 - 64 + * // bytes inclusive * VerifiedDeviceInfo, * tag: bstr // This is the tag from COSE_Mac0 of * // KeysToCertify, to tie the key set to diff --git a/security/keymint/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/keymint/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp index 3cc11f6548..7184613cfa 100644 --- a/security/keymint/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp +++ b/security/keymint/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp @@ -358,8 +358,7 @@ TEST_P(GenerateKeyTests, generateEcdsaP256Key_testMode) { class CertificateRequestTest : public VtsRemotelyProvisionedComponentTests { protected: - CertificateRequestTest() : eekId_(string_to_bytevec("eekid")), challenge_(randomBytes(32)) { - } + CertificateRequestTest() : eekId_(string_to_bytevec("eekid")), challenge_(randomBytes(64)) {} void generateTestEekChain(size_t eekLength) { auto chain = generateEekChain(rpcHardwareInfo.supportedEekCurve, eekLength, eekId_); diff --git a/sensors/aidl/Android.bp b/sensors/aidl/Android.bp index 92b7ad03d8..1c2d83fee7 100644 --- a/sensors/aidl/Android.bp +++ b/sensors/aidl/Android.bp @@ -29,4 +29,14 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [ + "android.hardware.common-V2", + "android.hardware.common.fmq-V1", + ], + }, + ], + } diff --git a/tv/tuner/aidl/Android.bp b/tv/tuner/aidl/Android.bp index 63f91accdb..ecb744ccbf 100644 --- a/tv/tuner/aidl/Android.bp +++ b/tv/tuner/aidl/Android.bp @@ -24,4 +24,14 @@ aidl_interface { enabled: false, }, }, + versions_with_info: [ + { + version: "1", + imports: [ + "android.hardware.common-V2", + "android.hardware.common.fmq-V1", + ], + }, + ], + } diff --git a/usb/aidl/Android.bp b/usb/aidl/Android.bp index f71cacb686..7eb60208f1 100644 --- a/usb/aidl/Android.bp +++ b/usb/aidl/Android.bp @@ -39,4 +39,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/.hash b/usb/aidl/aidl_api/android.hardware.usb/1/.hash new file mode 100644 index 0000000000..8f9ea333dd --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/.hash @@ -0,0 +1 @@ +9762531142d72e03bb4228209846c135f276d40e diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantDetectionStatus.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantDetectionStatus.aidl new file mode 100644 index 0000000000..24c69664f7 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantDetectionStatus.aidl @@ -0,0 +1,41 @@ +/* + * 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.usb; +@VintfStability +enum ContaminantDetectionStatus { + NOT_SUPPORTED = 0, + DISABLED = 1, + NOT_DETECTED = 2, + DETECTED = 3, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionMode.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionMode.aidl new file mode 100644 index 0000000000..99798693ff --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionMode.aidl @@ -0,0 +1,41 @@ +/* + * 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.usb; +@VintfStability +enum ContaminantProtectionMode { + NONE = 0, + FORCE_SINK = 1, + FORCE_SOURCE = 2, + FORCE_DISABLE = 3, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionStatus.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionStatus.aidl new file mode 100644 index 0000000000..9642261444 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/ContaminantProtectionStatus.aidl @@ -0,0 +1,42 @@ +/* + * 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.usb; +@VintfStability +enum ContaminantProtectionStatus { + NONE = 0, + FORCE_SINK = 1, + FORCE_SOURCE = 2, + FORCE_DISABLE = 3, + DISABLED = 4, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsb.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsb.aidl new file mode 100644 index 0000000000..859f52652b --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsb.aidl @@ -0,0 +1,45 @@ +/* + * 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.usb; +@VintfStability +interface IUsb { + oneway void enableContaminantPresenceDetection(in String portName, in boolean enable, long transactionId); + oneway void enableUsbData(in String portName, boolean enable, long transactionId); + oneway void enableUsbDataWhileDocked(in String portName, long transactionId); + oneway void queryPortStatus(long transactionId); + oneway void setCallback(in android.hardware.usb.IUsbCallback callback); + oneway void switchRole(in String portName, in android.hardware.usb.PortRole role, long transactionId); + oneway void limitPowerTransfer(in String portName, boolean limit, long transactionId); + oneway void resetUsbPort(in String portName, long transactionId); +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsbCallback.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsbCallback.aidl new file mode 100644 index 0000000000..4abfaec53b --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/IUsbCallback.aidl @@ -0,0 +1,45 @@ +/* + * 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.usb; +@VintfStability +interface IUsbCallback { + oneway void notifyPortStatusChange(in android.hardware.usb.PortStatus[] currentPortStatus, in android.hardware.usb.Status retval); + oneway void notifyRoleSwitchStatus(in String portName, in android.hardware.usb.PortRole newRole, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyEnableUsbDataStatus(in String portName, boolean enable, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyEnableUsbDataWhileDockedStatus(in String portName, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyContaminantEnabledStatus(in String portName, boolean enable, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyQueryPortStatus(in String portName, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyLimitPowerTransferStatus(in String portName, boolean limit, in android.hardware.usb.Status retval, long transactionId); + oneway void notifyResetUsbPortStatus(in String portName, in android.hardware.usb.Status retval, long transactionId); +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortDataRole.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortDataRole.aidl new file mode 100644 index 0000000000..105b316775 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortDataRole.aidl @@ -0,0 +1,40 @@ +/* + * 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.usb; +@VintfStability +enum PortDataRole { + NONE = 0, + HOST = 1, + DEVICE = 2, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortMode.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortMode.aidl new file mode 100644 index 0000000000..34e43343ad --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortMode.aidl @@ -0,0 +1,43 @@ +/* + * 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.usb; +@VintfStability +enum PortMode { + NONE = 0, + UFP = 1, + DFP = 2, + DRP = 3, + AUDIO_ACCESSORY = 4, + DEBUG_ACCESSORY = 5, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortPowerRole.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortPowerRole.aidl new file mode 100644 index 0000000000..0e6f3fb426 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortPowerRole.aidl @@ -0,0 +1,40 @@ +/* + * 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.usb; +@VintfStability +enum PortPowerRole { + NONE = 0, + SOURCE = 1, + SINK = 2, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortRole.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortRole.aidl new file mode 100644 index 0000000000..c66aeccde9 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortRole.aidl @@ -0,0 +1,40 @@ +/* + * 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.usb; +@VintfStability +union PortRole { + android.hardware.usb.PortPowerRole powerRole = android.hardware.usb.PortPowerRole.NONE; + android.hardware.usb.PortDataRole dataRole; + android.hardware.usb.PortMode mode; +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortStatus.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortStatus.aidl new file mode 100644 index 0000000000..dfd99fb249 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PortStatus.aidl @@ -0,0 +1,53 @@ +/* + * 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.usb; +@VintfStability +parcelable PortStatus { + String portName; + android.hardware.usb.PortDataRole currentDataRole = android.hardware.usb.PortDataRole.NONE; + android.hardware.usb.PortPowerRole currentPowerRole = android.hardware.usb.PortPowerRole.NONE; + android.hardware.usb.PortMode currentMode = android.hardware.usb.PortMode.NONE; + boolean canChangeMode; + boolean canChangeDataRole; + boolean canChangePowerRole; + android.hardware.usb.PortMode[] supportedModes; + android.hardware.usb.ContaminantProtectionMode[] supportedContaminantProtectionModes; + boolean supportsEnableContaminantPresenceProtection; + android.hardware.usb.ContaminantProtectionStatus contaminantProtectionStatus = android.hardware.usb.ContaminantProtectionStatus.NONE; + boolean supportsEnableContaminantPresenceDetection; + android.hardware.usb.ContaminantDetectionStatus contaminantDetectionStatus = android.hardware.usb.ContaminantDetectionStatus.NOT_SUPPORTED; + android.hardware.usb.UsbDataStatus[] usbDataStatus; + boolean powerTransferLimited; + android.hardware.usb.PowerBrickStatus powerBrickStatus; +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PowerBrickStatus.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PowerBrickStatus.aidl new file mode 100644 index 0000000000..01d2fdd9f7 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/PowerBrickStatus.aidl @@ -0,0 +1,40 @@ +/* + * 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.usb; +@VintfStability +enum PowerBrickStatus { + UNKNOWN = 0, + CONNECTED = 1, + NOT_CONNECTED = 2, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/Status.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/Status.aidl new file mode 100644 index 0000000000..f28fc2a70e --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/Status.aidl @@ -0,0 +1,42 @@ +/* + * 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.usb; +@Backing(type="int") @VintfStability +enum Status { + SUCCESS = 0, + ERROR = 1, + INVALID_ARGUMENT = 2, + UNRECOGNIZED_ROLE = 3, + NOT_SUPPORTED = 4, +} diff --git a/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/UsbDataStatus.aidl b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/UsbDataStatus.aidl new file mode 100644 index 0000000000..e2c0cfbef1 --- /dev/null +++ b/usb/aidl/aidl_api/android.hardware.usb/1/android/hardware/usb/UsbDataStatus.aidl @@ -0,0 +1,44 @@ +/* + * 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.usb; +@VintfStability +enum UsbDataStatus { + UNKNOWN = 0, + ENABLED = 1, + DISABLED_OVERHEAT = 2, + DISABLED_CONTAMINANT = 3, + DISABLED_DOCK = 4, + DISABLED_FORCE = 5, + DISABLED_DEBUG = 6, +} diff --git a/uwb/aidl/Android.bp b/uwb/aidl/Android.bp index 36cde9b68d..cc61046683 100755 --- a/uwb/aidl/Android.bp +++ b/uwb/aidl/Android.bp @@ -39,6 +39,13 @@ aidl_interface { min_sdk_version: "Tiramisu", }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } aidl_interface { @@ -62,4 +69,11 @@ aidl_interface { min_sdk_version: "Tiramisu", }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/.hash b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/.hash new file mode 100644 index 0000000000..ac0f6d8b4a --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/.hash @@ -0,0 +1 @@ +f9f7a7ae2f4650c0a42af37720c8a11e95a6bf33 diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl new file mode 100644 index 0000000000..cbe20688ad --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl @@ -0,0 +1,47 @@ +/* + * 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="int") @VintfStability +enum UwbVendorCapabilityTlvTypes { + SUPPORTED_POWER_STATS_QUERY = 192, + CCC_SUPPORTED_CHAPS_PER_SLOT = 160, + CCC_SUPPORTED_SYNC_CODES = 161, + CCC_SUPPORTED_HOPPING_CONFIG_MODES_AND_SEQUENCES = 162, + CCC_SUPPORTED_CHANNELS = 163, + CCC_SUPPORTED_VERSIONS = 164, + CCC_SUPPORTED_UWB_CONFIGS = 165, + CCC_SUPPORTED_PULSE_SHAPE_COMBOS = 166, + CCC_SUPPORTED_RAN_MULTIPLIER = 167, + SUPPORTED_AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 227, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvValues.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvValues.aidl new file mode 100644 index 0000000000..0e33f70221 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvValues.aidl @@ -0,0 +1,56 @@ +/* + * 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 UwbVendorCapabilityTlvValues { + UWB_CONFIG_0 = 0, + UWB_CONFIG_1 = 1, + PULSE_SHAPE_SYMMETRICAL_ROOT_RAISED_COSINE = 0, + PULSE_SHAPE_PRECURSOR_FREE = 1, + PULSE_SHAPE_PRECURSOR_FREE_SPECIAL = 2, + CHAPS_PER_SLOT_3 = 1, + CHAPS_PER_SLOT_4 = 2, + CHAPS_PER_SLOT_6 = 4, + CHAPS_PER_SLOT_8 = 8, + CHAPS_PER_SLOT_9 = 16, + CHAPS_PER_SLOT_12 = 32, + CHAPS_PER_SLOT_24 = 64, + HOPPING_SEQUENCE_DEFAULT = 16, + HOPPING_SEQUENCE_AES = 8, + HOPPING_CONFIG_MODE_NONE = 128, + HOPPING_CONFIG_MODE_CONTINUOUS = 64, + HOPPING_CONFIG_MODE_ADAPTIVE = 32, + CCC_CHANNEL_5 = 1, + CCC_CHANNEL_9 = 2, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGidAndroidOids.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGidAndroidOids.aidl new file mode 100644 index 0000000000..cd2e122029 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGidAndroidOids.aidl @@ -0,0 +1,39 @@ +/* + * 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="byte") @VintfStability +enum UwbVendorGidAndroidOids { + ANDROID_GET_POWER_STATS = 0, + ANDROID_SET_COUNTRY_CODE = 1, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGids.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGids.aidl new file mode 100644 index 0000000000..5515c67961 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorGids.aidl @@ -0,0 +1,38 @@ +/* + * 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="byte") @VintfStability +enum UwbVendorGids { + ANDROID = 12, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl new file mode 100644 index 0000000000..d35728fbef --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl @@ -0,0 +1,46 @@ +/* + * 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="int") @VintfStability +enum UwbVendorSessionAppConfigTlvTypes { + CCC_HOP_MODE_KEY = 160, + CCC_UWB_TIME0 = 161, + CCC_RANGING_PROTOCOL_VER = 163, + CCC_UWB_CONFIG_ID = 164, + CCC_PULSESHAPE_COMBO = 165, + CCC_URSK_TTL = 166, + NB_OF_RANGE_MEASUREMENTS = 227, + NB_OF_AZIMUTH_MEASUREMENTS = 228, + NB_OF_ELEVATION_MEASUREMENTS = 229, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvValues.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvValues.aidl new file mode 100644 index 0000000000..a7f487bcd2 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvValues.aidl @@ -0,0 +1,38 @@ +/* + * 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="int") @VintfStability +enum UwbVendorSessionAppConfigTlvValues { + AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 240, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionInitSessionType.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionInitSessionType.aidl new file mode 100644 index 0000000000..30a0a1b98f --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorSessionInitSessionType.aidl @@ -0,0 +1,38 @@ +/* + * 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="int") @VintfStability +enum UwbVendorSessionInitSessionType { + CCC = 160, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl new file mode 100644 index 0000000000..2f534df10c --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/1/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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="byte") @VintfStability +enum UwbVendorStatusCodes { + STATUS_ERROR_CCC_SE_BUSY = 80, + STATUS_ERROR_CCC_LIFECYCLE = 81, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/.hash b/uwb/aidl/aidl_api/android.hardware.uwb/1/.hash new file mode 100644 index 0000000000..b4bd21e465 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/.hash @@ -0,0 +1 @@ +5bffd1b593a254bcbe9cb0b2fcf29f71452ae0af diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwb.aidl b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwb.aidl new file mode 100644 index 0000000000..9553ffc26d --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwb.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Copyright 2021 NXP. + * + * 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; +@VintfStability +interface IUwb { + List<String> getChips(); + android.hardware.uwb.IUwbChip getChip(String name); +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbChip.aidl b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbChip.aidl new file mode 100644 index 0000000000..0e640be2dd --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbChip.aidl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Copyright 2021 NXP. + * + * 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; +@VintfStability +interface IUwbChip { + String getName(); + void open(in android.hardware.uwb.IUwbClientCallback clientCallback); + void close(); + void coreInit(); + void sessionInit(int sessionId); + int getSupportedAndroidUciVersion(); + int sendUciMessage(in byte[] data); +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbClientCallback.aidl b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbClientCallback.aidl new file mode 100644 index 0000000000..aac8e966bd --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/IUwbClientCallback.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Copyright 2021 NXP. + * + * 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; +@VintfStability +interface IUwbClientCallback { + oneway void onUciMessage(in byte[] data); + oneway void onHalEvent(in android.hardware.uwb.UwbEvent event, in android.hardware.uwb.UwbStatus status); +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbEvent.aidl b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbEvent.aidl new file mode 100644 index 0000000000..6b30d8c6ed --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbEvent.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Copyright 2021 NXP. + * + * 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; +@Backing(type="int") @VintfStability +enum UwbEvent { + OPEN_CPLT = 0, + CLOSE_CPLT = 1, + POST_INIT_CPLT = 2, + ERROR = 3, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbStatus.aidl b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbStatus.aidl new file mode 100644 index 0000000000..88d766a7fa --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb/1/android/hardware/uwb/UwbStatus.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Copyright 2021 NXP. + * + * 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; +@Backing(type="int") @VintfStability +enum UwbStatus { + OK = 0, + FAILED = 1, + ERR_TRANSPORT = 2, + ERR_CMD_TIMEOUT = 3, + REFUSED = 4, +} diff --git a/wifi/1.6/default/wifi_chip.cpp b/wifi/1.6/default/wifi_chip.cpp index 7f0e97df7f..f062409d4e 100644 --- a/wifi/1.6/default/wifi_chip.cpp +++ b/wifi/1.6/default/wifi_chip.cpp @@ -1003,14 +1003,14 @@ std::pair<WifiStatus, sp<V1_5::IWifiApIface>> WifiChip::createBridgedApIfaceInte br_ifaces_ap_instances_[br_ifname] = ap_instances; if (!iface_util_->createBridge(br_ifname)) { LOG(ERROR) << "Failed createBridge - br_name=" << br_ifname.c_str(); - invalidateAndClearBridgedAp(br_ifname); + deleteApIface(br_ifname); return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}}; } for (auto const& instance : ap_instances) { // Bind ap instance interface to AP bridge if (!iface_util_->addIfaceToBridge(br_ifname, instance)) { LOG(ERROR) << "Failed add if to Bridge - if_name=" << instance.c_str(); - invalidateAndClearBridgedAp(br_ifname); + deleteApIface(br_ifname); return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}}; } } @@ -1044,8 +1044,7 @@ WifiStatus WifiChip::removeApIfaceInternal(const std::string& ifname) { // nan/rtt objects over AP iface. But, there is no harm to do it // here and not make that assumption all over the place. invalidateAndRemoveDependencies(ifname); - // Clear the bridge interface and the iface instance. - invalidateAndClearBridgedAp(ifname); + deleteApIface(ifname); invalidateAndClear(ap_ifaces_, iface); for (const auto& callback : event_cb_handler_.getCallbacks()) { if (!callback->onIfaceRemoved(IfaceType::AP, ifname).isOk()) { @@ -2005,21 +2004,28 @@ void WifiChip::invalidateAndClearBridgedApAll() { br_ifaces_ap_instances_.clear(); } -void WifiChip::invalidateAndClearBridgedAp(const std::string& br_name) { - if (br_name.empty()) return; - // delete managed interfaces +void WifiChip::deleteApIface(const std::string& if_name) { + if (if_name.empty()) return; + // delete bridged interfaces if have for (auto const& it : br_ifaces_ap_instances_) { - if (it.first == br_name) { + if (it.first == if_name) { for (auto const& iface : it.second) { - iface_util_->removeIfaceFromBridge(br_name, iface); + iface_util_->removeIfaceFromBridge(if_name, iface); legacy_hal_.lock()->deleteVirtualInterface(iface); } - iface_util_->deleteBridge(br_name); - br_ifaces_ap_instances_.erase(br_name); - break; + iface_util_->deleteBridge(if_name); + br_ifaces_ap_instances_.erase(if_name); + // ifname is bridged AP, return here. + return; } } - return; + + // No bridged AP case, delete AP iface + legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->deleteVirtualInterface(if_name); + if (legacy_status != legacy_hal::WIFI_SUCCESS) { + LOG(ERROR) << "Failed to remove interface: " << if_name << " " + << legacyErrorToString(legacy_status); + } } bool WifiChip::findUsingNameFromBridgedApInstances(const std::string& name) { diff --git a/wifi/1.6/default/wifi_chip.h b/wifi/1.6/default/wifi_chip.h index f952a68654..e8ddaa6f9e 100644 --- a/wifi/1.6/default/wifi_chip.h +++ b/wifi/1.6/default/wifi_chip.h @@ -272,7 +272,7 @@ class WifiChip : public V1_6::IWifiChip { bool writeRingbufferFilesInternal(); std::string getWlanIfaceNameWithType(IfaceType type, unsigned idx); void invalidateAndClearBridgedApAll(); - void invalidateAndClearBridgedAp(const std::string& br_name); + void deleteApIface(const std::string& if_name); bool findUsingNameFromBridgedApInstances(const std::string& name); WifiStatus triggerSubsystemRestartInternal(); std::pair<WifiStatus, sp<V1_6::IWifiRttController>> createRttControllerInternal_1_6( diff --git a/wifi/hostapd/aidl/Android.bp b/wifi/hostapd/aidl/Android.bp index fcd06ffb7a..c97f8da833 100644 --- a/wifi/hostapd/aidl/Android.bp +++ b/wifi/hostapd/aidl/Android.bp @@ -43,4 +43,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/.hash b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/.hash new file mode 100644 index 0000000000..9a92d8acb4 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/.hash @@ -0,0 +1 @@ +370160cd436c80c5d355de5ad11d2aaee684d801 diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ApInfo.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ApInfo.aidl new file mode 100644 index 0000000000..ca20f377be --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ApInfo.aidl @@ -0,0 +1,43 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable ApInfo { + String ifaceName; + String apIfaceInstance; + int freqMhz; + android.hardware.wifi.hostapd.ChannelBandwidth channelBandwidth; + android.hardware.wifi.hostapd.Generation generation; + byte[] apIfaceInstanceMacAddress; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/BandMask.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/BandMask.aidl new file mode 100644 index 0000000000..b1e7f66ed4 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/BandMask.aidl @@ -0,0 +1,41 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum BandMask { + BAND_2_GHZ = 1, + BAND_5_GHZ = 2, + BAND_6_GHZ = 4, + BAND_60_GHZ = 8, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelBandwidth.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelBandwidth.aidl new file mode 100644 index 0000000000..6c1fd22266 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelBandwidth.aidl @@ -0,0 +1,50 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum ChannelBandwidth { + BANDWIDTH_INVALID = 0, + BANDWIDTH_AUTO = 1, + BANDWIDTH_20_NOHT = 2, + BANDWIDTH_20 = 3, + BANDWIDTH_40 = 4, + BANDWIDTH_80 = 5, + BANDWIDTH_80P80 = 6, + BANDWIDTH_160 = 7, + BANDWIDTH_320 = 8, + BANDWIDTH_2160 = 9, + BANDWIDTH_4320 = 10, + BANDWIDTH_6480 = 11, + BANDWIDTH_8640 = 12, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelParams.aidl new file mode 100644 index 0000000000..43a9ada0e8 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ChannelParams.aidl @@ -0,0 +1,42 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable ChannelParams { + android.hardware.wifi.hostapd.BandMask bandMask; + android.hardware.wifi.hostapd.FrequencyRange[] acsChannelFreqRangesMhz; + boolean enableAcs; + boolean acsShouldExcludeDfs; + int channel; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ClientInfo.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ClientInfo.aidl new file mode 100644 index 0000000000..c4d62b68cc --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ClientInfo.aidl @@ -0,0 +1,41 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable ClientInfo { + String ifaceName; + String apIfaceInstance; + byte[] clientAddress; + boolean isConnected; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/DebugLevel.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/DebugLevel.aidl new file mode 100644 index 0000000000..9795211df0 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/DebugLevel.aidl @@ -0,0 +1,43 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum DebugLevel { + EXCESSIVE = 0, + MSGDUMP = 1, + DEBUG = 2, + INFO = 3, + WARNING = 4, + ERROR = 5, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/EncryptionType.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/EncryptionType.aidl new file mode 100644 index 0000000000..a7b20fa053 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/EncryptionType.aidl @@ -0,0 +1,44 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum EncryptionType { + NONE = 0, + WPA = 1, + WPA2 = 2, + WPA3_SAE_TRANSITION = 3, + WPA3_SAE = 4, + WPA3_OWE_TRANSITION = 5, + WPA3_OWE = 6, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/FrequencyRange.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/FrequencyRange.aidl new file mode 100644 index 0000000000..11851438bd --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/FrequencyRange.aidl @@ -0,0 +1,39 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable FrequencyRange { + int startMhz; + int endMhz; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Generation.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Generation.aidl new file mode 100644 index 0000000000..5bb0d32869 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Generation.aidl @@ -0,0 +1,44 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum Generation { + WIFI_STANDARD_UNKNOWN = -1, + WIFI_STANDARD_LEGACY = 0, + WIFI_STANDARD_11N = 1, + WIFI_STANDARD_11AC = 2, + WIFI_STANDARD_11AD = 3, + WIFI_STANDARD_11AX = 4, + WIFI_STANDARD_11BE = 5, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HostapdStatusCode.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HostapdStatusCode.aidl new file mode 100644 index 0000000000..548e497680 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HostapdStatusCode.aidl @@ -0,0 +1,43 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum HostapdStatusCode { + SUCCESS = 0, + FAILURE_UNKNOWN = 1, + FAILURE_ARGS_INVALID = 2, + FAILURE_IFACE_UNKNOWN = 3, + FAILURE_IFACE_EXISTS = 4, + FAILURE_CLIENT_UNKNOWN = 5, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HwModeParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HwModeParams.aidl new file mode 100644 index 0000000000..d732bcbcd8 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/HwModeParams.aidl @@ -0,0 +1,48 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable HwModeParams { + boolean enable80211N; + boolean enable80211AC; + boolean enable80211AX; + boolean enable6GhzBand; + boolean enableHeSingleUserBeamformer; + boolean enableHeSingleUserBeamformee; + boolean enableHeMultiUserBeamformer; + boolean enableHeTargetWakeTime; + boolean enableEdmg; + boolean enable80211BE; + android.hardware.wifi.hostapd.ChannelBandwidth maximumChannelBandwidth; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapd.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapd.aidl new file mode 100644 index 0000000000..ff941fdbf7 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapd.aidl @@ -0,0 +1,43 @@ +/* + * 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.wifi.hostapd; +@VintfStability +interface IHostapd { + void addAccessPoint(in android.hardware.wifi.hostapd.IfaceParams ifaceParams, in android.hardware.wifi.hostapd.NetworkParams nwParams); + void forceClientDisconnect(in String ifaceName, in byte[] clientAddress, in android.hardware.wifi.hostapd.Ieee80211ReasonCode reasonCode); + void registerCallback(in android.hardware.wifi.hostapd.IHostapdCallback callback); + void removeAccessPoint(in String ifaceName); + void setDebugParams(in android.hardware.wifi.hostapd.DebugLevel level); + oneway void terminate(); +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapdCallback.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapdCallback.aidl new file mode 100644 index 0000000000..9dd062a1f2 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IHostapdCallback.aidl @@ -0,0 +1,40 @@ +/* + * 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.wifi.hostapd; +@VintfStability +interface IHostapdCallback { + oneway void onApInstanceInfoChanged(in android.hardware.wifi.hostapd.ApInfo apInfo); + oneway void onConnectedClientsChanged(in android.hardware.wifi.hostapd.ClientInfo clientInfo); + oneway void onFailure(in String ifaceName, in String instanceName); +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Ieee80211ReasonCode.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Ieee80211ReasonCode.aidl new file mode 100644 index 0000000000..99879b59bd --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/Ieee80211ReasonCode.aidl @@ -0,0 +1,40 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum Ieee80211ReasonCode { + WLAN_REASON_UNSPECIFIED = 1, + WLAN_REASON_PREV_AUTH_NOT_VALID = 2, + WLAN_REASON_DISASSOC_AP_BUSY = 5, +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IfaceParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IfaceParams.aidl new file mode 100644 index 0000000000..0c88a398a3 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/IfaceParams.aidl @@ -0,0 +1,40 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable IfaceParams { + String name; + android.hardware.wifi.hostapd.HwModeParams hwModeParams; + android.hardware.wifi.hostapd.ChannelParams[] channelParams; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/NetworkParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/NetworkParams.aidl new file mode 100644 index 0000000000..4554223751 --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/NetworkParams.aidl @@ -0,0 +1,43 @@ +/* + * 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.wifi.hostapd; +@VintfStability +parcelable NetworkParams { + byte[] ssid; + boolean isHidden; + android.hardware.wifi.hostapd.EncryptionType encryptionType; + String passphrase; + boolean isMetered; + byte[] vendorElements; +} diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ParamSizeLimits.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ParamSizeLimits.aidl new file mode 100644 index 0000000000..70f94c1b5e --- /dev/null +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/1/android/hardware/wifi/hostapd/ParamSizeLimits.aidl @@ -0,0 +1,40 @@ +/* + * 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.wifi.hostapd; +@Backing(type="int") @VintfStability +enum ParamSizeLimits { + SSID_MAX_LEN_IN_BYTES = 32, + WPA2_PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8, + WPA2_PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63, +} diff --git a/wifi/netlinkinterceptor/aidl/Android.bp b/wifi/netlinkinterceptor/aidl/Android.bp index 924edee384..2f7f34fb24 100644 --- a/wifi/netlinkinterceptor/aidl/Android.bp +++ b/wifi/netlinkinterceptor/aidl/Android.bp @@ -33,4 +33,11 @@ aidl_interface { enabled: false, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } diff --git a/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/.hash b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/.hash new file mode 100644 index 0000000000..ea75498cd4 --- /dev/null +++ b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/.hash @@ -0,0 +1 @@ +32dabbc53f6f51763228400e3dea8e11c36d677f diff --git a/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/IInterceptor.aidl b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/IInterceptor.aidl new file mode 100644 index 0000000000..3d0f955371 --- /dev/null +++ b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/IInterceptor.aidl @@ -0,0 +1,41 @@ +/* + * 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.net.nlinterceptor; +@VintfStability +interface IInterceptor { + android.hardware.net.nlinterceptor.InterceptedSocket createSocket(in int nlFamily, in int clientNlPid, in String clientName); + void closeSocket(in android.hardware.net.nlinterceptor.InterceptedSocket handle); + void subscribeGroup(in android.hardware.net.nlinterceptor.InterceptedSocket handle, in int nlGroup); + void unsubscribeGroup(in android.hardware.net.nlinterceptor.InterceptedSocket handle, in int nlGroup); +} diff --git a/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/InterceptedSocket.aidl b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/InterceptedSocket.aidl new file mode 100644 index 0000000000..b679be506a --- /dev/null +++ b/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/InterceptedSocket.aidl @@ -0,0 +1,39 @@ +/* + * 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.net.nlinterceptor; +@VintfStability +parcelable InterceptedSocket { + int nlFamily; + int portId; +} diff --git a/wifi/supplicant/aidl/Android.bp b/wifi/supplicant/aidl/Android.bp index d00dd2189f..ca0785b6a6 100644 --- a/wifi/supplicant/aidl/Android.bp +++ b/wifi/supplicant/aidl/Android.bp @@ -43,4 +43,11 @@ aidl_interface { }, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + } |