diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b59c5bc2..adc4d290 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -36,12 +36,13 @@ fun getCommitHash(): String { } android { - compileSdk = 33 + compileSdk = 34 + namespace = "org.derpfest.flash" defaultConfig { applicationId = "org.derpfest.flash" minSdk = 26 - targetSdk = 33 + targetSdk = 34 versionCode = 1 versionName = getCommitHash() } diff --git a/app/libs/Android.bp b/app/libs/Android.bp index 6ba28524..bba2f58e 100644 --- a/app/libs/Android.bp +++ b/app/libs/Android.bp @@ -7,8 +7,13 @@ android_library_import { name: "Flash_androidx.camera_camera-camera2-nodeps", +<<<<<<< HEAD aars: ["androidx/camera/camera-camera2/1.4.0-alpha01/camera-camera2-1.4.0-alpha01.aar"], sdk_version: "33", +======= + aars: ["androidx/camera/camera-camera2/1.3.0-rc01/camera-camera2-1.3.0-rc01.aar"], + sdk_version: "34", +>>>>>>> 4819e68 (Flash: Update to API 34) min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -25,7 +30,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-camera2", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -45,8 +50,13 @@ android_library { android_library_import { name: "Flash_androidx.camera_camera-core-nodeps", +<<<<<<< HEAD aars: ["androidx/camera/camera-core/1.4.0-alpha01/camera-core-1.4.0-alpha01.aar"], sdk_version: "33", +======= + aars: ["androidx/camera/camera-core/1.3.0-rc01/camera-core-1.3.0-rc01.aar"], + sdk_version: "34", +>>>>>>> 4819e68 (Flash: Update to API 34) min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -67,7 +77,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-core", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -91,8 +101,13 @@ android_library { android_library_import { name: "Flash_androidx.camera_camera-extensions-nodeps", +<<<<<<< HEAD aars: ["androidx/camera/camera-extensions/1.4.0-alpha01/camera-extensions-1.4.0-alpha01.aar"], sdk_version: "33", +======= + aars: ["androidx/camera/camera-extensions/1.3.0-rc01/camera-extensions-1.3.0-rc01.aar"], + sdk_version: "34", +>>>>>>> 4819e68 (Flash: Update to API 34) min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -110,7 +125,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-extensions", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -131,8 +146,13 @@ android_library { android_library_import { name: "Flash_androidx.camera_camera-lifecycle-nodeps", +<<<<<<< HEAD aars: ["androidx/camera/camera-lifecycle/1.4.0-alpha01/camera-lifecycle-1.4.0-alpha01.aar"], sdk_version: "33", +======= + aars: ["androidx/camera/camera-lifecycle/1.3.0-rc01/camera-lifecycle-1.3.0-rc01.aar"], + sdk_version: "34", +>>>>>>> 4819e68 (Flash: Update to API 34) min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -150,7 +170,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-lifecycle", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -172,7 +192,7 @@ android_library { android_library_import { name: "Flash_androidx.camera_camera-video-nodeps", aars: ["androidx/camera/camera-video/1.4.0-alpha01/camera-video-1.4.0-alpha01.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -188,7 +208,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-video", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -207,8 +227,13 @@ android_library { android_library_import { name: "Flash_androidx.camera_camera-view-nodeps", +<<<<<<< HEAD aars: ["androidx/camera/camera-view/1.4.0-alpha01/camera-view-1.4.0-alpha01.aar"], sdk_version: "33", +======= + aars: ["androidx/camera/camera-view/1.3.0-rc01/camera-view-1.3.0-rc01.aar"], + sdk_version: "34", +>>>>>>> 4819e68 (Flash: Update to API 34) min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -230,7 +255,7 @@ android_library_import { android_library { name: "Flash_androidx.camera_camera-view", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -256,7 +281,7 @@ android_library { java_import { name: "Flash_androidx.lifecycle_lifecycle-common-nodeps", jars: ["androidx/lifecycle/lifecycle-common/2.6.1/lifecycle-common-2.6.1.jar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -266,7 +291,7 @@ java_import { java_library_static { name: "Flash_androidx.lifecycle_lifecycle-common", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -283,7 +308,7 @@ java_library_static { android_library_import { name: "Flash_androidx.media3_media3-common-nodeps", aars: ["androidx/media3/media3-common/1.1.1/media3-common-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -297,7 +322,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-common", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -315,7 +340,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-container-nodeps", aars: ["androidx/media3/media3-container/1.1.1/media3-container-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -328,7 +353,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-container", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -345,7 +370,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-database-nodeps", aars: ["androidx/media3/media3-database/1.1.1/media3-database-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -358,7 +383,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-database", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -375,7 +400,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-datasource-nodeps", aars: ["androidx/media3/media3-datasource/1.1.1/media3-datasource-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -389,7 +414,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-datasource", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -407,7 +432,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-decoder-nodeps", aars: ["androidx/media3/media3-decoder/1.1.1/media3-decoder-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -420,7 +445,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-decoder", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -437,7 +462,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-exoplayer-nodeps", aars: ["androidx/media3/media3-exoplayer/1.1.1/media3-exoplayer-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -456,7 +481,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-exoplayer", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -479,7 +504,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-extractor-nodeps", aars: ["androidx/media3/media3-extractor/1.1.1/media3-extractor-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -494,7 +519,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-extractor", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -513,7 +538,7 @@ android_library { android_library_import { name: "Flash_androidx.media3_media3-ui-nodeps", aars: ["androidx/media3/media3-ui/1.1.1/media3-ui-1.1.1.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -528,7 +553,7 @@ android_library_import { android_library { name: "Flash_androidx.media3_media3-ui", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -547,7 +572,7 @@ android_library { android_library_import { name: "Flash_com.google.android.material_material-nodeps", aars: ["com/google/android/material/material/1.9.0/material-1.9.0.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -574,7 +599,7 @@ android_library_import { android_library { name: "Flash_com.google.android.material_material", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -605,7 +630,7 @@ android_library { java_import { name: "Flash_com.google.errorprone_error_prone_annotations-nodeps", jars: ["com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0.jar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -615,7 +640,7 @@ java_import { java_library_static { name: "Flash_com.google.errorprone_error_prone_annotations", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -630,7 +655,7 @@ java_library_static { java_import { name: "Flash_com.google.zxing_core-nodeps", jars: ["com/google/zxing/core/3.5.2/core-3.5.2.jar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -640,7 +665,7 @@ java_import { java_library_static { name: "Flash_com.google.zxing_core", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -655,7 +680,7 @@ java_library_static { java_import { name: "Flash_com.squareup.okhttp3_okhttp-nodeps", jars: ["com/squareup/okhttp3/okhttp/4.10.0/okhttp-4.10.0.jar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -665,7 +690,7 @@ java_import { java_library_static { name: "Flash_com.squareup.okhttp3_okhttp", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -682,7 +707,7 @@ java_library_static { java_import { name: "Flash_com.squareup.okio_okio-jvm-nodeps", jars: ["com/squareup/okio/okio-jvm/3.2.0/okio-jvm-3.2.0.jar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -692,7 +717,7 @@ java_import { java_library_static { name: "Flash_com.squareup.okio_okio-jvm", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -708,7 +733,7 @@ java_library_static { android_library_import { name: "Flash_io.coil-kt_coil-base-nodeps", aars: ["io/coil-kt/coil-base/2.2.2/coil-base-2.2.2.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -728,7 +753,7 @@ android_library_import { android_library { name: "Flash_io.coil-kt_coil-base", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -752,7 +777,7 @@ android_library { android_library_import { name: "Flash_io.coil-kt_coil-video-nodeps", aars: ["io/coil-kt/coil-video/2.2.2/coil-video-2.2.2.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -766,7 +791,7 @@ android_library_import { android_library { name: "Flash_io.coil-kt_coil-video", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -784,7 +809,7 @@ android_library { android_library_import { name: "Flash_io.coil-kt_coil-nodeps", aars: ["io/coil-kt/coil/2.2.2/coil-2.2.2.aar"], - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", @@ -797,7 +822,7 @@ android_library_import { android_library { name: "Flash_io.coil-kt_coil", - sdk_version: "33", + sdk_version: "34", min_sdk_version: "14", apex_available: [ "//apex_available:platform", diff --git a/app/src/main/java/org/derpfest/flash/CameraActivity.kt b/app/src/main/java/org/derpfest/flash/CameraActivity.kt index 19f84ecf..8c6d8387 100644 --- a/app/src/main/java/org/derpfest/flash/CameraActivity.kt +++ b/app/src/main/java/org/derpfest/flash/CameraActivity.kt @@ -253,20 +253,22 @@ open class CameraActivity : AppCompatActivity() { } override fun onFling( - e1: MotionEvent, e2: MotionEvent, velocityX: Float, velocityY: Float + e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float ): Boolean { - if (!handler.hasMessages(MSG_ON_PINCH_TO_ZOOM) && - abs(e1.x - e2.x) > 75 * resources.displayMetrics.density - ) { - if (e2.x > e1.x) { - // Left to right - changeCameraMode(cameraMode.previous()) - } else { - // Right to left - changeCameraMode(cameraMode.next()) + return e1?.let { + if (!handler.hasMessages(MSG_ON_PINCH_TO_ZOOM) && + abs(it.x - e2.x) > 75 * resources.displayMetrics.density + ) { + if (e2.x > it.x) { + // Left to right + changeCameraMode(cameraMode.previous()) + } else { + // Right to left + changeCameraMode(cameraMode.next()) + } } - } - return true + true + } ?: false } }) } diff --git a/app/src/main/java/org/derpfest/flash/ui/Slider.kt b/app/src/main/java/org/derpfest/flash/ui/Slider.kt index 6e730928..b4585129 100644 --- a/app/src/main/java/org/derpfest/flash/ui/Slider.kt +++ b/app/src/main/java/org/derpfest/flash/ui/Slider.kt @@ -98,13 +98,11 @@ abstract class Slider @JvmOverloads constructor( } } - override fun onDraw(canvas: Canvas?) { + override fun onDraw(canvas: Canvas) { super.onDraw(canvas) - canvas?.let { - drawTrack(it) - drawThumb(it) - } + drawTrack(canvas) + drawThumb(canvas) } abstract fun track(): RectF diff --git a/lens_launcher/build.gradle.kts b/lens_launcher/build.gradle.kts index d5320665..a2be50d2 100644 --- a/lens_launcher/build.gradle.kts +++ b/lens_launcher/build.gradle.kts @@ -9,12 +9,13 @@ plugins { } android { - compileSdk = 33 + compileSdk = 34 + namespace = "com.google.android.apps.googlecamera.fishfood" defaultConfig { applicationId = "com.google.android.apps.googlecamera.fishfood" minSdk = 26 - targetSdk = 33 + targetSdk = 34 versionCode = 1 versionName = "1.0" }