Move padlock to the top of the lock screen

Test: tap on notification on lock screen
Test: tap on notification on shade locked
Test: swipe down from the top expanding QS
Test: swipe up from LS
Test: switch between pin, pattern and password
Test: add and remove locked sim card
Test: atest KeyguardBottomAreaTest
Test: atest KeyguardClockPositionAlgorithmTest
Test: atest KeyguardMessageAreaTest
Test: atest KeyguardIndicationControllerTest
Test: atest StatusBarKeyguardViewManagerTest
Test: atest KeyguardBouncerTest
Test: atest KeyguardPatternViewTest
Fixes: 130398499
Fixes: 130298363
Fixes: 129784068
Fixes: 130223966
Change-Id: Ib1706de259fa4b1f4ef13f654cbd931457733d82
diff --git a/core/res/res/anim/lock_in.xml b/core/res/res/anim/lock_in.xml
index cd4effd..e687f9f 100755
--- a/core/res/res/anim/lock_in.xml
+++ b/core/res/res/anim/lock_in.xml
@@ -34,7 +34,7 @@
                                       android:trimPathOffset="0"
                                       android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
                                 <path android:name="_R_G_L_2_G_D_1_P_0"
-                                      android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+                                      android:strokeColor="#000" android:strokeLineCap="round"
                                       android:strokeLineJoin="round" android:strokeWidth="16"
                                       android:strokeAlpha="1" android:trimPathStart="0.14"
                                       android:trimPathEnd="0.89" android:trimPathOffset="0"
@@ -48,7 +48,7 @@
                     <group android:name="_R_G_L_1_G" android:translateX="-8.25"
                            android:translateY="-4.25" android:pivotX="8.25" android:pivotY="7.25"
                            android:scaleX="0" android:scaleY="0">
-                        <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+                        <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000"
                               android:fillAlpha="1" android:fillType="nonZero"
                               android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c  M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
                     </group>
@@ -58,7 +58,7 @@
                     <group android:name="_R_G_L_0_G" android:translateX="-2.25"
                            android:translateY="0.75" android:pivotX="2.25" android:pivotY="2.25"
                            android:scaleX="0" android:scaleY="0">
-                        <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+                        <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000"
                               android:fillAlpha="1" android:fillType="nonZero"
                               android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
                     </group>
diff --git a/core/res/res/anim/lock_lock.xml b/core/res/res/anim/lock_lock.xml
index ce9c8e8..8fc4f05 100755
--- a/core/res/res/anim/lock_lock.xml
+++ b/core/res/res/anim/lock_lock.xml
@@ -25,7 +25,7 @@
                            android:translateY="3">
                         <group android:name="_R_G_L_2_G" android:translateX="-8.25"
                                android:translateY="-7.25">
-                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000"
                                   android:fillAlpha="1" android:fillType="nonZero"
                                   android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c  M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
                         </group>
@@ -40,7 +40,7 @@
                             <group android:name="_R_G_L_1_G" android:translateX="6"
                                    android:translateY="5" android:pivotX="2.25"
                                    android:pivotY="2.25" android:scaleX="1" android:scaleY="1">
-                                <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+                                <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000"
                                       android:fillAlpha="1" android:fillType="nonZero"
                                       android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
                             </group>
@@ -61,7 +61,7 @@
                                       android:fillAlpha="0" android:fillType="nonZero"
                                       android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/>
                                 <path android:name="_R_G_L_0_G_D_1_P_0"
-                                      android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+                                      android:strokeColor="#000" android:strokeLineCap="round"
                                       android:strokeLineJoin="round" android:strokeWidth="16"
                                       android:strokeAlpha="1"
                                       android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/>
diff --git a/core/res/res/anim/lock_scanning.xml b/core/res/res/anim/lock_scanning.xml
index 998c965..8ced02b 100644
--- a/core/res/res/anim/lock_scanning.xml
+++ b/core/res/res/anim/lock_scanning.xml
@@ -28,7 +28,7 @@
                         <group android:name="_R_G_L_2_G" android:translateX="6"
                                android:translateY="5" android:pivotX="2.25" android:pivotY="2.25"
                                android:scaleX="1" android:scaleY="1">
-                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000"
                                   android:fillAlpha="1" android:fillType="nonZero"
                                   android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
                         </group>
@@ -45,7 +45,7 @@
                                android:scaleY="0.125">
                             <group android:name="_R_G_L_1_G" android:translateY="25.029">
                                 <path android:name="_R_G_L_1_G_D_0_P_0"
-                                      android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+                                      android:strokeColor="#000" android:strokeLineCap="round"
                                       android:strokeLineJoin="round" android:strokeWidth="16"
                                       android:strokeAlpha="1"
                                       android:pathData=" M-28.21 -25.03 C-28.21,-25.03 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.93,-26.15 27.93,-26.15 "/>
@@ -62,7 +62,7 @@
                         <group android:name="_R_G_L_0_G" android:translateY="0.04699999999999971"
                                android:pivotX="8.25" android:pivotY="7.25" android:scaleX="1.01562"
                                android:scaleY="1.01563">
-                            <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+                            <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000"
                                   android:fillAlpha="1" android:fillType="nonZero"
                                   android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c  M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
                         </group>
diff --git a/core/res/res/anim/lock_to_error.xml b/core/res/res/anim/lock_to_error.xml
index ddef96b..afe2290 100755
--- a/core/res/res/anim/lock_to_error.xml
+++ b/core/res/res/anim/lock_to_error.xml
@@ -26,7 +26,7 @@
                     <group android:name="_R_G_L_2_G" android:translateX="6"
                            android:translateY="4.954" android:pivotX="2.25" android:pivotY="2.25"
                            android:scaleX="0.98462" android:scaleY="0.98462">
-                        <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+                        <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000"
                               android:fillAlpha="1" android:fillType="nonZero"
                               android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
                     </group>
@@ -38,7 +38,7 @@
                     <group android:name="_R_G_L_1_G" android:translateX="-16.273"
                            android:translateY="32.312" android:pivotX="27.965" android:pivotY="-32"
                            android:scaleX="0.12308" android:scaleY="0.12308">
-                        <path android:name="_R_G_L_1_G_D_0_P_0" android:strokeColor="?attr/textColor"
+                        <path android:name="_R_G_L_1_G_D_0_P_0" android:strokeColor="#000"
                               android:strokeLineCap="round" android:strokeLineJoin="round"
                               android:strokeWidth="16" android:strokeAlpha="1"
                               android:pathData=" M-28.21 -25.03 C-28.21,-25.03 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.93,-26.15 27.93,-26.15 "/>
@@ -48,7 +48,7 @@
                        android:translateY="12.649999999999999" android:pivotX="8.25"
                        android:pivotY="7.25" android:rotation="0" android:scaleX="1.3"
                        android:scaleY="1.3">
-                    <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+                    <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000"
                           android:fillAlpha="1" android:fillType="nonZero"
                           android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c  M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
                 </group>
diff --git a/core/res/res/anim/lock_unlock.xml b/core/res/res/anim/lock_unlock.xml
index 0e85c9d..c8b2608 100755
--- a/core/res/res/anim/lock_unlock.xml
+++ b/core/res/res/anim/lock_unlock.xml
@@ -24,7 +24,7 @@
                     <group android:name="_R_G_L_2_G_T_1" android:translateY="3">
                         <group android:name="_R_G_L_2_G" android:translateX="-8.25"
                                android:translateY="-7.25">
-                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+                            <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000"
                                   android:fillAlpha="1" android:fillType="nonZero"
                                   android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c  M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
                         </group>
@@ -38,7 +38,7 @@
                             <group android:name="_R_G_L_1_G" android:translateX="6"
                                    android:translateY="5" android:pivotX="2.25"
                                    android:pivotY="2.25" android:scaleX="1" android:scaleY="1">
-                                <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+                                <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000"
                                       android:fillAlpha="1" android:fillType="nonZero"
                                       android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
                             </group>
@@ -58,7 +58,7 @@
                                       android:fillAlpha="0" android:fillType="nonZero"
                                       android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
                                 <path android:name="_R_G_L_0_G_D_1_P_0"
-                                      android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+                                      android:strokeColor="#000" android:strokeLineCap="round"
                                       android:strokeLineJoin="round" android:strokeWidth="16"
                                       android:strokeAlpha="1"
                                       android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
diff --git a/core/res/res/drawable/ic_lock.xml b/core/res/res/drawable/ic_lock.xml
index 8d7143b..fed0e0d 100644
--- a/core/res/res/drawable/ic_lock.xml
+++ b/core/res/res/drawable/ic_lock.xml
@@ -19,9 +19,9 @@
         android:viewportWidth="32"
         android:viewportHeight="32">
     <path
-        android:fillColor="?attr/textColor"
+        android:fillColor="#000"
         android:pathData="M16,20m-2.7,0a2.7,2.7 0,1 1,5.4 0a2.7,2.7 0,1 1,-5.4 0"/>
     <path
-        android:fillColor="?attr/textColor"
+        android:fillColor="#000"
         android:pathData="M24,10.7h-2V7.3c0,-3.3 -2.7,-6 -6,-6s-6,2.7 -6,6v3.3H8c-1.5,0 -2.7,1.2 -2.7,2.7v13.3c0,1.5 1.2,2.7 2.7,2.7h16c1.5,0 2.7,-1.2 2.7,-2.7V13.3C26.7,11.9 25.5,10.7 24,10.7zM12.7,7.3C12.7,5.5 14.2,4 16,4s3.3,1.5 3.3,3.3v3.3h-6.7V7.3zM24,26.7H8V13.3h2h12h2V26.7z"/>
 </vector>
diff --git a/core/res/res/drawable/ic_lock_open.xml b/core/res/res/drawable/ic_lock_open.xml
index 3a6bf93..494fd6a 100644
--- a/core/res/res/drawable/ic_lock_open.xml
+++ b/core/res/res/drawable/ic_lock_open.xml
@@ -19,9 +19,9 @@
         android:viewportWidth="32"
         android:viewportHeight="32">
     <path
-        android:fillColor="?attr/textColor"
+        android:fillColor="#000"
         android:pathData="M16,20m-2.67,0a2.67,2.67 0,1 1,5.34 0a2.67,2.67 0,1 1,-5.34 0"/>
     <path
-        android:fillColor="?attr/textColor"
+        android:fillColor="#000"
         android:pathData="M24.67,1.33a6,6 0,0 0,-6 6v3.34L8,10.67a2.67,2.67 0,0 0,-2.67 2.66L5.33,26.67A2.67,2.67 0,0 0,8 29.33L24,29.33a2.67,2.67 0,0 0,2.67 -2.66L26.67,13.33A2.67,2.67 0,0 0,24 10.67L21.33,10.67L21.33,7.33a3.34,3.34 0,0 1,6.67 0L28,8h2.67L30.67,7.33A6,6 0,0 0,24.67 1.33ZM24,13.33L24,26.67L8,26.67L8,13.33Z"/>
 </vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_message_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_message_area.xml
