From 8304b95fade5f99c26db3cbbe30cc84dc6906b2d Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 11 May 2021 21:39:20 +0200 Subject: Implemented Lockscreen to shade transition When dragging down on the lockscreen, we now pull down the quick settings while dragging instead of wating for the release Bug: 184946919 Test: atest SystemUITests Change-Id: Ib233282dd7ce4ba63ceab3e1b788aa164e88c8c0 --- .../SystemUI/src/com/android/keyguard/LockIconViewController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java') diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index b367bdf08886..7127444befb7 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -145,7 +145,13 @@ public class LockIconViewController extends ViewController impleme final boolean hasUdfps = mAuthController.getUdfpsSensorLocation() != null; mHasUdfpsOrFaceAuthFeatures = hasFaceAuth || hasUdfps; if (!mHasUdfpsOrFaceAuthFeatures) { - ((ViewGroup) mView.getParent()).removeView(mView); + // Posting since removing a view in the middle of onAttach can lead to a crash in the + // iteration loop when the view isn't last + mView.setVisibility(View.GONE); + mView.post(() -> { + mView.setVisibility(View.VISIBLE); + ((ViewGroup) mView.getParent()).removeView(mView); + }); return; } -- cgit v1.2.3