mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Added dummy Lights to the Light HAL default implementation" am: 67bb5eb397 am: faf7e5bc6e am: 30a7e1ddfa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2167085 Change-Id: I2bcae711703dc254cf8df8171eaf6910e23eef8e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -23,12 +23,21 @@ namespace android {
|
||||
namespace hardware {
|
||||
namespace light {
|
||||
|
||||
static constexpr int kNumDefaultLights = 3;
|
||||
|
||||
ndk::ScopedAStatus Lights::setLightState(int id, const HwLightState& state) {
|
||||
LOG(INFO) << "Lights setting state for id=" << id << " to color " << std::hex << state.color;
|
||||
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||
if (id <= 0 || id > kNumDefaultLights) {
|
||||
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||
} else {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Lights::getLights(std::vector<HwLight>* /*lights*/) {
|
||||
ndk::ScopedAStatus Lights::getLights(std::vector<HwLight>* lights) {
|
||||
for (int i = 1; i <= kNumDefaultLights; i++) {
|
||||
lights->push_back({i, i});
|
||||
}
|
||||
LOG(INFO) << "Lights reporting supported lights";
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user