deleted file mode 100644
index 5da7611..0000000
--- a/packages/SystemUI/res-keyguard/layout/keyguard_message_area.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2012, 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.
-*/
--->
-
-<!-- This contains error message field and padlock shared by pin/pattern/password screens -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content" >
-    <FrameLayout
-        android:id="@+id/lock_icon_container"
-        android:layout_gravity="center"
-        android:layout_marginBottom="@dimen/keyguard_lock_padding"
-        android:layout_width="@dimen/keyguard_lock_width"
-        android:layout_height="@dimen/keyguard_lock_height" />
-    <com.android.keyguard.KeyguardMessageArea
-        android:id="@+id/keyguard_message_area"
-        style="@style/Keyguard.TextView"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:focusable="true" />
-</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_message_area_large.xml b/packages/SystemUI/res-keyguard/layout/keyguard_message_area_large.xml
deleted file mode 100644
index ab6246d..0000000
--- a/packages/SystemUI/res-keyguard/layout/keyguard_message_area_large.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2012, 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.
-*/
--->
-
-<!-- This contains emergency call button and carrier as shared by pin/pattern/password screens -->
-<com.android.keyguard.KeyguardMessageArea
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center"
-    android:id="@+id/keyguard_message_area"
-    android:maxLines="4"
-    android:textAppearance="?android:attr/textAppearance"
-    android:textSize="@dimen/kg_status_line_font_size"
-    android:textColor="?android:attr/textColorSecondary" />
-
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
index 11bd98f..b06d6a9 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
@@ -34,10 +34,6 @@
         android:layout_weight="7"
         />
 
-    <include layout="@layout/keyguard_message_area"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
-
     <!-- Password entry field -->
       <FrameLayout
          android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
index ccb9af9..dc2d11d 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
@@ -48,11 +48,6 @@
             android:clipChildren="false"
             android:clipToPadding="false">
 
-            <include layout="@layout/keyguard_message_area"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-               />
-
             <com.android.internal.widget.LockPatternView
                 android:id="@+id/lockPatternView"
                 android:layout_width="match_parent"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
index 9c41fca..a75b35d 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
@@ -27,10 +27,6 @@
         androidprv:layout_maxHeight="@dimen/keyguard_security_max_height"
         android:orientation="vertical"
         >
-    <include layout="@layout/keyguard_message_area"
-             android:layout_width="match_parent"
-             android:layout_height="wrap_content"
-            />
     <LinearLayout
             android:id="@+id/container"
             android:layout_width="match_parent"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml
index bfb5bf9..cd61a37 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml
@@ -35,10 +35,6 @@
             android:tint="@color/background_protected"
             android:src="@drawable/ic_lockscreen_sim"/>
 
-    <include layout="@layout/keyguard_message_area"
-             android:layout_width="match_parent"
-             android:layout_height="wrap_content"
-            />
     <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="0dp"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml
index 9f3ae3a..bb75735 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml
@@ -36,10 +36,6 @@
             android:tint="@color/background_protected"
             android:src="@drawable/ic_lockscreen_sim"/>
 
-    <include layout="@layout/keyguard_message_area"
-             android:layout_width="match_parent"
-             android:layout_height="wrap_content"
-            />
     <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="0dp"
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 636b929..cdef09d 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -78,21 +78,6 @@
         android:tint="?attr/wallpaperTextColor" />
 
     <FrameLayout
-        android:id="@+id/lock_icon_container"
-        android:layout_width="@dimen/keyguard_lock_width"
-        android:layout_height="@dimen/keyguard_lock_height"
-        android:layout_gravity="bottom|center_horizontal"
-        android:layout_marginBottom="@dimen/keyguard_lock_padding">
-        <com.android.systemui.statusbar.phone.LockIcon
-            android:id="@+id/lock_icon"
-            android:layout_width="@dimen/keyguard_lock_width"
-            android:layout_height="@dimen/keyguard_lock_height"
-            android:src="@*android:drawable/ic_lock"
-            android:contentDescription="@string/accessibility_unlock_button"
-            android:scaleType="center" />
-    </FrameLayout>
-
-    <FrameLayout
         android:id="@+id/overlay_container"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 34c208a..4cf5f85 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -71,4 +71,31 @@
         sysui:ignoreRightInset="true"
         />
 
+    <LinearLayout
+        android:id="@+id/lock_icon_container"
+        android:orientation="vertical"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/status_bar_height"
+        android:layout_gravity="top|center_horizontal">
+        <com.android.systemui.statusbar.phone.LockIcon
+            android:id="@+id/lock_icon"
+            android:layout_width="@dimen/keyguard_lock_width"
+            android:layout_height="@dimen/keyguard_lock_height"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginTop="@dimen/keyguard_lock_padding"
+            android:contentDescription="@string/accessibility_unlock_button"
+            android:src="@*android:drawable/ic_lock"
+            android:scaleType="center" />
+        <com.android.keyguard.KeyguardMessageArea
+            android:id="@+id/keyguard_message_area"
+            style="@style/Keyguard.TextView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/keyguard_lock_padding"
+            android:gravity="center"
+            android:singleLine="true"
+            android:ellipsize="marquee"
+            android:focusable="true" />
+    </LinearLayout>
 </com.android.systemui.statusbar.phone.StatusBarWindowView>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index bfdb218..5d8b9e6 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -717,9 +717,9 @@
     <!-- The width/height of the unlock icon view on keyguard. -->
     <dimen name="keyguard_lock_height">42dp</dimen>
     <dimen name="keyguard_lock_width">42dp</dimen>
-    <dimen name="keyguard_lock_padding">19dp</dimen>
+    <dimen name="keyguard_lock_padding">20dp</dimen>
 
-    <dimen name="keyguard_indication_margin_bottom">65dp</dimen>
+    <dimen name="keyguard_indication_margin_bottom">44dp</dimen>
 
     <!-- The text size for battery level -->
     <dimen name="battery_level_text_size">12sp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index f121c8e..9796b2d 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -277,8 +277,6 @@
     <string name="accessibility_send_smart_reply">Send</string>
     <!-- Content description of the manage notification button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_manage_notification">Manage notifications</string>
-    <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] -->
-    <string name="unlock_label">unlock</string>
     <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] -->
     <string name="phone_label">open phone</string>
     <!-- Click action label for accessibility for the voice assist button. This is not shown on-screen and is an accessibility label for the icon which launches the voice assist from the lock screen.[CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java
index 4cb8d90..2ff7266 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java
@@ -100,7 +100,6 @@
     @Override
     protected void onFinishInflate() {
         mLockPatternUtils = new LockPatternUtils(mContext);
-        mSecurityMessageDisplay = KeyguardMessageArea.findSecurityMessageDisplay(this);
         mEcaView = findViewById(R.id.keyguard_selector_fade_container);
 
         EmergencyButton button = findViewById(R.id.emergency_call_button);
@@ -110,6 +109,12 @@
     }
 
     @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mSecurityMessageDisplay = KeyguardMessageArea.findSecurityMessageDisplay(this);
+    }
+
+    @Override
     public void onEmergencyButtonClickedWhenInCall() {
         mCallback.reset();
     }
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java
index 010ec7c..ace6f6f 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java
@@ -16,8 +16,12 @@
 
 package com.android.keyguard;
 
+import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
+
 import android.content.Context;
 import android.content.res.ColorStateList;
+import android.content.res.TypedArray;
+import android.graphics.Color;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.SystemClock;
@@ -26,12 +30,18 @@
 import android.view.View;
 import android.widget.TextView;
 
+import com.android.systemui.statusbar.policy.ConfigurationController;
+
 import java.lang.ref.WeakReference;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+
 /***
  * Manages a number of views inside of the given layout. See below for a list of widgets.
  */
-class KeyguardMessageArea extends TextView implements SecurityMessageDisplay {
+public class KeyguardMessageArea extends TextView implements SecurityMessageDisplay,
+        ConfigurationController.ConfigurationListener {
     /** Handler token posted with accessibility announcement runnables. */
     private static final Object ANNOUNCE_TOKEN = new Object();
 
@@ -43,8 +53,9 @@
     private static final int DEFAULT_COLOR = -1;
 
     private final Handler mHandler;
-    private final ColorStateList mDefaultColorState;
+    private final ConfigurationController mConfigurationController;
 
+    private ColorStateList mDefaultColorState;
     private CharSequence mMessage;
     private ColorStateList mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR);
 
@@ -58,30 +69,58 @@
     };
 
     public KeyguardMessageArea(Context context) {
-        this(context, null);
+        super(context, null);
+        throw new IllegalStateException("This constructor should never be invoked");
     }
 
