Disable physical focus trigger and orange ring display when AI background mode is active

This commit is contained in:
2026-07-06 22:18:17 +07:00
parent 2de35196db
commit 9af4498897
@@ -757,7 +757,8 @@ class MainActivity : AppCompatActivity() {
userSelectedClassFocus = mask[maskY * mW + maskX].toInt()
}
// 1. Gửi lệnh Focus vật lý và đo sáng qua CameraX API (CONTROL_AF_MODE_AUTO, CONTROL_AF_REGIONS, CONTROL_AE_REGIONS)
// 1. Gửi lệnh Focus vật lý và đo sáng qua CameraX API (chỉ khi không sử dụng tính năng AI tách/xóa nền)
if (currentBackgroundMode != BackgroundMode.AI_BLUR) {
val cameraCtrl = this@MainActivity.cameraControl
if (cameraCtrl != null) {
try {
@@ -786,6 +787,7 @@ class MainActivity : AppCompatActivity() {
.setDuration(900)
.withEndAction { focusRing.visibility = android.view.View.GONE }
.start()
}
v.performClick()
}