Aperture: Reformat code
Change-Id: I669f6df9adfb2f4f092ecce383c8f660a1f2ff97
diff --git a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
index 4b626c1..9993d7d 100644
--- a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
+++ b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
@@ -1524,14 +1524,18 @@
}
CameraMode.PHOTO -> {
cameraController.imageCaptureResolutionSelector = ResolutionSelector.Builder()
- .setAspectRatioStrategy(AspectRatioStrategy(
- photoAspectRatio, AspectRatioStrategy.FALLBACK_RULE_AUTO
- ))
- .setAllowedResolutionMode(if (cameraManager.enableHighResolution) {
- ResolutionSelector.PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE
- } else {
- ResolutionSelector.PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION
- })
+ .setAspectRatioStrategy(
+ AspectRatioStrategy(
+ photoAspectRatio, AspectRatioStrategy.FALLBACK_RULE_AUTO
+ )
+ )
+ .setAllowedResolutionMode(
+ if (cameraManager.enableHighResolution) {
+ ResolutionSelector.PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE
+ } else {
+ ResolutionSelector.PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION
+ }
+ )
.build()
CameraController.IMAGE_CAPTURE
}
diff --git a/app/src/main/java/org/lineageos/aperture/utils/BroadcastUtils.kt b/app/src/main/java/org/lineageos/aperture/utils/BroadcastUtils.kt
index 9aa892a..0713773 100644
--- a/app/src/main/java/org/lineageos/aperture/utils/BroadcastUtils.kt
+++ b/app/src/main/java/org/lineageos/aperture/utils/BroadcastUtils.kt
@@ -15,6 +15,7 @@
fun broadcastNewPicture(context: Context, uri: Uri) =
context.sendBroadcast(Intent(ACTION_NEW_PICTURE, uri))
+
fun broadcastNewVideo(context: Context, uri: Uri) =
context.sendBroadcast(Intent(ACTION_NEW_VIDEO, uri))
}