summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-15 00:17:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-15 00:17:19 +0000
commitefd9a8abf775082cb37834f0462d2c94ba61199d (patch)
tree3024d9d3891eabf684804cc089bc216e46489363
parentfd598ad501aeb61a6f2c78b00044fb27bc7f7fbc (diff)
parent207e26a358917495fcddbfa57d005e0030a6140c (diff)
downloadcamera-efd9a8abf775082cb37834f0462d2c94ba61199d.tar.gz
Snap for 11097608 from 207e26a358917495fcddbfa57d005e0030a6140c to 24Q1-release
Change-Id: Icf8bddad9a50b9d6bbc2c5ae887ecd28ee074036
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestState.cpp14
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestState.h1
-rw-r--r--devices/EmulatedCamera/hwl/configs/emu_camera_back.json12
-rw-r--r--devices/EmulatedCamera/hwl/configs/emu_camera_front.json36
4 files changed, 63 insertions, 0 deletions
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
index 4e4fba6..9ed161a 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
@@ -735,6 +735,20 @@ status_t EmulatedRequestState::InitializeSensorSettings(
}
}
+ // Check manual flash strength level
+ ret = request_settings_->Get(ANDROID_FLASH_STRENGTH_LEVEL, &entry);
+ if ((ret == OK) && (entry.count == 1)) {
+ flash_strength_level_ = entry.data.i32[0];
+ if (ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL > 1 &&
+ ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL > 1 && is_flash_supported_) {
+ ALOGI("%s: Device supports manual flash strength control", __FUNCTION__);
+ flash_strength_level_ = entry.data.i32[0];
+ } else {
+ ALOGI("%s: Device does not support manual flash strength control", __FUNCTION__);
+ return BAD_VALUE;
+ }
+ }
+
// Check video stabilization parameter
uint8_t edge_mode = ANDROID_EDGE_MODE_OFF;
ret = request_settings_->Get(ANDROID_EDGE_MODE, &entry);
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.h b/devices/EmulatedCamera/hwl/EmulatedRequestState.h
index c1e4e49..b9d9f31 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestState.h
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.h
@@ -249,6 +249,7 @@ class EmulatedRequestState {
// android.flash.*
bool is_flash_supported_ = false;
uint8_t flash_state_ = ANDROID_FLASH_STATE_UNAVAILABLE;
+ int32_t flash_strength_level_ = 1;
// android.sensor.*
std::pair<int32_t, int32_t> sensor_sensitivity_range_;
diff --git a/devices/EmulatedCamera/hwl/configs/emu_camera_back.json b/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
index 6d611bb..723f361 100644
--- a/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
+++ b/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
@@ -118,6 +118,18 @@
"2",
"3"
],
+ "android.flash.singleStrengthMaxLevel" : [
+ "10"
+ ],
+ "android.flash.singleStrengthDefaultLevel": [
+ "2"
+ ],
+ "android.flash.torchStrengthDefaultLevel": [
+ "5"
+ ],
+ "android.flash.torchStrengthMaxLevel" :[
+ "15"
+ ],
"android.flash.info.available": [
"TRUE"
],
diff --git a/devices/EmulatedCamera/hwl/configs/emu_camera_front.json b/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
index 54727ea..7feca73 100644
--- a/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
+++ b/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
@@ -186,6 +186,18 @@
"0",
"3"
],
+ "android.flash.singleStrengthMaxLevel" : [
+ "10"
+ ],
+ "android.flash.singleStrengthDefaultLevel": [
+ "2"
+ ],
+ "android.flash.torchStrengthDefaultLevel": [
+ "5"
+ ],
+ "android.flash.torchStrengthMaxLevel" :[
+ "15"
+ ],
"android.flash.info.available": [
"TRUE"
],
@@ -1688,6 +1700,18 @@
"0",
"3"
],
+ "android.flash.singleStrengthMaxLevel" : [
+ "10"
+ ],
+ "android.flash.singleStrengthDefaultLevel": [
+ "2"
+ ],
+ "android.flash.torchStrengthDefaultLevel": [
+ "5"
+ ],
+ "android.flash.torchStrengthMaxLevel" :[
+ "15"
+ ],
"android.flash.info.available": [
"TRUE"
],
@@ -3159,6 +3183,18 @@
"0",
"3"
],
+ "android.flash.singleStrengthMaxLevel" : [
+ "10"
+ ],
+ "android.flash.singleStrengthDefaultLevel": [
+ "2"
+ ],
+ "android.flash.torchStrengthDefaultLevel": [
+ "5"
+ ],
+ "android.flash.torchStrengthMaxLevel" :[
+ "15"
+ ],
"android.flash.info.available": [
"TRUE"
],