This repository was archived by the owner on Feb 21, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/inkapplications/ack/android/ui/theme
android-extensions/src/main/java/com/inkapplications/android/extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,12 +58,15 @@ android {
5858 signingConfigs.getByName(" debug" )
5959 }
6060
61- isMinifyEnabled = false
61+ isMinifyEnabled = true
62+ isShrinkResources = true
63+ proguardFiles(getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro" )
6264 }
6365 }
6466 compileOptions {
6567 targetCompatibility = JavaVersion .VERSION_1_8
6668 sourceCompatibility = JavaVersion .VERSION_1_8
69+ isCoreLibraryDesugaringEnabled = true
6770 }
6871 kotlinOptions {
6972 jvmTarget = " 1.8"
@@ -127,4 +130,5 @@ dependencies {
127130 testImplementation(thirdParty.junit)
128131 testImplementation(kotlinLibraries.coroutines.test)
129132 testImplementation(kotlinLibraries.kotlin.test.core)
133+ coreLibraryDesugaring(" com.android.tools:desugar_jdk_libs:2.0.4" )
130134}
Original file line number Diff line number Diff line change 1+ # Kotlin
2+ -keepattributes InnerClasses # Needed for `getDeclaredClasses`.
3+ -keep public class kotlinx.serialization.* { public *; }
4+ -dontwarn kotlinx.serialization.**
5+ -keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
6+ static <1>$$serializer INSTANCE;
7+ }
8+
9+ # Okhttp
10+ -keep public class org.bouncycastle.jsse.** { *; }
11+ -dontwarn org.bouncycastle.jsse.**
12+ -keep public class org.conscrypt.** { *; }
13+ -dontwarn org.conscrypt.**
14+ -keep public class org.openjsse.** { *; }
15+ -dontwarn org.openjsse.**
16+
17+ # Mapbox
18+ -keep class com.mapbox.android.telemetry.**
19+ -keep class com.mapbox.android.core.location.**
20+ -keep class android.arch.lifecycle.** { *; }
21+ -keep class com.mapbox.android.core.location.** { *; }
22+ -dontnote com.mapbox.mapboxsdk.**
23+ -dontnote com.mapbox.android.gestures.**
24+ -dontnote com.mapbox.mapboxsdk.plugins.**
25+
26+ -keep public class com.google.android.gms.* { public *; }
27+ -dontwarn com.google.android.gms.**
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ object AckTheme {
5151 val colors
5252 @Composable
5353 @ReadOnlyComposable
54- get() = if (isSystemInDarkTheme()) darkColors else lightColors
54+ get() = if (isSystemInDarkTheme() || Build . VERSION . SDK_INT < Build . VERSION_CODES . N ) darkColors else lightColors
5555
5656 val spacing
5757 @Composable
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import android.location.LocationManager
1010import androidx.preference.PreferenceManager
1111import com.inkapplications.android.extensions.bluetooth.AndroidBluetoothAccess
1212import com.inkapplications.android.extensions.bluetooth.BluetoothDeviceAccess
13+ import com.inkapplications.android.extensions.bluetooth.DummyBluetoothDeviceAccess
1314import com.inkapplications.android.extensions.format.AndroidResourceDateTimeFormatter
1415import com.inkapplications.android.extensions.format.DateTimeFormatter
1516import com.inkapplications.android.extensions.location.AndroidLocationAccess
@@ -47,11 +48,13 @@ class ApplicationModule {
4748 @Reusable
4849 fun bluetoothAccess (
4950 context : Context ,
50- bluetooth : BluetoothAdapter ,
51- ): BluetoothDeviceAccess = AndroidBluetoothAccess (
52- context = context,
53- bluetoothAdapter = bluetooth,
54- )
51+ ): BluetoothDeviceAccess {
52+ val bluetooth = BluetoothAdapter .getDefaultAdapter() ? : return DummyBluetoothDeviceAccess
53+ return AndroidBluetoothAccess (
54+ context = context,
55+ bluetoothAdapter = bluetooth,
56+ )
57+ }
5558}
5659
5760@Module
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.inkapplications.android.extensions.bluetooth
33import android.Manifest
44import androidx.annotation.RequiresPermission
55import kotlinx.coroutines.flow.Flow
6+ import kotlinx.coroutines.flow.flowOf
67import java.io.InputStream
78import java.io.OutputStream
89import java.util.*
@@ -19,3 +20,15 @@ interface BluetoothDeviceAccess {
1920 )
2021}
2122
23+ /* *
24+ * No-op implementation of [BluetoothDeviceAccess].
25+ */
26+ object DummyBluetoothDeviceAccess: BluetoothDeviceAccess {
27+ override val devices: Flow <List <BluetoothDeviceData >> = flowOf()
28+
29+ override suspend fun connect (
30+ device : BluetoothDeviceData ,
31+ uuid : UUID ,
32+ onConnect : suspend (InputStream , OutputStream ) -> Unit ,
33+ ) = Unit
34+ }
You can’t perform that action at this time.
0 commit comments