Make CentralSurfaces optional
CentralSurfaces will instacrash on TV devices if it doesn't haave all
of its dependencies available. Since it is included by SystemUIBinder
via CentralSurfacesModule, we need to remove SystemUIBinder from TV.
When we do that, we find that BouncerSwipeTouchHandler has a hard
dependency on phone.CentralSurfaces meaning that CentralSurfaces was
not actually optional any more.
So we need to convert the dependency there to Optional<>. In future
the fact that TV does not have a CentralSurfaces should guarantee
compile errors if this happens again and keep CentralSurfaces actually
Optional as the javadocs say.
We also need to remove a lot of phone-specific assumptions under the
dreams/touch area, as the following classes remain present even after
this change:
- com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController
- com.android.systemui.statusbar.phone.NotificationShadeWindowControllerImpl
- com.android.systemui.statusbar.phone.ConfigurationControllerImpl
- com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
- com.android.systemui.statusbar.phone.DozeParameters
But that's a much larger task for another day.
Bug: 228414760
Change-Id: Id0a5e35e113bb1d0268c7f687cbd54799a1d9b77
3 files changed