-    public KeyguardMessageArea(Context context, AttributeSet attrs) {
-        this(context, attrs, KeyguardUpdateMonitor.getInstance(context));
+    @Inject
+    public KeyguardMessageArea(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
+            ConfigurationController configurationController) {
+        this(context, attrs, KeyguardUpdateMonitor.getInstance(context), configurationController);
     }
 
-    public KeyguardMessageArea(Context context, AttributeSet attrs, KeyguardUpdateMonitor monitor) {
+    public KeyguardMessageArea(Context context, AttributeSet attrs, KeyguardUpdateMonitor monitor,
+            ConfigurationController configurationController) {
         super(context, attrs);
         setLayerType(LAYER_TYPE_HARDWARE, null); // work around nested unclipped SaveLayer bug
 
         monitor.registerCallback(mInfoCallback);
         mHandler = new Handler(Looper.myLooper());
+        mConfigurationController = configurationController;
 
-        mDefaultColorState = getTextColors();
+        onThemeChanged();
         update();
     }
 
     @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mConfigurationController.addCallback(this);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        mConfigurationController.removeCallback(this);
+    }
+
+    @Override
     public void setNextMessageColor(ColorStateList colorState) {
         mNextMessageColorState = colorState;
     }
 
     @Override
+    public void onThemeChanged() {
+        TypedArray array = mContext.obtainStyledAttributes(new int[] {
+                R.attr.wallpaperTextColor
+        });
+        ColorStateList newTextColors = ColorStateList.valueOf(array.getColor(0, Color.RED));
+        array.recycle();
+        setTextColor(newTextColors);
+        mDefaultColorState = newTextColors;
+    }
+
+    @Override
     public void setMessage(CharSequence msg) {
         if (!TextUtils.isEmpty(msg)) {
             securityMessageChanged(msg);
@@ -108,9 +147,11 @@
         setMessage(message);
     }
 
-    public static SecurityMessageDisplay findSecurityMessageDisplay(View v) {
-        KeyguardMessageArea messageArea = (KeyguardMessageArea) v.findViewById(
-                R.id.keyguard_message_area);
+    public static KeyguardMessageArea findSecurityMessageDisplay(View v) {
+        KeyguardMessageArea messageArea = v.findViewById(R.id.keyguard_message_area);
+        if (messageArea == null) {
+            messageArea = v.getRootView().findViewById(R.id.keyguard_message_area);
+        }
         if (messageArea == null) {
             throw new RuntimeException("Can't find keyguard_message_area in " + v.getClass());
         }
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
index a543d17..6808c0f 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
@@ -67,7 +67,9 @@
     @Override
     protected void resetState() {
         super.resetState();
-        mSecurityMessageDisplay.setMessage("");
+        if (mSecurityMessageDisplay != null) {
+            mSecurityMessageDisplay.setMessage("");
+        }
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
index 185edbf..96392156 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
@@ -81,7 +81,9 @@
     @Override
     protected void resetState() {
         mPasswordEntry.setTextOperationUser(UserHandle.of(KeyguardUpdateMonitor.getCurrentUser()));
-        mSecurityMessageDisplay.setMessage("");
+        if (mSecurityMessageDisplay != null) {
+            mSecurityMessageDisplay.setMessage("");
+        }
         final boolean wasDisabled = mPasswordEntry.isEnabled();
         // Don't set enabled password entry & showSoftInput when PasswordEntry is invisible or in
         // pausing stage.
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
index 112e067..8899bd9 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
@@ -34,6 +34,7 @@
 import android.view.animation.Interpolator;
 import android.widget.LinearLayout;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.LatencyTracker;
 import com.android.internal.widget.LockPatternChecker;
 import com.android.internal.widget.LockPatternUtils;
@@ -92,7 +93,8 @@
         }
     };
     private Rect mTempRect = new Rect();
-    private KeyguardMessageArea mSecurityMessageDisplay;
+    @VisibleForTesting
+    KeyguardMessageArea mSecurityMessageDisplay;
     private View mEcaView;
     private ViewGroup mContainer;
     private int mDisappearYTranslation;
@@ -151,8 +153,6 @@
         // vibrate mode will be the same for the life of this screen
         mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
 
-        mSecurityMessageDisplay =
-                (KeyguardMessageArea) KeyguardMessageArea.findSecurityMessageDisplay(this);
         mEcaView = findViewById(R.id.keyguard_selector_fade_container);
         mContainer = findViewById(R.id.container);
 
@@ -171,6 +171,12 @@
     }
 
     @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mSecurityMessageDisplay = KeyguardMessageArea.findSecurityMessageDisplay(this);
+    }
+
+    @Override
     public void onEmergencyButtonClickedWhenInCall() {
         mCallback.reset();
     }
@@ -201,6 +207,10 @@
         mLockPatternView.setEnabled(true);
         mLockPatternView.clearPattern();
 
+        if (mSecurityMessageDisplay == null) {
+            return;
+        }
+
         // if the user is currently locked out, enforce it.
         long deadline = mLockPatternUtils.getLockoutAttemptDeadline(
                 KeyguardUpdateMonitor.getCurrentUser());
@@ -212,7 +222,9 @@
     }
 
     private void displayDefaultSecurityMessage() {
-        mSecurityMessageDisplay.setMessage("");
+        if (mSecurityMessageDisplay != null) {
+            mSecurityMessageDisplay.setMessage("");
+        }
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
index fb4fe81..0d8a3db 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
@@ -24,6 +24,7 @@
 import android.content.res.ColorStateList;
 import android.content.res.Configuration;
 import android.content.res.Resources;
+import android.content.res.TypedArray;
 import android.graphics.Color;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -104,7 +105,9 @@
         int count = TelephonyManager.getDefault().getSimCount();
         Resources rez = getResources();
         String msg;
-        int color = Color.WHITE;
+        TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor });
+        int color = array.getColor(0, Color.WHITE);
+        array.recycle();
         if (count < 2) {
             msg = rez.getString(R.string.kg_sim_pin_instructions);
         } else {
@@ -120,7 +123,9 @@
             msg = rez.getString(R.string.kg_sim_lock_esim_instructions, msg);
         }
 
-        mSecurityMessageDisplay.setMessage(msg);
+        if (mSecurityMessageDisplay != null) {
+            mSecurityMessageDisplay.setMessage(msg);
+        }
         mSimImageView.setImageTintList(ColorStateList.valueOf(color));
     }
 
@@ -214,6 +219,7 @@
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
         KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
+        resetState();
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
index b17d117..27f71d1 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
@@ -23,6 +23,7 @@
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
+import android.content.res.TypedArray;
 import android.graphics.Color;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -164,7 +165,9 @@
         int count = TelephonyManager.getDefault().getSimCount();
         Resources rez = getResources();
         String msg;
