Fix global screen rotation issue.

Bug: 14080683
Change-Id: I0144faafa0e01c14c8c8e6a6c9fc81a10d25f47d
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
index 716e326..d175d7a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
@@ -99,10 +99,14 @@
     }
 
     private void adjustScreenOrientation(State state) {
-        if (!state.isKeyguardShowingAndNotOccluded() || mKeyguardScreenRotation) {
-            mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
+        if (state.isKeyguardShowingAndNotOccluded()) {
+            if (mKeyguardScreenRotation) {
+                mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
+            } else {
+                mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
+            }
         } else {
-            mLp.screenOrientation =  ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
+            mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
         }
     }