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

Commit 9906a5bf authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge "Access viewRootImpl from view.rootView in a null-safe manner in...

Merge "Access viewRootImpl from view.rootView in a null-safe manner in WindowRootViewBinder" into main
parents d811d8cb d98d8342
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ object WindowRootViewBinder {
        view.repeatWhenAttached {
            Log.d(TAG, "Binding root view")
            var frameCallbackPendingExecution: FrameCallback? = null
            val viewRootImpl = view.rootView.viewRootImpl
            view.viewModel(
                minWindowLifecycleState = WindowLifecycleState.ATTACHED,
                factory = { viewModelFactory.create() },
@@ -64,13 +63,13 @@ object WindowRootViewBinder {
                                val newFrameCallback = FrameCallback {
                                    frameCallbackPendingExecution = null
                                    blurUtils.applyBlur(
                                        viewRootImpl,
                                        view.rootView?.viewRootImpl,
                                        blurState.radius,
                                        blurState.isOpaque,
                                    )
                                    viewModel.onBlurApplied(blurState.radius)
                                }
                                blurUtils.prepareBlur(viewRootImpl, blurState.radius)
                                blurUtils.prepareBlur(view.rootView?.viewRootImpl, blurState.radius)
                                if (frameCallbackPendingExecution != null) {
                                    choreographer.removeFrameCallback(frameCallbackPendingExecution)
                                }