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

Commit 30186ac1 authored by Darrell Shi's avatar Darrell Shi
Browse files

Remove NotificationPanelView from LockSection

The code to explictly remove lock_icon_view in the LockSection
Composable is a remanant from lecacy UI, so it is removed. Injecting
NotificationPanelView when scene container is enabled also crashes
SystemUI.

Test: verified SystemUI does not crash with LockSection injected and
      scene container enabled
Test: verified keyguard works correctly with scene container disabled
Bug: 339448760
Flag: EXEMPT clean up
Change-Id: Id5a3880186ed0b64e56db8f27fa16b06e5a60d25
parent 5656467d
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.systemui.keyguard.ui.composable.section

import android.content.Context
import android.util.DisplayMetrics
import android.view.View
import android.view.WindowManager
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@@ -47,7 +46,6 @@ import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryForegroundViewModel
import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryIconViewModel
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.res.R
import com.android.systemui.shade.NotificationPanelView
import com.android.systemui.statusbar.VibratorHelper
import dagger.Lazy
import javax.inject.Inject
@@ -66,7 +64,6 @@ constructor(
    private val deviceEntryBackgroundViewModel: Lazy<DeviceEntryBackgroundViewModel>,
    private val falsingManager: Lazy<FalsingManager>,
    private val vibratorHelper: Lazy<VibratorHelper>,
    private val notificationPanelView: NotificationPanelView,
) {
    @Composable
    fun SceneScope.LockIcon(overrideColor: Color? = null, modifier: Modifier = Modifier) {
@@ -74,10 +71,6 @@ constructor(
            return
        }

        notificationPanelView.findViewById<View?>(R.id.lock_icon_view)?.let {
            notificationPanelView.removeView(it)
        }

        val context = LocalContext.current

        AndroidView(