Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove reportDrawnWhen api due to crash on Android 9 #2533

Merged
merged 3 commits into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/src/main/kotlin/com/wire/android/ui/WireActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.WindowManager
import androidx.activity.compose.ReportDrawnWhen
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -38,10 +37,8 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -176,7 +173,6 @@ class WireActivity : AppCompatActivity() {
) {
setContent {
val snackbarHostState = remember { SnackbarHostState() }
var isLoaded by remember { mutableStateOf(false) }

LaunchedEffect(viewModel.globalAppState.themeOption) {
when (viewModel.globalAppState.themeOption) {
Expand All @@ -195,7 +191,6 @@ class WireActivity : AppCompatActivity() {
) {
WireTheme {
Column(modifier = Modifier.statusBarsPadding()) {
ReportDrawnWhen { isLoaded }
val navigator = rememberNavigator(this@WireActivity::finish)
CommonTopAppBar(
commonTopAppBarState = commonTopAppBarViewModel.state,
Expand All @@ -212,7 +207,6 @@ class WireActivity : AppCompatActivity() {
// This setup needs to be done after the navigation graph is created, because building the graph takes some time,
// and if any NavigationCommand is executed before the graph is fully built, it will cause a NullPointerException.
setUpNavigation(navigator.navController, onComplete)
isLoaded = true
handleScreenshotCensoring()
handleDialogs(
navigator::navigate,
Expand Down
Loading