-        int color = Color.WHITE;
+        TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor });
+        int color = array.getColor(0, Color.WHITE);
+        array.recycle();
         if (count < 2) {
             msg = rez.getString(R.string.kg_puk_enter_puk_hint);
         } else {
@@ -179,7 +182,9 @@
         if (isEsimLocked) {
             msg = rez.getString(R.string.kg_sim_lock_esim_instructions, msg);
         }
-        mSecurityMessageDisplay.setMessage(msg);
+        if (mSecurityMessageDisplay != null) {
+            mSecurityMessageDisplay.setMessage(msg);
+        }
         mSimImageView.setImageTintList(ColorStateList.valueOf(color));
 
         // Sending empty PUK here to query the number of remaining PIN attempts
@@ -267,6 +272,7 @@
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
         KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
+        resetState();
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index d70d0d8..6af7ac4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -2074,9 +2074,9 @@
 
     public StatusBarKeyguardViewManager registerStatusBar(StatusBar statusBar,
             ViewGroup container, NotificationPanelView panelView,
-            BiometricUnlockController biometricUnlockController) {
+            BiometricUnlockController biometricUnlockController, ViewGroup lockIconContainer) {
         mStatusBarKeyguardViewManager.registerStatusBar(statusBar, container, panelView,
-                biometricUnlockController, mDismissCallbackRegistry);
+                biometricUnlockController, mDismissCallbackRegistry, lockIconContainer);
         return mStatusBarKeyguardViewManager;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 3441591..1a54f65 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -41,6 +41,8 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.IBatteryStats;
+import com.android.internal.logging.nano.MetricsProto;
+import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.settingslib.Utils;
@@ -51,6 +53,7 @@
 import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
 import com.android.systemui.statusbar.phone.KeyguardIndicationTextView;
 import com.android.systemui.statusbar.phone.LockIcon;
+import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.statusbar.policy.UserInfoController;
 import com.android.systemui.util.wakelock.SettableWakeLock;
@@ -80,11 +83,13 @@
     private final UserManager mUserManager;
     private final IBatteryStats mBatteryInfo;
     private final SettableWakeLock mWakeLock;
+    private final LockPatternUtils mLockPatternUtils;
 
     private final int mSlowThreshold;
     private final int mFastThreshold;
     private final LockIcon mLockIcon;
     private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
+    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
 
     private String mRestingIndication;
     private CharSequence mTransientIndication;
@@ -104,14 +109,13 @@
 
     private final DevicePolicyManager mDevicePolicyManager;
     private boolean mDozing;
-    private float mDarkAmount;
 
     /**
      * Creates a new KeyguardIndicationController and registers callbacks.
      */
     public KeyguardIndicationController(Context context, ViewGroup indicationArea,
             LockIcon lockIcon) {
-        this(context, indicationArea, lockIcon,
+        this(context, indicationArea, lockIcon, new LockPatternUtils(context),
                 WakeLock.createPartial(context, "Doze:KeyguardIndication"));
 
         registerCallbacks(KeyguardUpdateMonitor.getInstance(context));
@@ -122,7 +126,7 @@
      */
     @VisibleForTesting
     KeyguardIndicationController(Context context, ViewGroup indicationArea, LockIcon lockIcon,
-                WakeLock wakeLock) {
+            LockPatternUtils lockPatternUtils, WakeLock wakeLock) {
         mContext = context;
         mIndicationArea = indicationArea;
         mTextView = indicationArea.findViewById(R.id.keyguard_indication_text);
@@ -130,7 +134,9 @@
                 mTextView.getTextColors() : ColorStateList.valueOf(Color.WHITE);
         mDisclosure = indicationArea.findViewById(R.id.keyguard_indication_enterprise_disclosure);
         mLockIcon = lockIcon;
+        mLockIcon.setOnLongClickListener(this::handleTrustCircleClick);
         mWakeLock = new SettableWakeLock(wakeLock, TAG);
+        mLockPatternUtils = lockPatternUtils;
 
         Resources res = context.getResources();
         mSlowThreshold = res.getInteger(R.integer.config_chargingSlowlyThreshold);
@@ -164,6 +170,15 @@
         Dependency.get(StatusBarStateController.class).removeCallback(this);
     }
 
+    private boolean handleTrustCircleClick(View view) {
+        mLockscreenGestureLogger.write(MetricsProto.MetricsEvent.ACTION_LS_LOCK,
+                0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
+        showTransientIndication(R.string.keyguard_indication_trust_disabled);
+        mLockPatternUtils.requireCredentialEntry(KeyguardUpdateMonitor.getCurrentUser());
+
+        return true;
+    }
+
     /**
      * Gets the {@link KeyguardUpdateMonitorCallback} instance associated with this
      * {@link KeyguardIndicationController}.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
index 49d421b..cd0a43e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
@@ -56,7 +56,6 @@
     private int mMinFlingVelocity;
     private int mHintGrowAmount;
     private KeyguardAffordanceView mLeftIcon;
-    private KeyguardAffordanceView mCenterIcon;
     private KeyguardAffordanceView mRightIcon;
     private Animator mSwipeAnimator;
     private FalsingManager mFalsingManager;
@@ -85,7 +84,6 @@
         mCallback = callback;
         initIcons();
         updateIcon(mLeftIcon, 0.0f, mLeftIcon.getRestingAlpha(), false, false, true, false);
-        updateIcon(mCenterIcon, 0.0f, mCenterIcon.getRestingAlpha(), false, false, true, false);
         updateIcon(mRightIcon, 0.0f, mRightIcon.getRestingAlpha(), false, false, true, false);
         initDimens();
     }
@@ -108,7 +106,6 @@
 
     private void initIcons() {
         mLeftIcon = mCallback.getLeftIcon();
-        mCenterIcon = mCallback.getCenterIcon();
         mRightIcon = mCallback.getRightIcon();
         updatePreviews();
     }
@@ -398,8 +395,6 @@
             }
             updateIcon(otherView, 0.0f, fadeOutAlpha * otherView.getRestingAlpha(),
                     animateIcons, slowAnimation, isReset, forceNoCircleAnimation);
-            updateIcon(mCenterIcon, 0.0f, fadeOutAlpha * mCenterIcon.getRestingAlpha(),
-                    animateIcons, slowAnimation, isReset, forceNoCircleAnimation);
 
             mTranslation = translation;
         }
@@ -417,7 +412,6 @@
         KeyguardAffordanceView otherView = targetView == mRightIcon ? mLeftIcon : mRightIcon;
         updateIconAlpha(targetView, alpha + fadeOutAlpha * targetView.getRestingAlpha(), false);
         updateIconAlpha(otherView, fadeOutAlpha * otherView.getRestingAlpha(), false);
-        updateIconAlpha(mCenterIcon, fadeOutAlpha * mCenterIcon.getRestingAlpha(), false);
     }
 
     private float getTranslationFromRadius(float circleSize) {
@@ -538,12 +532,10 @@
         if (animate) {
             fling(0, false, !left);
             updateIcon(otherView, 0.0f, 0, true, false, true, false);
-            updateIcon(mCenterIcon, 0.0f, 0, true, false, true, false);
         } else {
             mCallback.onAnimationToSideStarted(!left, mTranslation, 0);
             mTranslation = left ? mCallback.getMaxTranslationDistance()
                     : mCallback.getMaxTranslationDistance();
-            updateIcon(mCenterIcon, 0.0f, 0.0f, false, false, true, false);
             updateIcon(otherView, 0.0f, 0.0f, false, false, true, false);
             targetView.instantFinishAnimation();
             mFlingEndListener.onAnimationEnd(null);
@@ -575,8 +567,6 @@
 
         KeyguardAffordanceView getLeftIcon();
 
-        KeyguardAffordanceView getCenterIcon();
-
         KeyguardAffordanceView getRightIcon();
 
         View getLeftPreview();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index a924680..cb64f10 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -40,7 +40,6 @@
 import android.content.pm.ResolveInfo;
 import android.content.res.Configuration;
 import android.graphics.drawable.Drawable;
-import android.hardware.biometrics.BiometricSourceType;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.IBinder;
@@ -64,7 +63,6 @@
 import android.widget.TextView;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
@@ -77,7 +75,6 @@
 import com.android.systemui.plugins.IntentButtonProvider;
 import com.android.systemui.plugins.IntentButtonProvider.IntentButton;
 import com.android.systemui.plugins.IntentButtonProvider.IntentButton.IconState;
-import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.KeyguardAffordanceView;
 import com.android.systemui.statusbar.KeyguardIndicationController;
 import com.android.systemui.statusbar.policy.AccessibilityController;
@@ -94,7 +91,7 @@
  */
 public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickListener,
         UnlockMethodCache.OnUnlockMethodChangedListener,
-        AccessibilityController.AccessibilityStateChangedCallback, View.OnLongClickListener {
+        AccessibilityController.AccessibilityStateChangedCallback {
 
     final static String TAG = "StatusBar/KeyguardBottomAreaView";
 
@@ -122,8 +119,6 @@
 
     private KeyguardAffordanceView mRightAffordanceView;
     private KeyguardAffordanceView mLeftAffordanceView;
-    private LockIcon mLockIcon;
-    private ViewGroup mLockIconContainer;
     private ViewGroup mIndicationArea;
     private TextView mEnterpriseDisclosure;
     private TextView mIndicationText;
@@ -169,7 +164,6 @@
     private IntentButton mLeftButton = new DefaultLeftButton();
     private Extension<IntentButton> mLeftExtension;
     private String mLeftButtonStr;
-    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
     private boolean mDozing;
     private int mIndicationBottomMargin;
     private float mDarkAmount;
@@ -199,9 +193,7 @@
         public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
             super.onInitializeAccessibilityNodeInfo(host, info);
             String label = null;
-            if (host == mLockIcon) {
-                label = getResources().getString(R.string.unlock_label);
-            } else if (host == mRightAffordanceView) {
+            if (host == mRightAffordanceView) {
                 label = getResources().getString(R.string.camera_label);
             } else if (host == mLeftAffordanceView) {
                 if (mLeftIsVoiceAssist) {
@@ -216,11 +208,7 @@
         @Override
         public boolean performAccessibilityAction(View host, int action, Bundle args) {
             if (action == ACTION_CLICK) {
-                if (host == mLockIcon) {
-                    mStatusBar.animateCollapsePanels(
-                            CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */);
-                    return true;
-                } else if (host == mRightAffordanceView) {
+                if (host == mRightAffordanceView) {
                     launchCamera(CAMERA_LAUNCH_SOURCE_AFFORDANCE);
                     return true;
                 } else if (host == mLeftAffordanceView) {
@@ -247,8 +235,6 @@
         mOverlayContainer = findViewById(R.id.overlay_container);
         mRightAffordanceView = findViewById(R.id.camera_button);
         mLeftAffordanceView = findViewById(R.id.left_button);
-        mLockIcon = findViewById(R.id.lock_icon);
-        mLockIconContainer = findViewById(R.id.lock_icon_container);
         mIndicationArea = findViewById(R.id.keyguard_indication_area);
         mEnterpriseDisclosure = findViewById(
                 R.id.keyguard_indication_enterprise_disclosure);
@@ -260,14 +246,9 @@
         updateCameraVisibility();
         mUnlockMethodCache = UnlockMethodCache.getInstance(getContext());
         mUnlockMethodCache.addListener(this);
-        KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
-        mLockIcon.setScreenOn(updateMonitor.isScreenOn());
-        mLockIcon.update();
         setClipChildren(false);
         setClipToPadding(false);
         inflateCameraPreview();
-        mLockIcon.setOnClickListener(this);
-        mLockIcon.setOnLongClickListener(this);
         mRightAffordanceView.setOnClickListener(this);
         mLeftAffordanceView.setOnClickListener(this);
         initAccessibility();
@@ -275,7 +256,6 @@
         mFlashlightController = Dependency.get(FlashlightController.class);
         mAccessibilityController = Dependency.get(AccessibilityController.class);
         mAssistManager = Dependency.get(AssistManager.class);
-        mLockIcon.setAccessibilityController(mAccessibilityController);
         mActivityIntentHelper = new ActivityIntentHelper(getContext());
         updateLeftAffordance();
     }
@@ -316,7 +296,6 @@
     }
 
     private void initAccessibility() {
-        mLockIcon.setAccessibilityDelegate(mAccessibilityDelegate);
         mLeftAffordanceView.setAccessibilityDelegate(mAccessibilityDelegate);
         mRightAffordanceView.setAccessibilityDelegate(mAccessibilityDelegate);
     }
@@ -348,13 +327,6 @@
         mRightAffordanceView.setLayoutParams(lp);
         updateRightAffordanceIcon();
 
-        lp = mLockIcon.getLayoutParams();
-        lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_lock_width);
-        lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_lock_height);
-        mLockIcon.setLayoutParams(lp);
-        mLockIcon.setContentDescription(getContext().getText(R.string.accessibility_unlock_button));
-        mLockIcon.update(true /* force */);
-
         lp = mLeftAffordanceView.getLayoutParams();
         lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_width);
         lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_height);
@@ -437,7 +409,6 @@
         mLeftAffordanceView.setClickable(touchExplorationEnabled);
         mRightAffordanceView.setFocusable(accessibilityEnabled);
         mLeftAffordanceView.setFocusable(accessibilityEnabled);
-        mLockIcon.update();
     }
 
     @Override
@@ -446,30 +417,9 @@
             launchCamera(CAMERA_LAUNCH_SOURCE_AFFORDANCE);
         } else if (v == mLeftAffordanceView) {
             launchLeftAffordance();
-        } if (v == mLockIcon) {
-            if (!mAccessibilityController.isAccessibilityEnabled()) {
-                handleTrustCircleClick();
-            } else {
-                mStatusBar.animateCollapsePanels(
-                        CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
-            }
         }
     }
 
-    @Override
-    public boolean onLongClick(View v) {
-        handleTrustCircleClick();
-        return true;
-    }
-
-    private void handleTrustCircleClick() {
-        mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_LOCK, 0 /* lengthDp - N/A */,
-                0 /* velocityDp - N/A */);
-        mIndicationController.showTransientIndication(
-                R.string.keyguard_indication_trust_disabled);
-        mLockPatternUtils.requireCredentialEntry(KeyguardUpdateMonitor.getCurrentUser());
-    }
-
     public void bindCameraPrewarmService() {
         Intent intent = getCameraIntent();
         ActivityInfo targetInfo = mActivityIntentHelper.getTargetActivityInfo(intent,
@@ -571,19 +521,9 @@
             return;
         }
         mDarkAmount = darkAmount;
-        mLockIcon.setDarkAmount(darkAmount);
         dozeTimeTick();
     }
 
-    /**
-     * When keyguard is in pulsing (AOD2) state.
-     * @param pulsing {@code true} when pulsing.
-     * @param animated if transition should be animated.
-     */
-    public void setPulsing(boolean pulsing, boolean animated) {
-        mLockIcon.setPulsing(pulsing, animated);
-    }
-
     private static boolean isSuccessfulLaunch(int result) {
         return result == ActivityManager.START_SUCCESS
                 || result == ActivityManager.START_DELIVERED_TO_TOP
@@ -641,7 +581,6 @@
     protected void onVisibilityChanged(View changedView, int visibility) {
         super.onVisibilityChanged(changedView, visibility);
         if (changedView == this && visibility == VISIBLE) {
-            mLockIcon.update();
             updateCameraVisibility();
         }
     }
@@ -662,14 +601,6 @@
         return mCameraPreview;
     }
 
-    public LockIcon getLockIcon() {
-        return mLockIcon;
-    }
-
-    public ViewGroup getLockIconContainer() {
-        return mLockIconContainer;
-    }
-
     public View getIndicationArea() {
         return mIndicationArea;
     }
@@ -681,7 +612,6 @@
 
     @Override
     public void onUnlockMethodStateChanged() {
-        mLockIcon.update();
         updateCameraVisibility();
     }
 
@@ -764,32 +694,6 @@
                 }
 
                 @Override
-                public void onScreenTurnedOn() {
-                    mLockIcon.setScreenOn(true);
-                }
-
-                @Override
-                public void onScreenTurnedOff() {
-                    mLockIcon.setScreenOn(false);
-                }
-
-                @Override
-                public void onKeyguardVisibilityChanged(boolean showing) {
-                    mLockIcon.update();
-                }
-
-                @Override
-                public void onBiometricRunningStateChanged(boolean running,
-                        BiometricSourceType biometricSourceType) {
-                    mLockIcon.update();
-                }
-
-                @Override
-                public void onStrongAuthStateChanged(int userId) {
-                    mLockIcon.update();
-        }
-
-                @Override
                 public void onUserUnlocked() {
                     inflateCameraPreview();
                     updateCameraVisibility();
@@ -836,7 +740,6 @@
 
         updateCameraVisibility();
         updateLeftAffordanceIcon();
-        mLockIcon.setDozing(dozing);
 
         if (dozing) {
             mOverlayContainer.setVisibility(INVISIBLE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index 1d2ca9f..b00d874 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -167,6 +167,7 @@
         DejankUtils.postAfterTraversal(mShowRunnable);
 
         mCallback.onBouncerVisiblityChanged(true /* shown */);
+        mExpansionCallback.onStartingToShow();
     }
 
     public boolean isScrimmed() {
@@ -429,8 +430,6 @@
         mStatusBarHeight = mRoot.getResources().getDimensionPixelOffset(
                 com.android.systemui.R.dimen.status_bar_height);
         mRoot.setVisibility(View.INVISIBLE);
-        mRoot.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight,
-                oldBottom) -> mExpansionCallback.onLayout());
         mRoot.setAccessibilityPaneTitle(mKeyguardView.getAccessibilityTitleForCurrentMode());
 
         final WindowInsets rootInsets = mRoot.getRootWindowInsets();
@@ -510,7 +509,7 @@
     public interface BouncerExpansionCallback {
         void onFullyShown();
         void onStartingToHide();
+        void onStartingToShow();
         void onFullyHidden();
-        void onLayout();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
index d59f248..0171d7f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
@@ -99,11 +99,6 @@
      */
     private float mDarkAmount;
 
-    /**
-     * If keyguard will require a password or just fade away.
-     */
-    private boolean mCurrentlySecure;
-
     private float mEmptyDragAmount;
 
     /**
@@ -122,7 +117,7 @@
 
     public void setup(int minTopMargin, int maxShadeBottom, int notificationStackHeight,
             float panelExpansion, int parentHeight, int keyguardStatusHeight, int clockPreferredY,
-            float dark, boolean secure, float emptyDragAmount) {
+            float dark, float emptyDragAmount) {
         mMinTopMargin = minTopMargin + mContainerTopPadding;
         mMaxShadeBottom = maxShadeBottom;
         mNotificationStackHeight = notificationStackHeight;
@@ -131,7 +126,6 @@
         mKeyguardStatusHeight = keyguardStatusHeight;
         mClockPreferredY = clockPreferredY;
         mDarkAmount = dark;
-        mCurrentlySecure = secure;
         mEmptyDragAmount = emptyDragAmount;
     }
 
@@ -204,13 +198,8 @@
      * @return Alpha from 0 to 1.
      */
     private float getClockAlpha(int y) {
-        float alphaKeyguard;
-        if (mCurrentlySecure) {
-            alphaKeyguard = 1;
-        } else {
-            alphaKeyguard = Math.max(0, y / Math.max(1f, getExpandedClockPosition()));
-            alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard);
-        }
+        float alphaKeyguard = Math.max(0, y / Math.max(1f, getExpandedClockPosition()));
+        alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard);
         return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount);
     }
 
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 3cc4a7b..971e5b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -16,29 +16,40 @@
 
 package com.android.systemui.statusbar.phone;
 
+import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
+
 import android.content.Context;
+import android.content.res.ColorStateList;
 import android.content.res.Configuration;
 import android.content.res.TypedArray;
 import android.graphics.Color;
-import android.graphics.PorterDuff;
 import android.graphics.drawable.Animatable2;
 import android.graphics.drawable.AnimatedVectorDrawable;
 import android.graphics.drawable.Drawable;
+import android.hardware.biometrics.BiometricSourceType;
 import android.util.AttributeSet;
-import android.view.ContextThemeWrapper;
+import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityNodeInfo;
 
 import com.android.internal.graphics.ColorUtils;
 import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.systemui.R;
+import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.statusbar.KeyguardAffordanceView;
 import com.android.systemui.statusbar.policy.AccessibilityController;
+import com.android.systemui.statusbar.policy.ConfigurationController;
 import com.android.systemui.statusbar.policy.UserInfoController.OnUserInfoChangedListener;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+
 /**
  * Manages the different states and animations of the unlock icon.
  */
-public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChangedListener {
+public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChangedListener,
+        StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener,
+        UnlockMethodCache.OnUnlockMethodChangedListener {
 
     private static final int FP_DRAW_OFF_TIMEOUT = 800;
 
@@ -46,13 +57,16 @@
     private static final int STATE_LOCK_OPEN = 1;
     private static final int STATE_SCANNING_FACE = 2;
     private static final int STATE_BIOMETRICS_ERROR = 3;
+    private final ConfigurationController mConfigurationController;
+    private final StatusBarStateController mStatusBarStateController;
+    private final UnlockMethodCache mUnlockMethodCache;
+    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
+    private final AccessibilityController mAccessibilityController;
 
     private int mLastState = 0;
     private boolean mTransientBiometricsError;
     private boolean mScreenOn;
     private boolean mLastScreenOn;
-    private final UnlockMethodCache mUnlockMethodCache;
-    private AccessibilityController mAccessibilityController;
     private boolean mIsFaceUnlockState;
     private int mDensity;
     private boolean mPulsing;
@@ -61,18 +75,82 @@
     private boolean mLastDozing;
     private boolean mLastPulsing;
     private boolean mLastBouncerVisible;
+    private int mIconColor;
 
     private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
-    private float mDarkAmount;
+    private float mDozeAmount;
 
-    public LockIcon(Context context, AttributeSet attrs) {
+    private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback =
+            new KeyguardUpdateMonitorCallback() {
+                @Override
+                public void onScreenTurnedOn() {
+                    mScreenOn = true;
+                    update();
+                }
+
+                @Override
+                public void onScreenTurnedOff() {
+                    mScreenOn = false;
+                    update();
+                }
+
+                @Override
+                public void onKeyguardVisibilityChanged(boolean showing) {
+                    update();
+                }
+
+                @Override
+                public void onBiometricRunningStateChanged(boolean running,
+                        BiometricSourceType biometricSourceType) {
+                    update();
+                }
+
+                @Override
+                public void onStrongAuthStateChanged(int userId) {
+                    update();
+                }
+    };
+
+    @Inject
+    public LockIcon(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
+            StatusBarStateController statusBarStateController,
+            ConfigurationController configurationController,
+            AccessibilityController accessibilityController) {
         super(context, attrs);
-        TypedArray typedArray = context.getTheme().obtainStyledAttributes(
-                attrs, new int[]{ R.attr.backgroundProtectedStyle }, 0, 0);
-        mContext = new ContextThemeWrapper(context,
-                typedArray.getResourceId(0, R.style.BackgroundProtectedStyle));
-        typedArray.recycle();
+        mContext = context;
         mUnlockMethodCache = UnlockMethodCache.getInstance(context);
+        mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
+        mAccessibilityController = accessibilityController;
+        mConfigurationController = configurationController;
+        mStatusBarStateController = statusBarStateController;
+        onThemeChanged();
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        mStatusBarStateController.addCallback(this);
+        mConfigurationController.addCallback(this);
+        mKeyguardUpdateMonitor.registerCallback(mUpdateMonitorCallback);
+        mUnlockMethodCache.addListener(this);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        mStatusBarStateController.removeCallback(this);
+        mConfigurationController.removeCallback(this);
+        mKeyguardUpdateMonitor.removeCallback(mUpdateMonitorCallback);
+        mUnlockMethodCache.removeListener(this);
+    }
+
+    @Override
+    public void onThemeChanged() {
+        TypedArray typedArray = mContext.getTheme().obtainStyledAttributes(
+                null, new int[]{ R.attr.wallpaperTextColor }, 0, 0);
+        mIconColor = typedArray.getColor(0, Color.WHITE);
+        typedArray.recycle();
+        updateDarkTint();
     }
 
     @Override
@@ -88,11 +166,6 @@
         update();
     }
 
-    public void setScreenOn(boolean screenOn) {
-        mScreenOn = screenOn;
-        update();
-    }
-
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
@@ -164,7 +237,7 @@
             mLastBouncerVisible = mBouncerVisible;
         }
 
-        setVisibility(mDozing && !mPulsing ? GONE : VISIBLE);
+        setVisibility(mDozing && !mPulsing ? INVISIBLE : VISIBLE);
         updateClickability();
     }
 
@@ -185,9 +258,8 @@
     @Override
     public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
         super.onInitializeAccessibilityNodeInfo(info);
-        KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
-        boolean fingerprintRunning = updateMonitor.isFingerprintDetectionRunning();
-        boolean unlockingAllowed = updateMonitor.isUnlockingWithBiometricAllowed();
+        boolean fingerprintRunning = mKeyguardUpdateMonitor.isFingerprintDetectionRunning();
+        boolean unlockingAllowed = mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed();
         if (fingerprintRunning && unlockingAllowed) {
             AccessibilityNodeInfo.AccessibilityAction unlock
                     = new AccessibilityNodeInfo.AccessibilityAction(
@@ -204,10 +276,6 @@
         }
     }
 
-    public void setAccessibilityController(AccessibilityController accessibilityController) {
-        mAccessibilityController = accessibilityController;
-    }
-
     private Drawable getIconForState(int state) {
         int iconRes;
         switch (state) {
@@ -273,17 +341,17 @@
         }
     }
 
-    public void setDarkAmount(float darkAmount) {
-        mDarkAmount = darkAmount;
+    @Override
+    public void onDozeAmountChanged(float linear, float eased) {
+        mDozeAmount = eased;
         updateDarkTint();
     }
 
     /**
      * When keyguard is in pulsing (AOD2) state.
      * @param pulsing {@code true} when pulsing.
-     * @param animated if transition should be animated.
      */
-    public void setPulsing(boolean pulsing, boolean animated) {
+    public void setPulsing(boolean pulsing) {
         mPulsing = pulsing;
         update();
     }
@@ -291,15 +359,15 @@
     /**
      * Sets the dozing state of the keyguard.
      */
-    public void setDozing(boolean dozing) {
+    @Override
+    public void onDozingChanged(boolean dozing) {
         mDozing = dozing;
         update();
     }
 
     private void updateDarkTint() {
-        Drawable drawable = getDrawable().mutate();
-        int color = ColorUtils.blendARGB(Color.TRANSPARENT, Color.WHITE, mDarkAmount);
-        drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
+        int color = ColorUtils.blendARGB(mIconColor, Color.WHITE, mDozeAmount);
+        setImageTintList(ColorStateList.valueOf(color));
     }
 
     /**
@@ -312,4 +380,27 @@
         mBouncerVisible = bouncerVisible;
         update();
     }
+
+    @Override
+    public void onDensityOrFontScaleChanged() {
+        ViewGroup.LayoutParams lp = getLayoutParams();
+        if (lp == null) {
+            return;
+        }
+        lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_lock_width);
+        lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_lock_height);
+        setLayoutParams(lp);
+        update(true /* force */);
+    }
+
+    @Override
+    public void onLocaleListChanged() {
+        setContentDescription(getContext().getText(R.string.accessibility_unlock_button));
+        update(true /* force */);
+    }
+
+    @Override
+    public void onUnlockMethodStateChanged() {
+        update();
+    }
 }
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 ab13149..57b2ee9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -204,7 +204,6 @@
     private ValueAnimator mQsExpansionAnimator;
     private FlingAnimationUtils mFlingAnimationUtils;
     private int mStatusBarMinHeight;
-    private boolean mUnlockIconActive;
     private int mNotificationsHeaderCollideDistance;
     private int mUnlockMoveDistance;
     private float mEmptyDragAmount;
@@ -330,7 +329,6 @@
     private final ShadeController mShadeController =
             Dependency.get(ShadeController.class);
     private int mDisplayId;
-    private KeyguardBouncer mBouncer;
 
     /**
      * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged.
@@ -640,7 +638,6 @@
                     mKeyguardStatusView.getHeight(),
                     clockPreferredY,
                     mInterpolatedDarkAmount,
-                    mStatusBar.isKeyguardCurrentlySecure(),
                     mEmptyDragAmount);
             mClockPositionAlgorithm.run(mClockPositionResult);
             PropertyAnimator.setProperty(mKeyguardStatusView, AnimatableProperty.X,
@@ -736,7 +733,6 @@
     public void resetViews(boolean animate) {
         mIsLaunchTransitionFinished = false;
         mBlockTouches = false;
-        mUnlockIconActive = false;
         if (!mLaunchingAffordance) {
             mAffordanceHelper.reset(false);
             mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE;
@@ -1518,6 +1514,10 @@
             mStatusBar.executeRunnableDismissingKeyguard(null, null /* cancelAction */,
                     false /* dismissShade */, true /* afterKeyguardGone */, false /* deferred */);
         }
