From 9d20405e5117f05dfd3049798cd36a74142a6822 Mon Sep 17 00:00:00 2001 From: Brian Colonna Date: Tue, 18 Oct 2011 16:27:34 -0400 Subject: [PATCH] Fix 5433466 - FU out of position during orientation change If you turn the device from portrait to landscape mode and immediately invoke the lockscreen, it will come up in landscape mode and switch to the desired portrait mode within a couple of seconds. Previously, Face Unlock would come up in landscape mode, but its position would not change once lockscreen corrected itself, causing Face Unlock to be partly off the screen. This has been fixed by checking if we are already bound to Face Unlock when the layout is created. If this is true, then the layout is being created due to a change in orientation, and we stop Face Unlock, and restart it at the new position. This commit also adds a fix where we now use INVISIBLE for the Face Unlock area when it is not showing instead of using GONE. The dimensions of the Face Unlock area is 0-by-0 when set to GONE, and we want to avoid the possibility for the Face Unlock service being assigned a zero area. I'm not sure if this was ever causing problems, but it certainly is not the intended behavior. Also cleaned up some comments and logging. Change-Id: I68deb49cb26dafb5c238167d0c23f0eed2cfb75a --- .../keyguard_screen_password_landscape.xml | 2 +- .../keyguard_screen_password_portrait.xml | 2 +- .../keyguard_screen_unlock_landscape.xml | 2 +- .../keyguard_screen_unlock_portrait.xml | 2 +- .../policy/impl/LockPatternKeyguardView.java | 37 +++++++++++++------ 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/core/res/res/layout/keyguard_screen_password_landscape.xml b/core/res/res/layout/keyguard_screen_password_landscape.xml index e34822d2f7c7b..803047e16674f 100644 --- a/core/res/res/layout/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout/keyguard_screen_password_landscape.xml @@ -206,7 +206,7 @@