Modern Apps git

← Modern-Apps.git

camera: delete flagged commented-out code blocks

Commit
c5b8f59d4c37cc3b089cb260394580cec509273f
Author
Vayun Mathur <[email protected]>
When
2026-11-19 03:33 UTC (17 days ago)
Parents
8893ed1
CommentedOutCode flags two comment runs that read as code: the
toBitmap() null-frame note in CameraNightCapture (line 325) and the
SuppressLint rationale in CameraVideoSession (line 258). Both blocks are
deleted outright; version control keeps the old shape. The annotations
and catch/bind behaviour are unchanged.

Verified: ./gradlew :camera:lintDev :camera:testDevUnitTest passes.

Diff

camera/src/main/java/com/vayunmathur/camera/platform/CameraNightCapture.kt
diff --git a/camera/src/main/java/com/vayunmathur/camera/platform/CameraNightCapture.kt b/camera/src/main/java/com/vayunmathur/camera/platform/CameraNightCapture.ktindex f98c560400..a63c9c6c11 100644--- a/camera/src/main/java/com/vayunmathur/camera/platform/CameraNightCapture.kt+++ b/camera/src/main/java/com/vayunmathur/camera/platform/CameraNightCapture.kt@@ -322,8 +322,6 @@ private class NightBurstDriver(         } catch (e: IllegalArgumentException) {             Log.status("CameraViewModel", "Failed to convert night frame", e)         } catch (e: NullPointerException) {-            // toBitmap() platform-null on an undecodable frame: skip the-            // frame (the attempt bound in takeNext still ends the burst).             Log.status("CameraViewModel", "Failed to convert night frame", e)         } finally {             image.close()
camera/src/main/java/com/vayunmathur/camera/platform/CameraVideoSession.kt
diff --git a/camera/src/main/java/com/vayunmathur/camera/platform/CameraVideoSession.kt b/camera/src/main/java/com/vayunmathur/camera/platform/CameraVideoSession.ktindex 255037b450..0c95a990a6 100644--- a/camera/src/main/java/com/vayunmathur/camera/platform/CameraVideoSession.kt+++ b/camera/src/main/java/com/vayunmathur/camera/platform/CameraVideoSession.kt@@ -255,9 +255,7 @@ internal fun CameraViewModel.buildVideoPreview( }  /** Builds the video capture with codec/mirror/dynamic-range + capture options. */-@SuppressLint("RestrictedApi") // Recorder.Builder.setAudioSource(Int) is CameraX's documented-// public entry point for the mic source; the restriction is on the AudioSpec IntDef constants,-// not this builder method, and there is no public alternative.+@SuppressLint("RestrictedApi") internal fun CameraViewModel.buildVideoCapture(     session: VideoSessionPrep,     dynamicRange: androidx.camera.core.DynamicRange