summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Demeulenaere <jdemeulenaere@google.com>2022-04-13 11:33:24 +0200
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-05 02:47:30 +0000
commit6fbda8c7bced6fd3756c13c47f9df0855166d9f2 (patch)
treed82a4c5a65f5fcbfda1fbcaed4d43c7decefe92c
parentd99d07a1304d2ea9fc225aa41d189aa44eca571c (diff)
downloadbase-6fbda8c7bced6fd3756c13c47f9df0855166d9f2.tar.gz
Fix keyguard dismiss animation with occludable activities.
See b/203044476#comment27 for before/after videos. Test: Manual Bug: 203044476 Change-Id: Ie80187a5ca9b61b8178bbe977bf252db654d9fa4 Merged-In: Ie80187a5ca9b61b8178bbe977bf252db654d9fa4 (cherry picked from commit 07d87012c17752ff949968be7d31b6fb0998ce36) Merged-In: Ie80187a5ca9b61b8178bbe977bf252db654d9fa4
-rw-r--r--packages/SystemUI/res/drawable/keyguard_bottom_affordance_bg.xml22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java6
2 files changed, 14 insertions, 14 deletions
diff --git a/packages/SystemUI/res/drawable/keyguard_bottom_affordance_bg.xml b/packages/SystemUI/res/drawable/keyguard_bottom_affordance_bg.xml
index 3a08a7111d9a..41123c84ded1 100644
--- a/packages/SystemUI/res/drawable/keyguard_bottom_affordance_bg.xml
+++ b/packages/SystemUI/res/drawable/keyguard_bottom_affordance_bg.xml
@@ -16,19 +16,13 @@
* limitations under the License.
*/
-->
-<ripple
+<shape
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:color="?android:attr/textColorPrimary">
- <item>
- <shape
- android:shape="rectangle">
- <solid android:color="?androidprv:attr/colorSurface"/>
- <size
- android:width="@dimen/keyguard_affordance_width"
- android:height="@dimen/keyguard_affordance_height"/>
- <corners android:radius="@dimen/keyguard_affordance_fixed_radius"/>
- </shape>
- </item>
-</ripple>
-
+ android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorSurface"/>
+ <size
+ android:width="@dimen/keyguard_affordance_width"
+ android:height="@dimen/keyguard_affordance_height"/>
+ <corners android:radius="@dimen/keyguard_affordance_fixed_radius"/>
+</shape>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 81c731f8074c..450d0d3849d4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -2494,6 +2494,12 @@ public class CentralSurfacesImpl extends CoreStartable implements
animate, intent.getPackage(), (adapter) -> {
ActivityOptions options = new ActivityOptions(
CentralSurfaces.getActivityOptions(mDisplayId, adapter));
+
+ // We know that the intent of the caller is to dismiss the keyguard and
+ // this runnable is called right after the keyguard is solved, so we tell
+ // WM that we should dismiss it to avoid flickers when opening an activity
+ // that can also be shown over the keyguard.
+ options.setDismissKeyguard();
options.setDisallowEnterPictureInPictureWhileLaunching(
disallowEnterPictureInPictureWhileLaunching);
if (CameraIntents.isInsecureCameraIntent(intent)) {