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

Commit 69bc047e authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[RONs] Setup AOD Skeleton View when added" into main

parents e9a8607b 2f7e2ab2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -379,12 +379,25 @@ object KeyguardRootViewBinder {
                )
            )

        // Ensure the view reflects the final state after items are added.
        fun onViewAdded(id: Int, view: View) {
            when (id) {
                aodPromotedNotificationId ->
                    view.setAodPromotedNotifIsVisible(viewModel.isAodPromotedNotifVisible.value)
                aodNotificationIconContainerId ->
                    view.setAodNotifIconContainerIsVisible(
                        viewModel.isNotifIconContainerVisible.value
                    )
            }
        }

        // Views will be added or removed after the call to bind(). This is needed to avoid many
        // calls to findViewById
        view.setOnHierarchyChangeListener(
            object : OnHierarchyChangeListener {
                override fun onChildViewAdded(parent: View, child: View) {
                    childViews.put(child.id, child)
                    onViewAdded(child.id, child)
                }

                override fun onChildViewRemoved(parent: View, child: View) {