Jim Miller c120b6e99a Fix "keyguard unresponsive" bug
This fixes a bug where the code would pop up SearchPanelView and never
close it.  The result is that the overlapping window would absorb all input
events and effectively prevent the user from entering their pin/pattern/password.

The fix is to replace ImageView with KeyButtonView to make the behavior consistent
with how it's handle in home screen.

Fixes bug 7520075

Change-Id: I461bf2844c023fd7a2dffca1177cc5951f30dba0
2012-11-12 17:54:22 -08:00

316 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
-->
<!-- navigation bar for sw600dp (small tablets) -->
<com.android.systemui.statusbar.phone.NavigationBarView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="#FF000000"
>
<FrameLayout android:id="@+id/rot0"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
android:clipChildren="false"
android:clipToPadding="false"
android:id="@+id/nav_buttons"
android:animateLayoutChanges="true"
>
<!-- navigation controls -->
<View
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:layout_marginLeft="2dp"
android:visibility="invisible"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_back"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_home"
systemui:keyCode="3"
systemui:keyRepeat="true"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_home"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_recent"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
android:layout_width="48dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_menu"
android:layout_marginRight="2dp"
systemui:keyCode="82"
android:layout_weight="0"
android:visibility="invisible"
android:contentDescription="@string/accessibility_menu"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
/>
</LinearLayout>
<!-- lights out layout to match exactly -->
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
android:id="@+id/lights_out"
android:visibility="gone"
>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<ImageView
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center"
android:layout_weight="0"
/>
<ImageView
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_large"
android:scaleType="center"
android:layout_weight="0"
/>
<ImageView
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_marginRight="40dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center"
android:layout_weight="0"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView
android:layout_width="128dp"
android:id="@+id/search_light"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:src="@drawable/search_light"
android:scaleType="center"
android:visibility="gone"
/>
<com.android.systemui.statusbar.policy.DeadZone
android:id="@+id/deadzone"
android:layout_height="match_parent"
android:layout_width="match_parent"
systemui:minSize="@dimen/navigation_bar_deadzone_size"
systemui:maxSize="@dimen/navigation_bar_deadzone_size_max"
systemui:holdTime="@integer/navigation_bar_deadzone_hold"
systemui:decayTime="@integer/navigation_bar_deadzone_decay"
systemui:orientation="horizontal"
android:layout_gravity="top"
/>
</FrameLayout>
<FrameLayout android:id="@+id/rot90"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
android:paddingTop="0dp"
>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
android:clipChildren="false"
android:clipToPadding="false"
android:id="@+id/nav_buttons"
android:animateLayoutChanges="true"
>
<!-- navigation controls -->
<View
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:layout_marginLeft="2dp"
android:visibility="invisible"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_back"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_home"
systemui:keyCode="3"
systemui:keyRepeat="true"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_home"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_recent"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_marginRight="2dp"
android:src="@drawable/ic_sysbar_menu"
systemui:keyCode="82"
android:layout_weight="0"
android:visibility="invisible"
android:contentDescription="@string/accessibility_menu"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
/>
</LinearLayout>
<!-- lights out layout to match exactly -->
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
android:id="@+id/lights_out"
android:visibility="gone"
>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<ImageView
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center"
android:layout_weight="0"
/>
<ImageView
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_large"
android:scaleType="center"
android:layout_weight="0"
/>
<ImageView
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_marginRight="40dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center"
android:layout_weight="0"
/>
<Space
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView
android:layout_width="162dp"
android:id="@+id/search_light"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:src="@drawable/search_light"
android:scaleType="center"
android:visibility="gone"
/>
<com.android.systemui.statusbar.policy.DeadZone
android:id="@+id/deadzone"
android:layout_height="match_parent"
android:layout_width="match_parent"
systemui:minSize="@dimen/navigation_bar_deadzone_size"
systemui:maxSize="@dimen/navigation_bar_deadzone_size_max"
systemui:holdTime="@integer/navigation_bar_deadzone_hold"
systemui:decayTime="@integer/navigation_bar_deadzone_decay"
systemui:orientation="vertical"
android:layout_gravity="top"
/>
</FrameLayout>
<!-- not used -->
<View android:id="@+id/rot270"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
/>
</com.android.systemui.statusbar.phone.NavigationBarView>