summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
diff options
context:
space:
mode:
authorJamie Garside <jgarside@google.com>2021-03-19 16:15:48 +0000
committerJamie Garside <jgarside@google.com>2021-03-24 10:39:14 +0000
commitcaf8a9bfe446d3ed7cfa8e368ad68ba5c31c8693 (patch)
treee83e053df9b4aa2ba44851088c4304d13e788302 /packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
parentb99a0bc491de62de4fefdb59b7fd62bff8c97fe6 (diff)
Ensure bouncer in correct position on swipe. Remove orientationlistener.
This adds a hook to onLayout to move the bouncer to the correct screen side on large format devices. KeyguardBouncer already calls updateLayoutForSecurityMode() when the security mode is created, but this can happen before the bouncer has actually been attached to the screen (hence width = 0, so the bouncer gets left-aligned). It's also done in onResume(), but this is only called when the bouncer is at the correct place after swipe (hence causing the "jump" when swiping up). Also, removes orientationlistener from KeyguardBouncer, and replaces it with a proxied "updateResources" call. I messed up; I thought that orientationlistener worked like deviceorientationlistener, which notifies on screen rotation. Instead, it notifies on _every_ angle change, which would have led to a lot of layout passes as it'd update the bouncer gravity whenever the device moved. Oops. Test: atest SystemUITests: com.android.keyguard.KeyguardSecurityContainerControllerTest Bug: 177303121 Change-Id: I6d68e553c3114e043bcc126ba7b6910f98ce6694
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
index 72dd72eb1676..02a8958ef657 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
@@ -487,5 +487,9 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>
mView.setLayoutParams(lp);
}
}
+
+ if (mKeyguardSecurityContainerController != null) {
+ mKeyguardSecurityContainerController.updateResources();
+ }
}
}