Skip to content

Commit aae9486

Browse files
author
Rob
committed
fix(ui): swap to androidx.lifecycle.compose.LocalLifecycleOwner
androidx.compose.ui.platform.LocalLifecycleOwner was removed from compose-ui:1.11.x (used by compose-bom:2026.05.00). Source artifacts no longer ship the symbol, so the import resolves to nothing in release builds and bindToLifecycle() receives null during AndroidView measure, crashing the app on opening the Sensors menu or Expressive Settings. Move both call sites (InlineQrScannerCard, ExpressiveSettingsScreen) to androidx.lifecycle.compose.LocalLifecycleOwner, which is the canonical provider shipped via lifecycle-runtime-compose:2.10.0 (already on the classpath) and is what every other screen in the app uses.
1 parent bb69d27 commit aae9486

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Common/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ android {
8989
//compileSdk 36
9090
applicationId "cloud.glucodroid"
9191

92-
versionName '0.2.4.4-alpha'
93-
versionCode 8244
92+
versionName '0.2.4.5'
93+
versionCode 8245
9494
// multiDexEnabled true
9595

9696
buildConfigField 'String', 'BUILD_TIME', 'new java.text.SimpleDateFormat("HH:mm:ss dd-MMM-yyyy").format(new java.util.Date(' + System.currentTimeMillis() + 'L))'

Common/src/mobile/java/tk/glucodata/ui/ExpressiveSettingsScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import androidx.compose.ui.graphics.Color
4141
import androidx.compose.ui.graphics.graphicsLayer
4242
import androidx.compose.ui.graphics.vector.ImageVector
4343
import androidx.compose.ui.platform.LocalContext
44-
import androidx.compose.ui.platform.LocalLifecycleOwner
44+
import androidx.lifecycle.compose.LocalLifecycleOwner
4545
import androidx.lifecycle.Lifecycle
4646
import androidx.lifecycle.LifecycleEventObserver
4747
import androidx.compose.ui.res.painterResource

Common/src/mobile/java/tk/glucodata/ui/setup/InlineQrScannerCard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import androidx.compose.ui.draw.clip
5454
import androidx.compose.ui.graphics.Brush
5555
import androidx.compose.ui.graphics.Color
5656
import androidx.compose.ui.platform.LocalContext
57-
import androidx.compose.ui.platform.LocalLifecycleOwner
57+
import androidx.lifecycle.compose.LocalLifecycleOwner
5858
import androidx.compose.ui.res.stringResource
5959
import androidx.compose.ui.unit.dp
6060
import androidx.compose.ui.viewinterop.AndroidView

0 commit comments

Comments
 (0)