Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc5fffb6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "In TransactionFlinger, don't wrap the SurfaceView with an AndroidView" into main

parents 36028c85 22b55373
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
@@ -24,10 +24,6 @@ import android.view.SurfaceHolder
import android.view.SurfaceView
import android.view.WindowInsets
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import androidx.compose.ui.viewinterop.AndroidView
import androidx.core.view.WindowCompat
import com.android.test.transactionflinger.Scene

@@ -51,17 +47,12 @@ abstract class SceneActivity : ComponentActivity(), SurfaceHolder.Callback, Vsyn

        choreographer = Choreographer.getInstance()
        scene = obtainScene()
        setContent {
            AndroidView(
                modifier = Modifier.fillMaxSize(),
                factory = { context ->
                    surfaceView = SurfaceView(context).apply {

        surfaceView = SurfaceView(this).apply {
            holder.addCallback(this@SceneActivity)
        }
                    surfaceView
                }
            )
        }

        setContentView(surfaceView)
    }

    override fun surfaceCreated(holder: SurfaceHolder) {}