Keyguard debug flags

These are temporary flags that let our UX team test various
interaction patterns. This CL will be reverted once we decide
how to move forward.

Bug: 111405682
Test: manual with setprop
Change-Id: I9235e1e56b0e355c32e808beb32ebd21538ca89d
diff --git a/packages/SystemUI/res/drawable/ic_home_button_outline.xml b/packages/SystemUI/res/drawable/ic_home_button_outline.xml
new file mode 100644
index 0000000..5bf345d
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_home_button_outline.xml
@@ -0,0 +1,25 @@
+<!--
+  ~ Copyright (C) 2018 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="28dp"
+        android:height="10dp"
+        android:viewportWidth="28"
+        android:viewportHeight="10">
+    <path
+        android:pathData="M23,1H5C2.7909,1 1,2.7909 1,5C1,7.2091 2.7909,9 5,9H23C25.2091,9 27,7.2091 27,5C27,2.7909 25.2091,1 23,1ZM5,0C2.2386,0 0,2.2386 0,5C0,7.7614 2.2386,10 5,10H23C25.7614,10 28,7.7614 28,5C28,2.2386 25.7614,0 23,0H5Z"
+        android:fillColor="?attr/wallpaperTextColor"
+        android:fillType="evenOdd"/>
+</vector>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index d5067b5..1be3975 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -22,6 +22,7 @@
 import android.graphics.PorterDuff;
 import android.graphics.drawable.AnimatedVectorDrawable;
 import android.graphics.drawable.Drawable;
+import android.os.SystemProperties;
 import android.util.AttributeSet;
 import android.view.accessibility.AccessibilityNodeInfo;
 
@@ -44,6 +45,8 @@
     private static final int STATE_FACE_UNLOCK = 2;
     private static final int STATE_FINGERPRINT = 3;
     private static final int STATE_FINGERPRINT_ERROR = 4;
+    private static final boolean HOLLOW_PILL = SystemProperties
+            .getBoolean("persist.sysui.hollow_pill", false);
 
     private int mLastState = 0;
     private boolean mLastDeviceInteractive;
@@ -221,6 +224,16 @@
                 throw new IllegalArgumentException();
         }
 
+        if (HOLLOW_PILL && deviceInteractive) {
+            switch (state) {
+                case STATE_FINGERPRINT:
+                case STATE_LOCK_OPEN:
+                case STATE_LOCKED:
+                case STATE_FACE_UNLOCK:
+                    iconRes = R.drawable.ic_home_button_outline;
+            }
+        }
+
         return mContext.getDrawable(iconRes);
     }
 
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 fa71df2..851e6d0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -2787,7 +2787,9 @@
         }
 
         final float darkAmount = dozing && !mSemiAwake ? 1 : 0;
-        mStatusBarStateController.setDozeAmount(darkAmount, animate);
+        if (!mSemiAwake) {
+            mStatusBarStateController.setDozeAmount(darkAmount, animate);
+        }
         if (animate) {
             mNotificationStackScroller.notifyDarkAnimationStart(mDozing);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
index ade063d..286eea0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
@@ -17,6 +17,7 @@
 package com.android.systemui.statusbar.phone;
 
 import android.graphics.Color;
+import android.os.SystemProperties;
 import android.os.Trace;
 import android.util.MathUtils;
 
@@ -75,7 +76,12 @@
         public void prepare(ScrimState previousState) {
             mBlankScreen = mDisplayRequiresBlanking && previousState != ScrimState.AOD;
             mAnimationDuration = StackStateAnimator.ANIMATION_DURATION_WAKEUP;
-            mCurrentBehindAlpha = ScrimController.GRADIENT_SCRIM_DARK_KEYGUARD;
+            String opacity = SystemProperties.get("persist.sysui.aod2_scrim_opacity", "0.8");
+            try {
+                mCurrentBehindAlpha = Float.parseFloat(opacity);
+            } catch (RuntimeException e) {
+                mCurrentBehindAlpha = ScrimController.GRADIENT_SCRIM_DARK_KEYGUARD;
+            }
             mCurrentInFrontAlpha = 0;
             mCurrentInFrontTint = Color.BLACK;
             mCurrentBehindTint = Color.BLACK;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index a6a9d74..1c4538e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -3264,6 +3264,10 @@
 
         mNotificationPanel.setDozing(mDozing, animate, mWakeUpTouchLocation,
                 mDozeServiceHost.wasPassivelyInterrupted());
+        if (mNotificationPanel.isSemiAwake()
+                && SystemProperties.getBoolean("persist.systemui.show_swipe_up", false)) {
+            mKeyguardIndicationController.showTransientIndication(R.string.keyguard_unlock);
+        }
         updateQsExpansionEnabled();
         Trace.endSection();
     }