diff options
author | Selim Cinek <cinek@google.com> | 2021-05-11 21:39:20 +0200 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2021-05-14 17:20:19 +0200 |
commit | 8304b95fade5f99c26db3cbbe30cc84dc6906b2d (patch) | |
tree | edcf02074685b05a6b1f7b9b09377dd3239cf66c /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java | |
parent | 91579bde5974a604c7e61892232a648b74a25814 (diff) |
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
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/LockIconViewController.java | 8 |
1 files changed, 7 insertions, 1 deletions
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<LockIconView> 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; } |