+        if (mExpansionListener != null) {
+            mExpansionListener.onQsExpansionChanged(mQsMaxExpansionHeight != 0
+                    ? mQsExpansionHeight / mQsMaxExpansionHeight : 0);
+        }
         if (DEBUG) {
             invalidate();
         }
@@ -1837,6 +1837,9 @@
                 !mHeadsUpManager.hasPinnedHeadsUp()) {
             alpha = getFadeoutAlpha();
         }
+        if (mBarState == StatusBarState.KEYGUARD && !mHintAnimationRunning) {
+            alpha *= mClockPositionResult.clockAlpha;
+        }
         mNotificationStackScroller.setAlpha(alpha);
     }
 
@@ -2292,11 +2295,6 @@
     }
 
     @Override
-    public KeyguardAffordanceView getCenterIcon() {
-        return mKeyguardBottomArea.getLockIcon();
-    }
-
-    @Override
     public KeyguardAffordanceView getRightIcon() {
         return getLayoutDirection() == LAYOUT_DIRECTION_RTL
                 ? mKeyguardBottomArea.getLeftView()
@@ -2723,7 +2721,6 @@
     private void setLaunchingAffordance(boolean launchingAffordance) {
         getLeftIcon().setLaunchingAffordance(launchingAffordance);
         getRightIcon().setLaunchingAffordance(launchingAffordance);
-        getCenterIcon().setLaunchingAffordance(launchingAffordance);
     }
 
     /**
@@ -2872,7 +2869,6 @@
         }
         mNotificationStackScroller.setPulsing(pulsing, animatePulse);
         mKeyguardStatusView.setPulsing(pulsing);
-        mKeyguardBottomArea.setPulsing(pulsing, animatePulse);
     }
 
     public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) {
@@ -2910,10 +2906,6 @@
         mKeyguardBottomArea.setUserSetupComplete(userSetupComplete);
     }
 
-    public LockIcon getLockIcon() {
-        return mKeyguardBottomArea.getLockIcon();
-    }
-
     public void applyExpandAnimationParams(ExpandAnimationParameters params) {
         mExpandOffset = params != null ? params.getTopChange() : 0;
         updateQsExpansion();
@@ -2957,7 +2949,6 @@
     public void onBouncerPreHideAnimation() {
         setKeyguardStatusViewVisibility(mBarState, true /* keyguardFadingAway */,
                 false /* goingToFullShade */);
