Loading packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/touch/CommunalTouchHandlerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public class CommunalTouchHandlerTest extends SysuiTestCase { mTouchHandler.onSessionStart(mTouchSession); verify(mTouchSession).registerInputListener(inputEventListenerArgumentCaptor.capture()); inputEventListenerArgumentCaptor.getValue().onInputEvent(motionEvent); verify(mCentralSurfaces).handleDreamTouch(motionEvent); verify(mCentralSurfaces).handleCommunalHubTouch(motionEvent); } @Test Loading packages/SystemUI/src/com/android/systemui/dreams/touch/CommunalTouchHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class CommunalTouchHandler implements TouchHandler { // Notification shade window has its own logic to be visible if the hub is open, no need to // do anything here other than send touch events over. session.registerInputListener(ev -> { surfaces.handleDreamTouch((MotionEvent) ev); surfaces.handleCommunalHubTouch((MotionEvent) ev); if (ev != null && ((MotionEvent) ev).getAction() == MotionEvent.ACTION_UP) { var unused = session.pop(); } Loading packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.systemui.communal.ui.compose.CommunalContainer import com.android.systemui.communal.ui.compose.CommunalContent import com.android.systemui.communal.ui.viewmodel.CommunalViewModel import com.android.systemui.communal.util.CommunalColors import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.shared.model.KeyguardState Loading @@ -64,6 +65,7 @@ import kotlinx.coroutines.launch * * This will be used until the glanceable hub is integrated into Flexiglass. */ @SysUISingleton class GlanceableHubContainerController @Inject constructor( Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +5 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner, CoreStartable @Deprecated float getDisplayDensity(); /** * Forwards touch events to communal hub */ void handleCommunalHubTouch(MotionEvent event); public static class KeyboardShortcutsMessage { final int mDeviceId; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces { override fun shouldIgnoreTouch() = false override fun isDeviceInteractive() = false override fun handleDreamTouch(event: MotionEvent?) {} override fun handleCommunalHubTouch(event: MotionEvent?) {} override fun awakenDreams() {} override fun isBouncerShowing() = false override fun isBouncerShowingScrimmed() = false Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/touch/CommunalTouchHandlerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public class CommunalTouchHandlerTest extends SysuiTestCase { mTouchHandler.onSessionStart(mTouchSession); verify(mTouchSession).registerInputListener(inputEventListenerArgumentCaptor.capture()); inputEventListenerArgumentCaptor.getValue().onInputEvent(motionEvent); verify(mCentralSurfaces).handleDreamTouch(motionEvent); verify(mCentralSurfaces).handleCommunalHubTouch(motionEvent); } @Test Loading
packages/SystemUI/src/com/android/systemui/dreams/touch/CommunalTouchHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class CommunalTouchHandler implements TouchHandler { // Notification shade window has its own logic to be visible if the hub is open, no need to // do anything here other than send touch events over. session.registerInputListener(ev -> { surfaces.handleDreamTouch((MotionEvent) ev); surfaces.handleCommunalHubTouch((MotionEvent) ev); if (ev != null && ((MotionEvent) ev).getAction() == MotionEvent.ACTION_UP) { var unused = session.pop(); } Loading
packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.systemui.communal.ui.compose.CommunalContainer import com.android.systemui.communal.ui.compose.CommunalContent import com.android.systemui.communal.ui.viewmodel.CommunalViewModel import com.android.systemui.communal.util.CommunalColors import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.shared.model.KeyguardState Loading @@ -64,6 +65,7 @@ import kotlinx.coroutines.launch * * This will be used until the glanceable hub is integrated into Flexiglass. */ @SysUISingleton class GlanceableHubContainerController @Inject constructor( Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +5 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner, CoreStartable @Deprecated float getDisplayDensity(); /** * Forwards touch events to communal hub */ void handleCommunalHubTouch(MotionEvent event); public static class KeyboardShortcutsMessage { final int mDeviceId; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces { override fun shouldIgnoreTouch() = false override fun isDeviceInteractive() = false override fun handleDreamTouch(event: MotionEvent?) {} override fun handleCommunalHubTouch(event: MotionEvent?) {} override fun awakenDreams() {} override fun isBouncerShowing() = false override fun isBouncerShowingScrimmed() = false Loading