Fix hub timeout not working if dream restarts underneath hub after timeout

While we do expect the dream to be running underneath the hub when
docked, this is not the case when the dream app is being updated.
In these cases, the dream may be gone for longer than the device's
screen timeout.

This CL adjusts our timeout logic so that we start the timeout if the
dream restarts underneath the hub and no timeout is running.

Bug: 335862476
Fix: 335862476
Test: atest CommunalSceneStartableTest
Flag: ACONFIG com.android.systemui.communal_hub TEAMFOOD
Change-Id: I7175fd2023bf86537f1d23e4dcaff9d28ea86c5d
2 files changed