This fixes a bug where keyguard was created without setting the preferred orientation. The result is it would temporarily assume the orientation of the device after being hidden. The fix sets the flag when the keyguard view hierarchy is created rather than when visibility changes. Fixes bug 8124979 Change-Id: Ic54a185e4f51f79f2bb7fbc5ffc6992641e89132