-        updateLockIcon();
     }
 
     /**
@@ -3056,71 +3047,29 @@
         mKeyguardBottomArea.showTransientIndication(id);
     }
 
-    /**
-     * Sets the reference to the {@link KeyguardBouncer}.
-     */
-    public void setBouncer(KeyguardBouncer bouncer) {
-        mBouncer = bouncer;
-        updateLockIcon();
-    }
-
-    public void updateLockIcon() {
-        if (mBouncer == null) {
-            return;
-        }
-
-        ViewGroup bouncerContainer = mBouncer.getLockIconContainer();
-        ViewGroup bottomContainer = mKeyguardBottomArea.getLockIconContainer();
-        LockIcon lockIcon = mKeyguardBottomArea.getLockIcon();
-
-        if (mBouncer.isAnimatingAway()) {
-            if (!lockIcon.isAnimatingAlpha() && lockIcon.getAlpha() != 0) {
-                lockIcon.setImageAlpha(0, true /* animate */);
-            }
-            // Let's not re-apply the translation if the bouncer is animating, its
-            // animation also includes translation and transition would be jarring.
-            return;
-        }
-
-        // Lock icon needs to be re-parented in case of a scrimmed bouncer,
-        // otherwise it would be under the scrim.
-        if (mBouncer.isScrimmed() && bouncerContainer != null
-                && lockIcon.getParent() != bouncerContainer) {
-            ((ViewGroup) lockIcon.getParent()).removeView(lockIcon);
-            bouncerContainer.addView(lockIcon);
-        } else if (!mBouncer.isScrimmed() && bottomContainer != null
-                && lockIcon.getParent() != bottomContainer) {
-            ((ViewGroup) lockIcon.getParent()).removeView(lockIcon);
-            bottomContainer.addView(lockIcon);
-        }
-
-        float translation = 0;
-        if (bouncerContainer != null && bottomContainer != null && !mBouncer.isScrimmed()) {
-            float bottomAreaContainerY = getCommonTop(bottomContainer);
-            float bouncerLockY = getCommonTop(bouncerContainer);
-            if (bouncerLockY < bottomAreaContainerY) {
-                translation = bouncerLockY - bottomAreaContainerY;
-            }
-        }
-        lockIcon.setTranslationY(translation);
-
-        if (lockIcon.getAlpha() != 1) {
-            lockIcon.setImageAlpha(1, false /* animate */);
-        }
-    }
-
-    private static float getCommonTop(View view) {
-        float y = view.getTop();
-        ViewGroup parent = (ViewGroup) view.getParent();
-        while (!(parent instanceof StatusBarWindowView) && parent != null) {
-            y += parent.getY();
-            parent = (ViewGroup) parent.getParent();
-        }
-        return y;
-    }
-
     @Override
     public void onDynamicPrivacyChanged() {
         mAnimateNextPositionUpdate = true;
     }
