diff options
author | Brian Colonna <bcolonna@google.com> | 2012-01-09 16:22:12 -0500 |
---|---|---|
committer | Brian Colonna <bcolonna@google.com> | 2012-01-09 16:22:12 -0500 |
commit | 7664c0e99d2ee70ad714b904a166b17ac7efdf9f (patch) | |
tree | 1d384e6c64435e185a7ba34ccfbe46e07a5d440c /core | |
parent | 7944704e6c4cc10105838b78d3d8403bf66a066b (diff) | |
download | frameworks_base-7664c0e99d2ee70ad714b904a166b17ac7efdf9f.zip frameworks_base-7664c0e99d2ee70ad714b904a166b17ac7efdf9f.tar.gz frameworks_base-7664c0e99d2ee70ad714b904a166b17ac7efdf9f.tar.bz2 |
DO NOT MERGE cherry-picked FU framework tablet commits
- cherry-picking framework CLs from master into ics-mr1 that are
needed for FU to work on tablets
- needed for OEM partners even FU isn't going on xoom
Squashed commit of the following:
commit 3258f2528f558efdaf34ae15c5425f2d879848fe
Author: Brian Colonna <bcolonna@google.com>
Date: Tue Dec 13 15:49:48 2011 -0500
Added Face Unlock to tablet lockscreen layouts
The Face Unlock Area was not part of the tablet layouts, so prior to
this change, Face Unlock would not show up on tablets when selected as
the unlock method. The backup unlock method would show up instead.
The goal here is for the pattern and PIN unlock layouts (in both
portrait and landscape mode) to look the same as before this change.
This was a little harder than it was with the phone layouts for two
reasons:
1) For the phones it was ok for Face Unlock to be sized such that it
just covers the backup method. For the tablets we want Face Unlock
to cover far more real estate.
2) The phones were based on a grid layout, whereas the tablet is a
linear layout.
Note that the diff makes the modifications look way more extensive
than they actually are. Basically, in most cases I am putting a
relative layout around some existing portion of the layout and
putting the Face Unlock Area area inside of the new relative layout.
Change-Id: I478becddf2a9ee9fe7b6d653e604fa3ad89b822f
commit 821cfe85cf2b3daf074d9749dbf6e0a5663af0de
Author: Brian Colonna <bcolonna@google.com>
Date: Mon Dec 19 15:51:10 2011 -0500
Unbinding from FU when going to backup
Lockscreen was stopping Face Unlock when going to the backup lock, but
not unbinding from the Face Unlock service until the device was
unlocked.
This caused a bug on the tablets where Face Unlock would reappear when
switching between portait and landscape orientations, even after the
backup lock was exposed. On an orientation change, Face Unlock is
restarted if the service is bound to during the orientation change.
Since it was bound to when it should not have been, Face Unlock was
restarting when it should not have been.
The wakelock is also now being poked on an orientation change because
on the tablet you can keep Face Unlock alive by switching the
orientation back and forth, but eventually the screen would go dark
with Face Unlock running.
Also, a conditional was moved in activateFaceLockIfAble() so the whole
section isn't executed if Face Unlock is not in use. Part of it was
being executed with only the inner-most part having the check. This
did not cause any issues that I am aware of.
Change-Id: Ib452b8ced28a507bf9272dbf5d3477a8abd1ba90
commit fa90bb76ac6b311d12b55d23df4ac44cec62c7b3
Author: Brian Colonna <bcolonna@google.com>
Date: Mon Dec 12 18:02:23 2011 -0500
Changed how Face Unlock coordinates are specified
Was using View.getLeft() and View.getTop() to specify the upper-left
corner of the Face Unlock area. That gives coordinates relative the
view, which was fine for the phones. For the tablet it needs
coordinates relative to the window (which still works for the phones).
Also fixed a 'bug' where h and w were swapped. However, it wasn't
causing a problem because it was swapped in two places.
Change-Id: I86c1f68439f1dcef826cfe6b8fb56c9a4a6b8dc3
Change-Id: I962c0486be85949e002b0a2701286a6a39251f36
Diffstat (limited to 'core')
4 files changed, 203 insertions, 140 deletions
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml index 7a5bb6a..568933c 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml @@ -63,7 +63,7 @@ </RelativeLayout> <!-- right side: password --> - <LinearLayout + <RelativeLayout android:layout_width="0dip" android:layout_weight="1" android:layout_height="match_parent" @@ -72,6 +72,7 @@ <LinearLayout android:orientation="vertical" + android:layout_centerInParent="true" android:layout_width="330dip" android:layout_height="wrap_content"> @@ -152,6 +153,15 @@ </LinearLayout> - </LinearLayout> + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> + + </RelativeLayout> </LinearLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml index 6df22ca..335a641 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml @@ -61,92 +61,109 @@ </RelativeLayout> <!-- bottom: password --> - <LinearLayout + <RelativeLayout android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" - android:orientation="vertical" android:gravity="center"> - <!-- Password entry field --> <LinearLayout - android:orientation="horizontal" - android:layout_width="330dip" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:layout_marginTop="120dip" - android:layout_marginBottom="5dip" - android:background="@drawable/lockscreen_password_field_dark"> + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_centerInParent="true" + android:orientation="vertical" + android:gravity="center"> - <EditText android:id="@+id/passwordEntry" + <!-- Password entry field --> + <LinearLayout + android:orientation="horizontal" + android:layout_width="330dip" android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:singleLine="true" - android:textStyle="normal" - android:inputType="textPassword" - android:gravity="center" android:layout_gravity="center" - android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" - android:textSize="24sp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@null" - android:textColor="#ffffffff" - android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" + android:layout_marginTop="120dip" + android:layout_marginBottom="5dip" + android:background="@drawable/lockscreen_password_field_dark"> + + <EditText android:id="@+id/passwordEntry" + android:layout_height="wrap_content" + android:layout_width="0dip" + android:layout_weight="1" + android:singleLine="true" + android:textStyle="normal" + android:inputType="textPassword" + android:gravity="center" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" + android:textSize="24sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:background="@null" + android:textColor="#ffffffff" + android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" /> - <!-- This delete button is only visible for numeric PIN entry --> - <ImageButton android:id="@+id/pinDel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@android:drawable/ic_input_delete" - android:clickable="true" - android:padding="8dip" - android:layout_gravity="center" - android:background="?android:attr/selectableItemBackground" - android:visibility="gone" + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" /> - <ImageView android:id="@+id/switch_ime_button" + <ImageView android:id="@+id/switch_ime_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_lockscreen_ime" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1" + /> + + <!-- Numeric keyboard --> + <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" + android:layout_width="330dip" + android:layout_height="260dip" + android:background="#40000000" + android:keyBackground="@drawable/btn_keyboard_key_ics" + android:layout_marginBottom="80dip" + android:clickable="true" + /> + + <!-- emergency call button --> + <Button android:id="@+id/emergencyCallButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/ic_lockscreen_ime" - android:clickable="true" - android:padding="8dip" - android:layout_gravity="center" - android:background="?android:attr/selectableItemBackground" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" android:visibility="gone" - /> + style="@style/Widget.Button.Transparent" + /> </LinearLayout> - <View - android:layout_width="match_parent" - android:layout_height="0dip" - android:layout_weight="1" - /> - - <!-- Numeric keyboard --> - <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" - android:layout_width="330dip" - android:layout_height="260dip" - android:background="#40000000" - android:keyBackground="@drawable/btn_keyboard_key_ics" - android:layout_marginBottom="80dip" - android:clickable="true" + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" /> - <!-- emergency call button --> - <Button - android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - style="@style/Widget.Button.Transparent" - /> + </RelativeLayout> - </LinearLayout> </LinearLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml index 70d18cc..802ef82 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml @@ -72,48 +72,65 @@ android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal"> - <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" - android:layout_width="354dip" - android:layout_height="354dip" - android:layout_gravity="center_vertical" - /> - - <!-- Emergency and forgot pattern buttons. --> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/lockPattern" - android:layout_alignLeft="@id/lockPattern" - android:layout_alignRight="@id/lockPattern" - android:layout_marginTop="28dip" - android:gravity="center" - style="?android:attr/buttonBarStyle" - android:weightSum="2"> - - <Button android:id="@+id/forgotPatternButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/lockscreen_forgot_password_button" - android:drawablePadding="8dip" - android:text="@string/lockscreen_forgot_pattern_button_text" - android:visibility="gone" + android:layout_centerInParent="true" + android:gravity="center_vertical|center_horizontal"> + + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="354dip" + android:layout_height="354dip" + android:layout_gravity="center_vertical" /> - <Button android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" + <!-- Emergency and forgot pattern buttons. --> + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - /> + android:orientation="horizontal" + android:layout_below="@id/lockPattern" + android:layout_alignLeft="@id/lockPattern" + android:layout_alignRight="@id/lockPattern" + android:layout_marginTop="28dip" + style="?android:attr/buttonBarStyle" + android:gravity="center" + android:weightSum="2"> + + <Button android:id="@+id/forgotPatternButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/lockscreen_forgot_password_button" + android:drawablePadding="8dip" + android:text="@string/lockscreen_forgot_pattern_button_text" + android:visibility="gone" + /> - </LinearLayout> + <Button android:id="@+id/emergencyCallButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" + android:visibility="gone" + /> + + </LinearLayout> + + </RelativeLayout> + + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> </RelativeLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml index 7a623ce..40f2492 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml @@ -62,52 +62,71 @@ </RelativeLayout> <!-- bottom: lock pattern, emergency dialer and forgot pattern button --> - <LinearLayout + <RelativeLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dip" - android:orientation="vertical" android:gravity="center"> - <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" - android:layout_width="354dip" - android:layout_height="354dip" - android:layout_marginTop="50dip"/> - - <!-- Emergency and forgot pattern buttons. --> - <LinearLayout - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - style="?android:attr/buttonBarStyle" - android:gravity="center" - android:weightSum="2"> + android:layout_centerInParent="true" + android:gravity="center"> - <Button android:id="@+id/forgotPatternButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/lockscreen_forgot_password_button" - android:drawablePadding="8dip" - android:text="@string/lockscreen_forgot_pattern_button_text" - android:visibility="gone" + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="354dip" + android:layout_height="354dip" + android:layout_marginTop="50dip" /> - <Button android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" + <!-- Emergency and forgot pattern buttons. --> + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - /> + android:orientation="horizontal" + android:layout_below="@id/lockPattern" + android:layout_alignLeft="@id/lockPattern" + android:layout_alignRight="@id/lockPattern" + style="?android:attr/buttonBarStyle" + android:gravity="center" + android:weightSum="2"> + + <Button android:id="@+id/forgotPatternButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/lockscreen_forgot_password_button" + android:drawablePadding="8dip" + android:text="@string/lockscreen_forgot_pattern_button_text" + android:visibility="gone" + /> - </LinearLayout> + <Button android:id="@+id/emergencyCallButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" + android:visibility="gone" + /> - </LinearLayout> + </LinearLayout> -</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> + </RelativeLayout> + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> + + </RelativeLayout> + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> |