Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/BundleHeaderGutsContent.kt +17 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.systemui.statusbar.notification.row import android.content.Context import android.view.View import androidx.compose.ui.Modifier import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.semantics.onLongClick import androidx.compose.ui.semantics.semantics import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.compose.theme.PlatformTheme Loading Loading @@ -62,7 +65,20 @@ class BundleHeaderGutsContent(context: Context) : GutsContent { composeView.setContent { // TODO(b/399588047): Check if we can init PlatformTheme once instead of once // per ComposeView PlatformTheme { BundleHeaderGuts(viewModel) } PlatformTheme { BundleHeaderGuts( viewModel, modifier = Modifier.semantics(mergeDescendants = true) { onLongClick( action = { viewModel.onAllyLongClicked() true } ) }, ) } } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGuts.java +5 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,11 @@ public class NotificationGuts extends FrameLayout { public void setGutsContent(GutsContent content) { content.setGutsParent(this); if (!(content instanceof BundleHeaderGutsContent)) { // Skip accessibility delegate for bundle header guts, as the info there is handled // on the Compose side. content.getContentView().setAccessibilityDelegate(mGutsContentAccessibilityDelegate); } mGutsContent = content; removeAllViews(); addView(mGutsContent.getContentView()); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/BundleHeaderGutsViewModel.kt +6 −0 Original line number Diff line number Diff line Loading @@ -59,4 +59,10 @@ class BundleHeaderGutsViewModel( disableBundle.invoke() } } // Long click action for accessibility action on BundleHeaderGuts only. Touch-based long click // handling is done through NotificationStackScrollLayoutController. fun onAllyLongClicked() { closeGuts.invoke() } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/BundleHeaderGutsContent.kt +17 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.systemui.statusbar.notification.row import android.content.Context import android.view.View import androidx.compose.ui.Modifier import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.semantics.onLongClick import androidx.compose.ui.semantics.semantics import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.compose.theme.PlatformTheme Loading Loading @@ -62,7 +65,20 @@ class BundleHeaderGutsContent(context: Context) : GutsContent { composeView.setContent { // TODO(b/399588047): Check if we can init PlatformTheme once instead of once // per ComposeView PlatformTheme { BundleHeaderGuts(viewModel) } PlatformTheme { BundleHeaderGuts( viewModel, modifier = Modifier.semantics(mergeDescendants = true) { onLongClick( action = { viewModel.onAllyLongClicked() true } ) }, ) } } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGuts.java +5 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,11 @@ public class NotificationGuts extends FrameLayout { public void setGutsContent(GutsContent content) { content.setGutsParent(this); if (!(content instanceof BundleHeaderGutsContent)) { // Skip accessibility delegate for bundle header guts, as the info there is handled // on the Compose side. content.getContentView().setAccessibilityDelegate(mGutsContentAccessibilityDelegate); } mGutsContent = content; removeAllViews(); addView(mGutsContent.getContentView()); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/BundleHeaderGutsViewModel.kt +6 −0 Original line number Diff line number Diff line Loading @@ -59,4 +59,10 @@ class BundleHeaderGutsViewModel( disableBundle.invoke() } } // Long click action for accessibility action on BundleHeaderGuts only. Touch-based long click // handling is done through NotificationStackScrollLayoutController. fun onAllyLongClicked() { closeGuts.invoke() } }