Skip to content

Commit 923b8c0

Browse files
committed
Force white balance to auto
1 parent f37970d commit 923b8c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/com/dan/simplerawcamera/CameraActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,9 @@ class CameraActivity : AppCompatActivity() {
16171617

16181618
callSafe{ cameraCaptureSession.stopRepeating() }
16191619

1620+
captureRequestBuilder.set(CaptureRequest.CONTROL_AWB_LOCK, false)
1621+
captureRequestBuilder.set(CaptureRequest.CONTROL_AWB_MODE, CaptureRequest.CONTROL_AWB_MODE_AUTO)
1622+
16201623
if (photoMode) {
16211624
captureRequestBuilder.set(CaptureRequest.COLOR_CORRECTION_ABERRATION_MODE, CaptureRequest.COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY)
16221625
captureRequestBuilder.set(CaptureRequest.EDGE_MODE, CaptureRequest.EDGE_MODE_HIGH_QUALITY)
@@ -1635,8 +1638,6 @@ class CameraActivity : AppCompatActivity() {
16351638
captureRequestBuilder.set(CaptureRequest.CONTROL_AE_LOCK, true)
16361639
}
16371640

1638-
captureRequestBuilder.set(CaptureRequest.CONTROL_AWB_LOCK, true)
1639-
16401641
mLocation = if (settings.useLocation) {
16411642
mLocationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER)
16421643
} else {
@@ -1696,7 +1697,6 @@ class CameraActivity : AppCompatActivity() {
16961697
mLocation = null
16971698

16981699
captureRequestBuilder.set(CaptureRequest.CONTROL_AE_LOCK, false)
1699-
captureRequestBuilder.set(CaptureRequest.CONTROL_AWB_LOCK, false)
17001700

17011701
captureRequestBuilder.removeTarget(imageReaderDng.surface)
17021702
captureRequestBuilder.removeTarget(imageReaderJpeg.surface)

0 commit comments

Comments
 (0)