Ensure controller is attached before applying state

On devices that don't use the default SystemUI status bar, it's possible
that the StatusBarWindowController may not be attached. For this use
case, the current state should not be applied until it's attached, as
applying the state prior to this may cause NPE.

Bug: 218582429
Test: manual (gcar_emu_x86 && sdk_gphone_x86)
Change-Id: Ibe3c30ec8041dd5404c8a0def9a2a894362bf860
Merged-In: Ibe3c30ec8041dd5404c8a0def9a2a894362bf860
(cherry picked from commit 1ae56219578efb02eaf4a021e06f473316c5a8bc)
1 file changed