+
+    /**
+     * Panel and QS expansion callbacks.
+     */
+    public interface PanelExpansionListener {
+        /**
+         * Invoked whenever the notification panel expansion changes, at every animation frame.
+         * This is the main expansion that happens when the user is swiping up to dismiss the
+         * lock screen.
+         *
+         * @param expansion 0 when collapsed, 1 when expanded.
+         * @param tracking {@code true} when the user is actively dragging the panel.
+         */
+        void onPanelExpansionChanged(float expansion, boolean tracking);
+
+        /**
+         * Invoked whenever the QS expansion changes, at every animation frame.
+         * @param expansion 0 when collapsed, 1 when expanded.
+         */
+        void onQsExpansionChanged(float expansion);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 99345d2..24389f2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -49,11 +49,11 @@
 import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.SysuiStatusBarStateController;
 import com.android.systemui.statusbar.VibratorHelper;
+import com.android.systemui.statusbar.phone.NotificationPanelView.PanelExpansionListener;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
-import java.util.function.BiConsumer;
 
 public abstract class PanelView extends FrameLayout {
     public static final boolean DEBUG = PanelBar.DEBUG;
@@ -68,7 +68,7 @@
     private boolean mVibrateOnOpening;
     protected boolean mLaunchingNotification;
     private int mFixedDuration = NO_FIXED_DURATION;
-    private BiConsumer<Float, Boolean> mExpansionListener;
+    protected PanelExpansionListener mExpansionListener;
 
     private final void logf(String fmt, Object... args) {
         Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
@@ -1115,7 +1115,6 @@
 
         View[] viewsToAnimate = {
                 mKeyguardBottomArea.getIndicationArea(),
-                mKeyguardBottomArea.getLockIcon(),
                 mStatusBar.getAmbientIndicationContainer()};
         for (View v : viewsToAnimate) {
             if (v == null) {
@@ -1163,28 +1162,25 @@
 
     private ValueAnimator createHeightAnimator(float targetHeight) {
         ValueAnimator animator = ValueAnimator.ofFloat(mExpandedHeight, targetHeight);
-        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
-            @Override
-            public void onAnimationUpdate(ValueAnimator animation) {
-                setExpandedHeightInternal((Float) animation.getAnimatedValue());
-            }
-        });
+        animator.addUpdateListener(
+                animation -> setExpandedHeightInternal((float) animation.getAnimatedValue()));
         return animator;
     }
 
     protected void notifyBarPanelExpansionChanged() {
+        float fraction = mInstantExpanding ? 1 : mExpandedFraction;
         if (mBar != null) {
-            mBar.panelExpansionChanged(mExpandedFraction, mExpandedFraction > 0f
+            mBar.panelExpansionChanged(fraction, fraction > 0f
                     || mPeekAnimator != null || mInstantExpanding
                     || isPanelVisibleBecauseOfHeadsUp() || mTracking || mHeightAnimator != null);
         }
         if (mExpansionListener != null) {
-            mExpansionListener.accept(mExpandedFraction, mTracking);
+            mExpansionListener.onPanelExpansionChanged(fraction, mTracking);
         }
     }
 
-    public void setExpansionListener(BiConsumer<Float, Boolean> consumer) {
-        mExpansionListener = consumer;
+    public void setExpansionListener(PanelExpansionListener panelExpansionListener) {
+        mExpansionListener = panelExpansionListener;
     }
 
     protected abstract boolean isPanelVisibleBecauseOfHeadsUp();
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 9fccf91..2c9a4c5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -879,7 +879,7 @@
         mKeyguardIndicationController =
                 SystemUIFactory.getInstance().createKeyguardIndicationController(mContext,
                         mStatusBarWindow.findViewById(R.id.keyguard_indication_area),
-                        mNotificationPanel.getLockIcon());
+                        mStatusBarWindow.findViewById(R.id.lock_icon));
         mNotificationPanel.setKeyguardIndicationController(mKeyguardIndicationController);
 
         mAmbientIndicationContainer = mStatusBarWindow.findViewById(
@@ -1171,7 +1171,7 @@
         mKeyguardIndicationController =
                 SystemUIFactory.getInstance().createKeyguardIndicationController(mContext,
                         mStatusBarWindow.findViewById(R.id.keyguard_indication_area),
-                        mNotificationPanel.getLockIcon());
+                        mStatusBarWindow.findViewById(R.id.lock_icon));
         mNotificationPanel.setKeyguardIndicationController(mKeyguardIndicationController);
         mKeyguardIndicationController
                 .setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
@@ -1222,7 +1222,8 @@
                 mScrimController, this, UnlockMethodCache.getInstance(mContext),
                 new Handler(), mKeyguardUpdateMonitor, Dependency.get(TunerService.class));
         mStatusBarKeyguardViewManager = keyguardViewMediator.registerStatusBar(this,
-                getBouncerContainer(), mNotificationPanel, mBiometricUnlockController);
+                getBouncerContainer(), mNotificationPanel, mBiometricUnlockController,
+                mStatusBarWindow.findViewById(R.id.lock_icon_container));
         mKeyguardIndicationController
                 .setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
         mBiometricUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
@@ -1231,7 +1232,6 @@
         mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback();
         mLightBarController.setBiometricUnlockController(mBiometricUnlockController);
         mMediaManager.setBiometricUnlockController(mBiometricUnlockController);
-        mNotificationPanel.setBouncer(mStatusBarKeyguardViewManager.getBouncer());
         Dependency.get(KeyguardDismissUtil.class).setDismissHandler(this::executeWhenUnlocked);
         Trace.endSection();
     }
@@ -3947,6 +3947,7 @@
                     mKeyguardViewMediator.setPulsing(pulsing);
                     mNotificationPanel.setPulsing(pulsing);
                     mVisualStabilityManager.setPulsing(pulsing);
+                    mStatusBarWindow.setPulsing(pulsing);
                     mIgnoreTouchWhilePulsing = false;
                     if (mKeyguardUpdateMonitor != null && passiveAuthInterrupt) {
                         mKeyguardUpdateMonitor.onAuthInterruptDetected(pulsing /* active */);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index e3cc3d4..09fa9ca 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -25,6 +25,8 @@
 import android.content.res.ColorStateList;
 import android.os.Bundle;
 import android.os.SystemClock;
+import android.transition.Fade;
+import android.transition.TransitionManager;
 import android.util.StatsLog;
 import android.view.KeyEvent;
 import android.view.View;
@@ -32,14 +34,16 @@
 import android.view.ViewRootImpl;
 import android.view.WindowManagerGlobal;
 
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.LatencyTracker;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.keyguard.ViewMediatorCallback;
+import com.android.settingslib.animation.AppearAnimationUtils;
+import com.android.settingslib.animation.DisappearAnimationUtils;
 import com.android.systemui.DejankUtils;
 import com.android.systemui.Dependency;
+import com.android.systemui.Interpolators;
 import com.android.systemui.SysUiServiceProvider;
 import com.android.systemui.SystemUIFactory;
 import com.android.systemui.dock.DockManager;
@@ -49,6 +53,7 @@
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.NotificationMediaManager;
 import com.android.systemui.statusbar.RemoteInputController;
+import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.SysuiStatusBarStateController;
 import com.android.systemui.statusbar.phone.KeyguardBouncer.BouncerExpansionCallback;
 import com.android.systemui.statusbar.policy.ConfigurationController;
@@ -65,7 +70,8 @@
  * {@link com.android.keyguard.KeyguardViewBase}.
  */
 public class StatusBarKeyguardViewManager implements RemoteInputController.Callback,
-        StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener {
+        StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener,
+        NotificationPanelView.PanelExpansionListener {
 
     // When hiding the Keyguard with timing supplied from WindowManager, better be early than late.
     private static final long HIDE_TIMING_CORRECTION_MS = - 16 * 3;
@@ -90,7 +96,7 @@
         public void onFullyShown() {
             updateStates();
             mStatusBar.wakeUpIfDozing(SystemClock.uptimeMillis(), mContainer, "BOUNCER_VISIBLE");
-            mNotificationPanelView.updateLockIcon();
+            updateLockIcon();
         }
 
         @Override
@@ -99,14 +105,14 @@
         }
 
         @Override
-        public void onFullyHidden() {
-            updateStates();
-            mNotificationPanelView.updateLockIcon();
+        public void onStartingToShow() {
+            updateLockIcon();
         }
 
         @Override
-        public void onLayout() {
-            mNotificationPanelView.updateLockIcon();
+        public void onFullyHidden() {
+            updateStates();
+            updateLockIcon();
         }
     };
     private final DockManager.DockEventListener mDockEventListener =
@@ -129,6 +135,7 @@
     private BiometricUnlockController mBiometricUnlockController;
 
     private ViewGroup mContainer;
+    private ViewGroup mLockIconContainer;
 
     protected KeyguardBouncer mBouncer;
     protected boolean mShowing;
@@ -151,6 +158,7 @@
     private boolean mLastPulsing;
     private int mLastBiometricMode;
     private boolean mGoingToSleepVisibleNotOccluded;
+    private int mLastLockVisibility = -1;
 
     private OnDismissAction mAfterKeyguardGoneAction;
     private final ArrayList<Runnable> mAfterKeyguardGoneRunnables = new ArrayList<>();
@@ -161,6 +169,8 @@
             (KeyguardMonitorImpl) Dependency.get(KeyguardMonitor.class);
     private final NotificationMediaManager mMediaManager =
             Dependency.get(NotificationMediaManager.class);
+    private final StatusBarStateController mStatusBarStateController =
+            Dependency.get(StatusBarStateController.class);
     private final DockManager mDockManager;
 
     private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback =
@@ -184,7 +194,7 @@
         mStatusBarWindowController = Dependency.get(StatusBarWindowController.class);
         mGesturalNav = QuickStepContract.isGesturalMode(context);
         KeyguardUpdateMonitor.getInstance(context).registerCallback(mUpdateMonitorCallback);
-        Dependency.get(StatusBarStateController.class).addCallback(this);
+        mStatusBarStateController.addCallback(this);
         Dependency.get(ConfigurationController.class).addCallback(this);
         mDockManager = SysUiServiceProvider.getComponent(context, DockManager.class);
         if (mDockManager != null) {
@@ -197,19 +207,21 @@
             ViewGroup container,
             NotificationPanelView notificationPanelView,
             BiometricUnlockController biometricUnlockController,
-            DismissCallbackRegistry dismissCallbackRegistry) {
+            DismissCallbackRegistry dismissCallbackRegistry,
+            ViewGroup lockIconContainer) {
         mStatusBar = statusBar;
         mContainer = container;
+        mLockIconContainer = lockIconContainer;
         mBiometricUnlockController = biometricUnlockController;
         mBouncer = SystemUIFactory.getInstance().createKeyguardBouncer(mContext,
                 mViewMediatorCallback, mLockPatternUtils, container, dismissCallbackRegistry,
                 mExpansionCallback);
         mNotificationPanelView = notificationPanelView;
-        notificationPanelView.setExpansionListener(this::onPanelExpansionChanged);
+        notificationPanelView.setExpansionListener(this);
     }
 
-    @VisibleForTesting
-    void onPanelExpansionChanged(float expansion, boolean tracking) {
+    @Override
+    public void onPanelExpansionChanged(float expansion, boolean tracking) {
         // We don't want to translate the bounce when:
         // • Keyguard is occluded, because we're in a FLAG_SHOW_WHEN_LOCKED activity and need to
         //   conserve the original animation.
@@ -230,7 +242,32 @@
                 mBouncer.show(false /* resetSecuritySelection */, false /* scrimmed */);
             }
         }
-        mNotificationPanelView.updateLockIcon();
+    }
+
+    @Override
+    public void onQsExpansionChanged(float expansion) {
+        updateLockIcon();
+    }
+
+    private void updateLockIcon() {
+        boolean keyguardWithoutQs = mStatusBarStateController.getState() == StatusBarState.KEYGUARD
+                && !mNotificationPanelView.isQsExpanded();
+        int lockVisibility = (mBouncer.isShowing() || keyguardWithoutQs)
+                && !mBouncer.isAnimatingAway() ? View.VISIBLE : View.INVISIBLE;
+
+        if (mLastLockVisibility != lockVisibility) {
+            mLastLockVisibility = lockVisibility;
+
+            Fade transition = new Fade();
+            boolean appearing = lockVisibility == View.VISIBLE;
+            transition.setDuration(appearing ? AppearAnimationUtils.DEFAULT_APPEAR_DURATION
+                    : DisappearAnimationUtils.DEFAULT_APPEAR_DURATION / 2);
+            transition.setInterpolator(appearing ? Interpolators.ALPHA_IN
+                    : Interpolators.ALPHA_OUT);
+            TransitionManager.beginDelayedTransition((ViewGroup) mLockIconContainer.getParent(),
+                    transition);
+            mLockIconContainer.setVisibility(lockVisibility);
+        }
     }
 
     /**
@@ -463,6 +500,7 @@
             finishRunnable.run();
         }
         mNotificationPanelView.blockExpansionForCurrentTouch();
+        updateLockIcon();
     }
 
     /**
@@ -849,7 +887,7 @@
 
     @Override
     public void onStateChanged(int newState) {
-        // Nothing
+        updateLockIcon();
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 9609057..28db28c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -87,6 +87,7 @@
     private NotificationStackScrollLayout mStackScrollLayout;
     private NotificationPanelView mNotificationPanel;
     private View mBrightnessMirror;
+    private LockIcon mLockIcon;
     private PhoneStatusBarView mStatusBarView;
 
     private int mRightInset = 0;
@@ -241,10 +242,10 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-        mStackScrollLayout = (NotificationStackScrollLayout) findViewById(
-                R.id.notification_stack_scroller);
-        mNotificationPanel = (NotificationPanelView) findViewById(R.id.notification_panel);
+        mStackScrollLayout = findViewById(R.id.notification_stack_scroller);
+        mNotificationPanel = findViewById(R.id.notification_panel);
         mBrightnessMirror = findViewById(R.id.brightness_mirror);
+        mLockIcon = findViewById(R.id.lock_icon);
     }
 
     @Override
@@ -255,6 +256,13 @@
         }
     }
 
+    /**
+     * Propagate {@link StatusBar} pulsing state.
+     */
+    public void setPulsing(boolean pulsing) {
+        mLockIcon.setPulsing(pulsing);
+    }
+
     public void setStatusBarView(PhoneStatusBarView statusBarView) {
         mStatusBarView = statusBarView;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java b/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
index 376c328..1e486c0 100644
--- a/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
+++ b/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
@@ -24,12 +24,14 @@
 import android.view.View;
 
 import com.android.keyguard.KeyguardClockSwitch;
+import com.android.keyguard.KeyguardMessageArea;
 import com.android.keyguard.KeyguardSliceView;
 import com.android.systemui.SystemUIFactory;
 import com.android.systemui.qs.QSCarrierGroup;
 import com.android.systemui.qs.QSFooterImpl;
 import com.android.systemui.qs.QuickStatusBarHeader;
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
+import com.android.systemui.statusbar.phone.LockIcon;
 import com.android.systemui.statusbar.phone.NotificationPanelView;
 
 import java.lang.reflect.InvocationTargetException;
@@ -142,6 +144,16 @@
          * Creates the KeyguardSliceView.
          */
         KeyguardSliceView createKeyguardSliceView();
+
+        /**
+         * Creates the KeyguardMessageArea.
+         */
+        KeyguardMessageArea createKeyguardMessageArea();
+
+        /**
+         * Creates the keyguard LockIcon.
+         */
+        LockIcon createLockIcon();
     }
 
     /**
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java
index f8ca262..fc7b9a4 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java
@@ -18,32 +18,50 @@
 
 import static junit.framework.Assert.assertEquals;
 
-import static org.mockito.Mockito.mock;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
 
 import android.test.suitebuilder.annotation.SmallTest;
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper.RunWithLooper;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.policy.ConfigurationController;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @SmallTest
 @RunWith(AndroidTestingRunner.class)
 @RunWithLooper
 public class KeyguardMessageAreaTest extends SysuiTestCase {
+    @Mock
+    private ConfigurationController mConfigurationController;
+    @Mock
+    private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
     private KeyguardMessageArea mMessageArea;
 
     @Before
     public void setUp() throws Exception {
-        KeyguardUpdateMonitor monitor = mock(KeyguardUpdateMonitor.class);
-        mMessageArea = new KeyguardMessageArea(mContext, null, monitor);
+        MockitoAnnotations.initMocks(this);
+        mMessageArea = new KeyguardMessageArea(mContext, null, mKeyguardUpdateMonitor,
+                mConfigurationController);
         waitForIdleSync();
     }
 
     @Test
+    public void onAttachedToWindow_registersConfigurationCallback() {
+        mMessageArea.onAttachedToWindow();
+        verify(mConfigurationController).addCallback(eq(mMessageArea));
+
+        mMessageArea.onDetachedFromWindow();
+        verify(mConfigurationController).removeCallback(eq(mMessageArea));
+    }
+
+    @Test
     public void clearFollowedByMessage_keepsMessage() {
         mMessageArea.setMessage("");
         mMessageArea.setMessage("test");
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPatternViewTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPatternViewTest.kt
index e7469c3..5f03bdb 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPatternViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPatternViewTest.kt
@@ -22,11 +22,13 @@
 import android.view.LayoutInflater
 
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.statusbar.policy.ConfigurationController
 import com.google.common.truth.Truth.assertThat
 
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
+import org.mockito.Mockito.mock
 
 @SmallTest
 @RunWith(AndroidTestingRunner::class)
@@ -41,8 +43,9 @@
         val inflater = LayoutInflater.from(context)
         mKeyguardPatternView = inflater.inflate(R.layout.keyguard_pattern_view, null)
                 as KeyguardPatternView
-        mSecurityMessage = KeyguardMessageArea.findSecurityMessageDisplay(mKeyguardPatternView)
-                as KeyguardMessageArea
+        mSecurityMessage = KeyguardMessageArea(mContext, null,
+                mock(KeyguardUpdateMonitor::class.java), mock(ConfigurationController::class.java))
+        mKeyguardPatternView.mSecurityMessageDisplay = mSecurityMessage
     }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
index 18ffbb5..80c51cf 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
@@ -40,10 +40,12 @@
 import androidx.test.filters.SmallTest;
 import androidx.test.runner.AndroidJUnit4;
 
+import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.statusbar.phone.KeyguardIndicationTextView;
+import com.android.systemui.statusbar.phone.LockIcon;
 import com.android.systemui.util.wakelock.WakeLockFake;
 
 import org.junit.Before;
@@ -66,6 +68,10 @@
     private ViewGroup mIndicationArea;
     @Mock
     private KeyguardIndicationTextView mDisclosure;
+    @Mock
+    private LockIcon mLockIcon;
+    @Mock
+    private LockPatternUtils mLockPatternUtils;
     private KeyguardIndicationTextView mTextView;
 
     private KeyguardIndicationController mController;
@@ -95,7 +101,8 @@
         if (Looper.myLooper() == null) {
             Looper.prepare();
         }
-        mController = new KeyguardIndicationController(mContext, mIndicationArea, null, mWakeLock);
+        mController = new KeyguardIndicationController(mContext, mIndicationArea, mLockIcon,
+                mLockPatternUtils, mWakeLock);
     }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt
index 3010996..b95bb0a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt
@@ -42,6 +42,5 @@
 
         other.initFrom(mKeyguardBottomArea)
         other.launchVoiceAssist()
-        other.onLongClick(null)
     }
 }
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
index c2e60d9..575ff16 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
@@ -132,6 +132,7 @@
     public void testShow_notifiesVisibility() {
         mBouncer.show(true);
         verify(mViewMediatorCallback).onBouncerVisiblityChanged(eq(true));
+        verify(mExpansionCallback).onStartingToShow();
 
         // Not called again when visible
         reset(mViewMediatorCallback);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
index 3f4d96c..9354648 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
@@ -38,7 +38,6 @@
     private static final int PREFERRED_CLOCK_Y = SCREEN_HEIGHT / 2;
     private static final int EMPTY_MARGIN = 0;
     private static final int EMPTY_HEIGHT = 0;
-    private static final boolean SECURE_LOCKED = false;
     private static final float ZERO_DRAG = 0.f;
     private static final float OPAQUE = 1.f;
     private static final float TRANSPARENT = 0.f;
@@ -307,7 +306,7 @@
     private void positionClock() {
         mClockPositionAlgorithm.setup(EMPTY_MARGIN, SCREEN_HEIGHT, mNotificationStackHeight,
                 mPanelExpansion, SCREEN_HEIGHT, mKeyguardStatusHeight, PREFERRED_CLOCK_Y, mDark,
-                SECURE_LOCKED, ZERO_DRAG);
+                ZERO_DRAG);
         mClockPositionAlgorithm.run(mClockPosition);
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 7d347d5..d09cea5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -19,6 +19,7 @@
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyFloat;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.verify;
@@ -27,6 +28,7 @@
 import android.content.Context;
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
+import android.view.View;
 import android.view.ViewGroup;
 
 import androidx.test.filters.SmallTest;
@@ -36,6 +38,8 @@
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.keyguard.DismissCallbackRegistry;
 import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
+import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.StatusBarState;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -64,16 +68,23 @@
     private BiometricUnlockController mBiometrucUnlockController;
     @Mock
     private DismissCallbackRegistry mDismissCallbackRegistry;
+    @Mock
+    private ViewGroup mLockIconContainer;
+    @Mock
+    private StatusBarStateController mStatusBarStateController;
     private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mDependency.injectMockDependency(StatusBarWindowController.class);
+        mDependency.injectTestDependency(StatusBarStateController.class, mStatusBarStateController);
+        when(mLockIconContainer.getParent()).thenReturn(mock(ViewGroup.class));
         mStatusBarKeyguardViewManager = new TestableStatusBarKeyguardViewManager(getContext(),
                 mViewMediatorCallback, mLockPatternUtils);
         mStatusBarKeyguardViewManager.registerStatusBar(mStatusBar, mContainer,
-                mNotificationPanelView, mBiometrucUnlockController, mDismissCallbackRegistry);
+                mNotificationPanelView, mBiometrucUnlockController, mDismissCallbackRegistry,
+                mLockIconContainer);
         mStatusBarKeyguardViewManager.show(null);
     }
 
@@ -187,6 +198,29 @@
         verify(mBouncer, never()).setExpansion(anyFloat());
     }
 
+    @Test
+    public void onQsExpansionChanged_lockVisibleOnlyWhenCollapsed() {
+        when(mStatusBarStateController.getState()).thenReturn(StatusBarState.KEYGUARD);
+        mStatusBarKeyguardViewManager.onQsExpansionChanged(0);
+        verify(mLockIconContainer).setVisibility(eq(View.VISIBLE));
+
+        reset(mNotificationPanelView);
+        when(mNotificationPanelView.isQsExpanded()).thenReturn(true);
+        mStatusBarKeyguardViewManager.onQsExpansionChanged(1f);
+        verify(mLockIconContainer).setVisibility(eq(View.INVISIBLE));
+    }
+
+    @Test
+    public void onQsExpansionChanged_lockInvisibleWhenAnimatingAway() {
+        when(mBouncer.isShowing()).thenReturn(true);
+        mStatusBarKeyguardViewManager.onQsExpansionChanged(0);
+        verify(mLockIconContainer).setVisibility(eq(View.VISIBLE));
+
+        when(mBouncer.isAnimatingAway()).thenReturn(true);
+        mStatusBarKeyguardViewManager.onQsExpansionChanged(0f);
+        verify(mLockIconContainer).setVisibility(eq(View.INVISIBLE));
+    }
+
     private class TestableStatusBarKeyguardViewManager extends StatusBarKeyguardViewManager {
 
         public TestableStatusBarKeyguardViewManager(Context context,
@@ -199,9 +233,10 @@
         public void registerStatusBar(StatusBar statusBar, ViewGroup container,
                 NotificationPanelView notificationPanelView,
                 BiometricUnlockController fingerprintUnlockController,
-                DismissCallbackRegistry dismissCallbackRegistry) {
+                DismissCallbackRegistry dismissCallbackRegistry,
+                ViewGroup lockIconContainer) {
             super.registerStatusBar(statusBar, container, notificationPanelView,
-                    fingerprintUnlockController, dismissCallbackRegistry);
+                    fingerprintUnlockController, dismissCallbackRegistry, lockIconContainer);
             mBouncer = StatusBarKeyguardViewManagerTest.this.mBouncer;
         }
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index 5f7f422..43bc21b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -170,6 +170,8 @@
     private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
     @Mock
     private AmbientDisplayConfiguration mAmbientDisplayConfiguration;
+    @Mock
+    private StatusBarWindowView mStatusBarWindowView;
 
     private TestableStatusBar mStatusBar;
     private FakeMetricsLogger mMetricsLogger;
@@ -261,7 +263,7 @@
                 mDozeScrimController, mock(NotificationShelf.class),
                 mLockscreenUserManager, mCommandQueue, mNotificationPresenter,
                 mock(BubbleController.class), mock(NavigationBarController.class),
-                mock(AutoHideController.class), mKeyguardUpdateMonitor);
+                mock(AutoHideController.class), mKeyguardUpdateMonitor, mStatusBarWindowView);
         mStatusBar.mContext = mContext;
         mStatusBar.mComponents = mContext.getComponents();
         SystemUIFactory.getInstance().getRootComponent()
@@ -767,7 +769,8 @@
                 BubbleController bubbleController,
                 NavigationBarController navBarController,
                 AutoHideController autoHideController,
-                KeyguardUpdateMonitor keyguardUpdateMonitor) {
+                KeyguardUpdateMonitor keyguardUpdateMonitor,
+                StatusBarWindowView statusBarWindow) {
             mStatusBarKeyguardViewManager = man;
             mUnlockMethodCache = unlock;
             mKeyguardIndicationController = key;
@@ -801,6 +804,7 @@
             mNavigationBarController = navBarController;
             mAutoHideController = autoHideController;
             mKeyguardUpdateMonitor = keyguardUpdateMonitor;
+            mStatusBarWindow = statusBarWindow;
         }
 
         private WakefulnessLifecycle createAwakeWakefulnessLifecycle() {