Delay restarting SystemUI on debug builds.
When a flag changes, delay restarting systemui by 1 second after the
screen goes idle. This prevents a race condition with entering
dream/doze/aod.
Also, refactor `FeatureFlagsReleaseRestarter` and
`FeatureFlagsDebugRestarter` into `ConditionalRestarter`, since they
share a great deal of the same functionality. This also has the
nice effect of making the tests smaller and more focused.
Fixes: 268060399
Test: atest SystemUITest && manual testing
Change-Id: Iae7ddc5965a95c72d35caafc2c90b267be7c3a6d
12 files changed