Skip to content
Commit caf8a9bf authored by Jamie Garside's avatar Jamie Garside
Browse files

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
parent b99a0bc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment