Basic implementation for notifications on lockscreen.

This change makes PhoneStatusBar expand while the lockscreen is
showing. Further, the KeyguardSimpleHostView is shown by
KeyguardBouncer, and the Bouncer is shown whenever the user tries to
unlock the phone (closing the shade).

Bug: 13635952
Change-Id: I4354b7a7937af6e1c93abf16ad6e485376d16bc2
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 e418ac5..6153cde 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
@@ -81,7 +81,6 @@
         mLp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
         mLp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
         mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
-        mLp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
         mLp.setTitle("StatusBar");
         mLp.packageName = mContext.getPackageName();
         mStatusBarView = statusBarView;
@@ -137,12 +136,21 @@
         }
     }
 
+    private void applyInputFeatures(State state) {
+        if (state.isKeyguardShowingAndNotOccluded()) {
+            mLp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
+        } else {
+            mLp.inputFeatures &= ~WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
+        }
+    }
+
     private void apply(State state) {
         applyKeyguardFlags(state);
         applyFocusableFlag(state);
         adjustScreenOrientation(state);
         applyHeight(state);
         applyUserActivityTimeout(state);
+        applyInputFeatures(state);
         mWindowManager.updateViewLayout(mStatusBarView, mLp);
     }