Disable assist gesture when keyguard is active

Prevent search gesture from firing when keyguard is in restricted input mode,
e.g. in Emergency Dialer. Also disable the Home touch listener in this mode to
avoid bringing up the ring.  Affects both phone and tablets.

Bug: 6723749
Change-Id: I60f0aebfcce4cf7f66798ee1212ea326bdad3ef0
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index eff6061..c0838c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -608,7 +608,7 @@
         public boolean onTouch(View v, MotionEvent event) {
             switch(event.getAction()) {
             case MotionEvent.ACTION_DOWN:
-                if (!shouldDisableNavbarGestures()) {
+                if (!shouldDisableNavbarGestures() && !inKeyguardRestrictedInputMode()) {
                     mHandler.removeCallbacks(mShowSearchPanel);
                     mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
                 }