Merge "Show unlock icon on AOD" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9c557cdf9a
44
packages/SystemUI/res-keyguard/drawable/ic_unlocked_aod.xml
Normal file
44
packages/SystemUI/res-keyguard/drawable/ic_unlocked_aod.xml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2021 The Android Open Source Project
|
||||||
|
~
|
||||||
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
~ you may not use this file except in compliance with the License.
|
||||||
|
~ You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing, software
|
||||||
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
~ See the License for the specific language governing permissions and
|
||||||
|
~ limitations under the License
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="65dp" android:width="46dp" android:viewportHeight="65" android:viewportWidth="46">
|
||||||
|
<group android:name="_R_G_L_2_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_2_G_D_0_P_0"
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:fillAlpha="1"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData=" M0 6.13 C0.97,6.13 1.75,5.34 1.75,4.38 C1.75,3.41 0.97,2.63 0,2.63 C-0.97,2.63 -1.75,3.41 -1.75,4.38 C-1.75,5.34 -0.97,6.13 0,6.13c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_1_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_1_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.5"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M7.88 -0.62 C7.88,-0.62 7.88,9.38 7.88,9.38 C7.88,10.48 6.98,11.38 5.88,11.38 C5.88,11.38 -5.87,11.38 -5.87,11.38 C-6.98,11.38 -7.87,10.48 -7.87,9.38 C-7.87,9.38 -7.87,-0.62 -7.87,-0.62 C-7.87,-1.73 -6.98,-2.62 -5.87,-2.62 C-5.87,-2.62 5.88,-2.62 5.88,-2.62 C6.98,-2.62 7.88,-1.73 7.88,-0.62c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_0_G" android:translateX="14" android:translateY="13.5">
|
||||||
|
<path android:name="_R_G_L_0_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.5"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M21.25 14.88 C21.25,14.88 21.25,10.74 21.25,10.74 C21.25,8.59 19.5,7.29 17.44,7.21 C15.24,7.13 13.5,8.47 13.5,10.62 C13.5,10.62 13.5,15.75 13.5,15.75 " />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -50,6 +50,11 @@
|
|||||||
android:state_first="true"
|
android:state_first="true"
|
||||||
android:state_single="true"
|
android:state_single="true"
|
||||||
android:drawable="@drawable/ic_lock_aod" />
|
android:drawable="@drawable/ic_lock_aod" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/unlocked_aod"
|
||||||
|
android:state_last="true"
|
||||||
|
android:state_single="true"
|
||||||
|
android:drawable="@drawable/ic_unlocked_aod" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/no_icon"
|
android:id="@+id/no_icon"
|
||||||
@@ -79,4 +84,14 @@
|
|||||||
android:fromId="@id/locked"
|
android:fromId="@id/locked"
|
||||||
android:toId="@id/locked_aod"
|
android:toId="@id/locked_aod"
|
||||||
android:drawable="@drawable/lock_ls_to_aod" />
|
android:drawable="@drawable/lock_ls_to_aod" />
|
||||||
|
|
||||||
|
<transition
|
||||||
|
android:fromId="@id/unlocked_aod"
|
||||||
|
android:toId="@id/unlocked"
|
||||||
|
android:drawable="@drawable/unlocked_aod_to_ls" />
|
||||||
|
|
||||||
|
<transition
|
||||||
|
android:fromId="@id/unlocked"
|
||||||
|
android:toId="@id/unlocked_aod"
|
||||||
|
android:drawable="@drawable/unlocked_ls_to_aod" />
|
||||||
</animated-selector>
|
</animated-selector>
|
||||||
|
|||||||
133
packages/SystemUI/res-keyguard/drawable/unlocked_aod_to_ls.xml
Normal file
133
packages/SystemUI/res-keyguard/drawable/unlocked_aod_to_ls.xml
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Copyright (C) 2021 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.
|
||||||
|
-->
|
||||||
|
<animated-vector xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<aapt:attr name="android:drawable">
|
||||||
|
<vector android:height="65dp" android:width="46dp" android:viewportHeight="65" android:viewportWidth="46">
|
||||||
|
<group android:name="_R_G">
|
||||||
|
<group android:name="_R_G_L_2_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_2_G_D_0_P_0"
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:fillAlpha="1"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData=" M0 6.13 C0.97,6.13 1.75,5.34 1.75,4.38 C1.75,3.41 0.97,2.63 0,2.63 C-0.97,2.63 -1.75,3.41 -1.75,4.38 C-1.75,5.34 -0.97,6.13 0,6.13c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_1_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_1_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.5"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M7.88 -0.62 C7.88,-0.62 7.88,9.38 7.88,9.38 C7.88,10.48 6.98,11.38 5.88,11.38 C5.88,11.38 -5.87,11.38 -5.87,11.38 C-6.98,11.38 -7.87,10.48 -7.87,9.38 C-7.87,9.38 -7.87,-0.62 -7.87,-0.62 C-7.87,-1.73 -6.98,-2.62 -5.87,-2.62 C-5.87,-2.62 5.88,-2.62 5.88,-2.62 C6.98,-2.62 7.88,-1.73 7.88,-0.62c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_0_G" android:translateX="14" android:translateY="13.5">
|
||||||
|
<path android:name="_R_G_L_0_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.5"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M21.25 14.88 C21.25,14.88 21.25,10.74 21.25,10.74 C21.25,8.59 19.5,7.29 17.44,7.21 C15.24,7.13 13.5,8.47 13.5,10.62 C13.5,10.62 13.5,15.75 13.5,15.75 " />
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group android:name="time_group" />
|
||||||
|
</vector>
|
||||||
|
</aapt:attr>
|
||||||
|
<target android:name="_R_G_L_2_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData" android:duration="333" android:startOffset="0" android:valueFrom="M0 6.13 C0.97,6.13 1.75,5.34 1.75,4.38 C1.75,3.41 0.97,2.63 0,2.63 C-0.97,2.63 -1.75,3.41 -1.75,4.38 C-1.75,5.34 -0.97,6.13 0,6.13c " android:valueTo="M-0.09 8.63 C1.2,8.63 2.25,7.57 2.25,6.28 C2.25,4.99 1.2,3.94 -0.09,3.94 C-1.39,3.94 -2.44,4.99 -2.44,6.28 C-2.44,7.57 -1.39,8.63 -0.09,8.63c " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.372,0 0.203,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_1_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="strokeWidth"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="1.5"
|
||||||
|
android:valueTo="2"
|
||||||
|
android:valueType="floatType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.307,0 0.386,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_1_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="M7.88 -0.62 C7.88,-0.62 7.88,9.38 7.88,9.38 C7.88,10.48 6.98,11.38 5.88,11.38 C5.88,11.38 -5.87,11.38 -5.87,11.38 C-6.98,11.38 -7.87,10.48 -7.87,9.38 C-7.87,9.38 -7.87,-0.62 -7.87,-0.62 C-7.87,-1.73 -6.98,-2.62 -5.87,-2.62 C-5.87,-2.62 5.88,-2.62 5.88,-2.62 C6.98,-2.62 7.88,-1.73 7.88,-0.62c " android:valueTo="M11.25 -0.64 C11.25,-0.64 11.25,13.64 11.25,13.64 C11.25,15.22 9.97,16.5 8.39,16.5 C8.39,16.5 -8.39,16.5 -8.39,16.5 C-9.97,16.5 -11.25,15.22 -11.25,13.64 C-11.25,13.64 -11.25,-0.64 -11.25,-0.64 C-11.25,-2.22 -9.97,-3.5 -8.39,-3.5 C-8.39,-3.5 8.39,-3.5 8.39,-3.5 C9.97,-3.5 11.25,-2.22 11.25,-0.64c " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.372,0 0.203,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_0_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="strokeWidth"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="1.5"
|
||||||
|
android:valueTo="2.5"
|
||||||
|
android:valueType="floatType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_0_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="M21.25 14.88 C21.25,14.88 21.25,10.74 21.25,10.74 C21.25,8.59 19.5,7.29 17.44,7.21 C15.24,7.13 13.5,8.47 13.5,10.62 C13.5,10.62 13.5,15.75 13.5,15.75 " android:valueTo="M27.19 14.81 C27.19,14.81 27.19,8.3 27.19,8.3 C27.19,4.92 24.44,2.88 21.19,2.75 C17.74,2.62 15,4.74 15,8.11 C15,8.11 15,15 15,15 " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.347,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="time_group">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="translateX"
|
||||||
|
android:duration="517"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="0"
|
||||||
|
android:valueTo="1"
|
||||||
|
android:valueType="floatType" />
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
</animated-vector>
|
||||||
136
packages/SystemUI/res-keyguard/drawable/unlocked_ls_to_aod.xml
Normal file
136
packages/SystemUI/res-keyguard/drawable/unlocked_ls_to_aod.xml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Copyright (C) 2021 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.
|
||||||
|
-->
|
||||||
|
<animated-vector xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<aapt:attr name="android:drawable">
|
||||||
|
<vector android:height="65dp" android:width="46dp" android:viewportHeight="65" android:viewportWidth="46">
|
||||||
|
<group android:name="_R_G">
|
||||||
|
<group android:name="_R_G_L_2_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_2_G_D_0_P_0"
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:fillAlpha="1"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData=" M-0.09 8.63 C1.2,8.63 2.25,7.57 2.25,6.28 C2.25,4.99 1.2,3.94 -0.09,3.94 C-1.39,3.94 -2.44,4.99 -2.44,6.28 C-2.44,7.57 -1.39,8.63 -0.09,8.63c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_1_G" android:translateX="23" android:translateY="32.125">
|
||||||
|
<path android:name="_R_G_L_1_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M11.25 -0.64 C11.25,-0.64 11.25,13.64 11.25,13.64 C11.25,15.22 9.97,16.5 8.39,16.5 C8.39,16.5 -8.39,16.5 -8.39,16.5 C-9.97,16.5 -11.25,15.22 -11.25,13.64 C-11.25,13.64 -11.25,-0.64 -11.25,-0.64 C-11.25,-2.22 -9.97,-3.5 -8.39,-3.5 C-8.39,-3.5 8.39,-3.5 8.39,-3.5 C9.97,-3.5 11.25,-2.22 11.25,-0.64c " />
|
||||||
|
</group>
|
||||||
|
<group android:name="_R_G_L_0_G" android:translateX="14" android:translateY="13.5">
|
||||||
|
<path android:name="_R_G_L_0_G_D_0_P_0"
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2.5"
|
||||||
|
android:strokeAlpha="1"
|
||||||
|
android:pathData=" M27.19 14.81 C27.19,14.81 27.19,8.3 27.19,8.3 C27.19,4.92 24.44,2.88 21.19,2.75 C17.74,2.62 15,4.74 15,8.11 C15,8.11 15,15 15,15 " />
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group android:name="time_group" />
|
||||||
|
</vector>
|
||||||
|
</aapt:attr>
|
||||||
|
<target android:name="_R_G_L_2_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="M-0.09 8.63 C1.2,8.63 2.25,7.57 2.25,6.28 C2.25,4.99 1.2,3.94 -0.09,3.94 C-1.39,3.94 -2.44,4.99 -2.44,6.28 C-2.44,7.57 -1.39,8.63 -0.09,8.63c " android:valueTo="M0 6.13 C0.97,6.13 1.75,5.34 1.75,4.38 C1.75,3.41 0.97,2.63 0,2.63 C-0.97,2.63 -1.75,3.41 -1.75,4.38 C-1.75,5.34 -0.97,6.13 0,6.13c " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.347,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_1_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="strokeWidth"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="2"
|
||||||
|
android:valueTo="1.5"
|
||||||
|
android:valueType="floatType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.516,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_1_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="M11.25 -0.64 C11.25,-0.64 11.25,13.64 11.25,13.64 C11.25,15.22 9.97,16.5 8.39,16.5 C8.39,16.5 -8.39,16.5 -8.39,16.5 C-9.97,16.5 -11.25,15.22 -11.25,13.64 C-11.25,13.64 -11.25,-0.64 -11.25,-0.64 C-11.25,-2.22 -9.97,-3.5 -8.39,-3.5 C-8.39,-3.5 8.39,-3.5 8.39,-3.5 C9.97,-3.5 11.25,-2.22 11.25,-0.64c " android:valueTo="M7.88 -0.62 C7.88,-0.62 7.88,9.38 7.88,9.38 C7.88,10.48 6.98,11.38 5.88,11.38 C5.88,11.38 -5.87,11.38 -5.87,11.38 C-6.98,11.38 -7.87,10.48 -7.87,9.38 C-7.87,9.38 -7.87,-0.62 -7.87,-0.62 C-7.87,-1.73 -6.98,-2.62 -5.87,-2.62 C-5.87,-2.62 5.88,-2.62 5.88,-2.62 C6.98,-2.62 7.88,-1.73 7.88,-0.62c " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.347,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_0_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="strokeWidth"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="2.5"
|
||||||
|
android:valueTo="1.5"
|
||||||
|
android:valueType="floatType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.516,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="_R_G_L_0_G_D_0_P_0">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="pathData"
|
||||||
|
android:duration="333"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="M27.19 14.81 C27.19,14.81 27.19,8.3 27.19,8.3 C27.19,4.92 24.44,2.88 21.19,2.75 C17.74,2.62 15,4.74 15,8.11 C15,8.11 15,15 15,15 " android:valueTo="M21.25 14.88 C21.25,14.88 21.25,10.74 21.25,10.74 C21.25,8.59 19.5,7.29 17.44,7.21 C15.24,7.13 13.5,8.47 13.5,10.62 C13.5,10.62 13.5,15.75 13.5,15.75 " android:valueType="pathType">
|
||||||
|
<aapt:attr name="android:interpolator">
|
||||||
|
<pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.347,1 1.0,1.0" />
|
||||||
|
</aapt:attr>
|
||||||
|
</objectAnimator>
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
<target android:name="time_group">
|
||||||
|
<aapt:attr name="android:animation">
|
||||||
|
<set android:ordering="together">
|
||||||
|
<objectAnimator android:propertyName="translateX"
|
||||||
|
android:duration="517"
|
||||||
|
android:startOffset="0"
|
||||||
|
android:valueFrom="0"
|
||||||
|
android:valueTo="1"
|
||||||
|
android:valueType="floatType" />
|
||||||
|
</set>
|
||||||
|
</aapt:attr>
|
||||||
|
</target>
|
||||||
|
</animated-vector>
|
||||||
@@ -39,7 +39,6 @@ import android.os.Vibrator;
|
|||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.MathUtils;
|
import android.util.MathUtils;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.VelocityTracker;
|
import android.view.VelocityTracker;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -67,8 +66,6 @@ import com.android.systemui.statusbar.policy.KeyguardStateController;
|
|||||||
import com.android.systemui.util.ViewController;
|
import com.android.systemui.util.ViewController;
|
||||||
import com.android.systemui.util.concurrency.DelayableExecutor;
|
import com.android.systemui.util.concurrency.DelayableExecutor;
|
||||||
|
|
||||||
import com.airbnb.lottie.LottieAnimationView;
|
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -103,10 +100,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
@NonNull private final AccessibilityManager mAccessibilityManager;
|
@NonNull private final AccessibilityManager mAccessibilityManager;
|
||||||
@NonNull private final ConfigurationController mConfigurationController;
|
@NonNull private final ConfigurationController mConfigurationController;
|
||||||
@NonNull private final DelayableExecutor mExecutor;
|
@NonNull private final DelayableExecutor mExecutor;
|
||||||
@NonNull private final LayoutInflater mLayoutInflater;
|
|
||||||
private boolean mUdfpsEnrolled;
|
private boolean mUdfpsEnrolled;
|
||||||
|
|
||||||
@Nullable private LottieAnimationView mAodFp;
|
|
||||||
@NonNull private final AnimatedStateListDrawable mIcon;
|
@NonNull private final AnimatedStateListDrawable mIcon;
|
||||||
|
|
||||||
@NonNull private CharSequence mUnlockedLabel;
|
@NonNull private CharSequence mUnlockedLabel;
|
||||||
@@ -141,7 +136,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
|
|
||||||
// for udfps when strong auth is required or unlocked on AOD
|
// for udfps when strong auth is required or unlocked on AOD
|
||||||
private boolean mShowAodLockIcon;
|
private boolean mShowAodLockIcon;
|
||||||
private boolean mShowAODFpIcon;
|
private boolean mShowAodUnlockedIcon;
|
||||||
private final int mMaxBurnInOffsetX;
|
private final int mMaxBurnInOffsetX;
|
||||||
private final int mMaxBurnInOffsetY;
|
private final int mMaxBurnInOffsetY;
|
||||||
private float mInterpolatedDarkAmount;
|
private float mInterpolatedDarkAmount;
|
||||||
@@ -164,8 +159,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
@NonNull @Main DelayableExecutor executor,
|
@NonNull @Main DelayableExecutor executor,
|
||||||
@Nullable Vibrator vibrator,
|
@Nullable Vibrator vibrator,
|
||||||
@Nullable AuthRippleController authRippleController,
|
@Nullable AuthRippleController authRippleController,
|
||||||
@NonNull @Main Resources resources,
|
@NonNull @Main Resources resources
|
||||||
@NonNull LayoutInflater inflater
|
|
||||||
) {
|
) {
|
||||||
super(view);
|
super(view);
|
||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
@@ -179,7 +173,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
mExecutor = executor;
|
mExecutor = executor;
|
||||||
mVibrator = vibrator;
|
mVibrator = vibrator;
|
||||||
mAuthRippleController = authRippleController;
|
mAuthRippleController = authRippleController;
|
||||||
mLayoutInflater = inflater;
|
|
||||||
|
|
||||||
mMaxBurnInOffsetX = resources.getDimensionPixelSize(R.dimen.udfps_burn_in_offset_x);
|
mMaxBurnInOffsetX = resources.getDimensionPixelSize(R.dimen.udfps_burn_in_offset_x);
|
||||||
mMaxBurnInOffsetY = resources.getDimensionPixelSize(R.dimen.udfps_burn_in_offset_y);
|
mMaxBurnInOffsetY = resources.getDimensionPixelSize(R.dimen.udfps_burn_in_offset_y);
|
||||||
@@ -261,11 +254,12 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean wasShowingUnlock = mShowUnlockIcon;
|
boolean wasShowingUnlock = mShowUnlockIcon;
|
||||||
boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon;
|
boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
|
||||||
|
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
|
||||||
mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
|
mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
|
||||||
&& (!mUdfpsEnrolled || !mRunningFPS);
|
&& (!mUdfpsEnrolled || !mRunningFPS);
|
||||||
mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen();
|
mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen();
|
||||||
mShowAODFpIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
|
mShowAodUnlockedIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
|
||||||
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
|
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
|
||||||
|
|
||||||
final CharSequence prevContentDescription = mView.getContentDescription();
|
final CharSequence prevContentDescription = mView.getContentDescription();
|
||||||
@@ -282,14 +276,9 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
mView.updateIcon(ICON_UNLOCK, false);
|
mView.updateIcon(ICON_UNLOCK, false);
|
||||||
mView.setContentDescription(mUnlockedLabel);
|
mView.setContentDescription(mUnlockedLabel);
|
||||||
mView.setVisibility(View.VISIBLE);
|
mView.setVisibility(View.VISIBLE);
|
||||||
} else if (mShowAODFpIcon) {
|
} else if (mShowAodUnlockedIcon) {
|
||||||
// AOD fp icon is special cased as a lottie view (it updates for each burn-in offset),
|
mView.updateIcon(ICON_UNLOCK, true);
|
||||||
// this state shows a transparent view
|
mView.setContentDescription(mUnlockedLabel);
|
||||||
mView.setContentDescription(null);
|
|
||||||
mAodFp.setVisibility(View.VISIBLE);
|
|
||||||
mAodFp.setContentDescription(mCanDismissLockScreen ? mUnlockedLabel : mLockedLabel);
|
|
||||||
|
|
||||||
mView.updateIcon(ICON_FINGERPRINT, true); // this shows no icon
|
|
||||||
mView.setVisibility(View.VISIBLE);
|
mView.setVisibility(View.VISIBLE);
|
||||||
} else if (mShowAodLockIcon) {
|
} else if (mShowAodLockIcon) {
|
||||||
if (wasShowingUnlock) {
|
if (wasShowingUnlock) {
|
||||||
@@ -305,11 +294,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
mView.setContentDescription(null);
|
mView.setContentDescription(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mShowAODFpIcon && mAodFp != null) {
|
|
||||||
mAodFp.setVisibility(View.INVISIBLE);
|
|
||||||
mAodFp.setContentDescription(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Objects.equals(prevContentDescription, mView.getContentDescription())
|
if (!Objects.equals(prevContentDescription, mView.getContentDescription())
|
||||||
&& mView.getContentDescription() != null) {
|
&& mView.getContentDescription() != null) {
|
||||||
mView.announceForAccessibility(mView.getContentDescription());
|
mView.announceForAccessibility(mView.getContentDescription());
|
||||||
@@ -397,7 +381,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
pw.println();
|
pw.println();
|
||||||
pw.println(" mShowUnlockIcon: " + mShowUnlockIcon);
|
pw.println(" mShowUnlockIcon: " + mShowUnlockIcon);
|
||||||
pw.println(" mShowLockIcon: " + mShowLockIcon);
|
pw.println(" mShowLockIcon: " + mShowLockIcon);
|
||||||
pw.println(" mShowAODFpIcon: " + mShowAODFpIcon);
|
pw.println(" mShowAodUnlockedIcon: " + mShowAodUnlockedIcon);
|
||||||
pw.println(" mIsDozing: " + mIsDozing);
|
pw.println(" mIsDozing: " + mIsDozing);
|
||||||
pw.println(" mIsBouncerShowing: " + mIsBouncerShowing);
|
pw.println(" mIsBouncerShowing: " + mIsBouncerShowing);
|
||||||
pw.println(" mUserUnlockedWithBiometric: " + mUserUnlockedWithBiometric);
|
pw.println(" mUserUnlockedWithBiometric: " + mUserUnlockedWithBiometric);
|
||||||
@@ -426,13 +410,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
- mMaxBurnInOffsetY, mInterpolatedDarkAmount);
|
- mMaxBurnInOffsetY, mInterpolatedDarkAmount);
|
||||||
float progress = MathUtils.lerp(0f, getBurnInProgressOffset(), mInterpolatedDarkAmount);
|
float progress = MathUtils.lerp(0f, getBurnInProgressOffset(), mInterpolatedDarkAmount);
|
||||||
|
|
||||||
if (mAodFp != null) {
|
|
||||||
mAodFp.setTranslationX(offsetX);
|
|
||||||
mAodFp.setTranslationY(offsetY);
|
|
||||||
mAodFp.setProgress(progress);
|
|
||||||
mAodFp.setAlpha(255 * mInterpolatedDarkAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
mView.setTranslationX(offsetX);
|
mView.setTranslationX(offsetX);
|
||||||
mView.setTranslationY(offsetY);
|
mView.setTranslationY(offsetY);
|
||||||
}
|
}
|
||||||
@@ -445,10 +422,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
mView.setUseBackground(mUdfpsSupported);
|
mView.setUseBackground(mUdfpsSupported);
|
||||||
|
|
||||||
mUdfpsEnrolled = mKeyguardUpdateMonitor.isUdfpsEnrolled();
|
mUdfpsEnrolled = mKeyguardUpdateMonitor.isUdfpsEnrolled();
|
||||||
if (!wasUdfpsEnrolled && mUdfpsEnrolled && mAodFp == null) {
|
|
||||||
mLayoutInflater.inflate(R.layout.udfps_aod_lock_icon, mView);
|
|
||||||
mAodFp = mView.findViewById(R.id.lock_udfps_aod_fp);
|
|
||||||
}
|
|
||||||
if (wasUdfpsSupported != mUdfpsSupported || wasUdfpsEnrolled != mUdfpsEnrolled) {
|
if (wasUdfpsSupported != mUdfpsSupported || wasUdfpsEnrolled != mUdfpsEnrolled) {
|
||||||
updateVisibility();
|
updateVisibility();
|
||||||
}
|
}
|
||||||
@@ -712,8 +685,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
|
|
||||||
private boolean inLockIconArea(MotionEvent event) {
|
private boolean inLockIconArea(MotionEvent event) {
|
||||||
return mSensorTouchLocation.contains((int) event.getX(), (int) event.getY())
|
return mSensorTouchLocation.contains((int) event.getX(), (int) event.getY())
|
||||||
&& (mView.getVisibility() == View.VISIBLE
|
&& mView.getVisibility() == View.VISIBLE;
|
||||||
|| (mAodFp != null && mAodFp.getVisibility() == View.VISIBLE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isActionable() {
|
private boolean isActionable() {
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.any;
|
|||||||
import static org.mockito.Mockito.anyBoolean;
|
import static org.mockito.Mockito.anyBoolean;
|
||||||
import static org.mockito.Mockito.anyInt;
|
import static org.mockito.Mockito.anyInt;
|
||||||
import static org.mockito.Mockito.eq;
|
import static org.mockito.Mockito.eq;
|
||||||
import static org.mockito.Mockito.never;
|
|
||||||
import static org.mockito.Mockito.reset;
|
import static org.mockito.Mockito.reset;
|
||||||
import static org.mockito.Mockito.verify;
|
import static org.mockito.Mockito.verify;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
@@ -43,7 +42,6 @@ import android.os.Vibrator;
|
|||||||
import android.testing.AndroidTestingRunner;
|
import android.testing.AndroidTestingRunner;
|
||||||
import android.testing.TestableLooper;
|
import android.testing.TestableLooper;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.accessibility.AccessibilityManager;
|
import android.view.accessibility.AccessibilityManager;
|
||||||
@@ -69,8 +67,6 @@ import com.android.systemui.statusbar.policy.KeyguardStateController;
|
|||||||
import com.android.systemui.util.concurrency.FakeExecutor;
|
import com.android.systemui.util.concurrency.FakeExecutor;
|
||||||
import com.android.systemui.util.time.FakeSystemClock;
|
import com.android.systemui.util.time.FakeSystemClock;
|
||||||
|
|
||||||
import com.airbnb.lottie.LottieAnimationView;
|
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -110,8 +106,6 @@ public class LockIconViewControllerTest extends SysuiTestCase {
|
|||||||
private @Mock ConfigurationController mConfigurationController;
|
private @Mock ConfigurationController mConfigurationController;
|
||||||
private @Mock Vibrator mVibrator;
|
private @Mock Vibrator mVibrator;
|
||||||
private @Mock AuthRippleController mAuthRippleController;
|
private @Mock AuthRippleController mAuthRippleController;
|
||||||
private @Mock LottieAnimationView mAodFp;
|
|
||||||
private @Mock LayoutInflater mLayoutInflater;
|
|
||||||
private FakeExecutor mDelayableExecutor = new FakeExecutor(new FakeSystemClock());
|
private FakeExecutor mDelayableExecutor = new FakeExecutor(new FakeSystemClock());
|
||||||
|
|
||||||
private LockIconViewController mLockIconViewController;
|
private LockIconViewController mLockIconViewController;
|
||||||
@@ -149,7 +143,6 @@ public class LockIconViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
when(mLockIconView.getResources()).thenReturn(mResources);
|
when(mLockIconView.getResources()).thenReturn(mResources);
|
||||||
when(mLockIconView.getContext()).thenReturn(mContext);
|
when(mLockIconView.getContext()).thenReturn(mContext);
|
||||||
when(mLockIconView.findViewById(R.layout.udfps_aod_lock_icon)).thenReturn(mAodFp);
|
|
||||||
when(mContext.getResources()).thenReturn(mResources);
|
when(mContext.getResources()).thenReturn(mResources);
|
||||||
when(mContext.getSystemService(WindowManager.class)).thenReturn(mWindowManager);
|
when(mContext.getSystemService(WindowManager.class)).thenReturn(mWindowManager);
|
||||||
Rect windowBounds = new Rect(0, 0, 800, 1200);
|
Rect windowBounds = new Rect(0, 0, 800, 1200);
|
||||||
@@ -176,8 +169,7 @@ public class LockIconViewControllerTest extends SysuiTestCase {
|
|||||||
mDelayableExecutor,
|
mDelayableExecutor,
|
||||||
mVibrator,
|
mVibrator,
|
||||||
mAuthRippleController,
|
mAuthRippleController,
|
||||||
mResources,
|
mResources
|
||||||
mLayoutInflater
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,35 +178,6 @@ public class LockIconViewControllerTest extends SysuiTestCase {
|
|||||||
mStaticMockSession.finishMocking();
|
mStaticMockSession.finishMocking();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testIgnoreUdfpsWhenNotSupported() {
|
|
||||||
// GIVEN Udpfs sensor is NOT available
|
|
||||||
mLockIconViewController.init();
|
|
||||||
captureAttachListener();
|
|
||||||
|
|
||||||
// WHEN the view is attached
|
|
||||||
mAttachListener.onViewAttachedToWindow(mLockIconView);
|
|
||||||
|
|
||||||
// THEN lottie animation should NOT be inflated
|
|
||||||
verify(mLayoutInflater, never()).inflate(eq(R.layout.udfps_aod_lock_icon), any());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testInflateUdfpsWhenSupported() {
|
|
||||||
// GIVEN Udpfs sensor is available
|
|
||||||
setupUdfps();
|
|
||||||
when(mKeyguardUpdateMonitor.isUdfpsEnrolled()).thenReturn(true);
|
|
||||||
|
|
||||||
mLockIconViewController.init();
|
|
||||||
captureAttachListener();
|
|
||||||
|
|
||||||
// WHEN the view is attached
|
|
||||||
mAttachListener.onViewAttachedToWindow(mLockIconView);
|
|
||||||
|
|
||||||
// THEN lottie animation should be inflated
|
|
||||||
verify(mLayoutInflater).inflate(eq(R.layout.udfps_aod_lock_icon), any());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateFingerprintLocationOnInit() {
|
public void testUpdateFingerprintLocationOnInit() {
|
||||||
// GIVEN fp sensor location is available pre-attached
|
// GIVEN fp sensor location is available pre-attached
|
||||||
|
|||||||
Reference in New Issue
Block a user