Do not launch Somnambulator as a dock app.

Fixes a black flash that occurred when the device was docked
because the UiModeManagerService was launching the Somnambulator
to start the dream when docked.  This caused an unnecessary
activity transition and could in fact make dreaming less
reliable than if the UiModeManagerService started the dream itself.

Moved common code from UiModeManagerService and Somnambulator
to Sandman to ensure it is kept in sync.

Bug: 7328545
Change-Id: I46102784e2ab1acc0241d43a48abf0581278af24
3 files changed