StatusBar: add DISABLE2_NOTIFICATION_SHADE flag.

Previously, DISABLE_EXPAND would disable the expansion of the status
bar. But this was only limited to the unlocked case. The status bar (and
thus the quick settings panel) could still be expanded on the lock
screen (keyguard), by swiping down from either the status bar or the
notification cards.

We introduce a new flag which would disable notification shade on all
surfaces, which will be used by DevicePolicyManager to enforce LockTask
restrictions, etc.

Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
      DevicePolicyManager

Change-Id: I364567422e0ca8837ecffa3037adc131c3cef691
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index c191618..7b11ace 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -667,7 +667,7 @@
             return false;
         }
         initDownStates(event);
-        if (mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
+        if (mBar.panelEnabled() && mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
             mIsExpansionFromHeadsUp = true;
             MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
             MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);