PIN bouncer - basic landscape support
As with Android 11, there are specific scenarios where the bouncer can
be shown in landscape position. The UX updates for Android 12 made
this completely unusable. Return the PIN bouncer to a functional
state. There is still outstanding work to fully support landscape for
keyguard.
Fixes: 185735801
Test: manual (use camera over ls, rotate, hit unlock)
Change-Id: I3090afe1534cfa2b01bd35b91e1e273858117743
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
index a957df6..02cb2bc 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
@@ -44,7 +44,7 @@
android:id="@+id/row0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="16dp"
+ android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
>
<com.android.keyguard.PasswordTextView
android:id="@+id/pinEntry"
@@ -192,7 +192,7 @@
android:orientation="vertical"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginTop="@dimen/keyguard_eca_top_margin"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
android:gravity="center_horizontal"/>
</com.android.keyguard.KeyguardPINView>
diff --git a/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml b/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml
new file mode 100644
index 0000000..eb5843b
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2021, 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.
+*/
+-->
+<resources>
+ <dimen name="num_pad_row_margin_bottom">4dp</dimen>
+ <dimen name="keyguard_eca_top_margin">4dp</dimen>
+ <dimen name="keyguard_eca_bottom_margin">4dp</dimen>
+ <dimen name="keyguard_password_height">50dp</dimen>
+ <dimen name="num_pad_entry_row_margin_bottom">4dp</dimen>
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index e8f7b35..7e3c87b 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -41,6 +41,7 @@
<dimen name="keyguard_security_view_lateral_margin">20dp</dimen>
<dimen name="keyguard_eca_top_margin">18dp</dimen>
+ <dimen name="keyguard_eca_bottom_margin">12dp</dimen>
<!-- EmergencyCarrierArea overlap - amount to overlap the emergency button and carrier text.
Should be 0 on devices with plenty of room (e.g. tablets) -->
@@ -88,6 +89,7 @@
<!-- Spacing around each button used for PIN view -->
<dimen name="num_pad_key_width">72dp</dimen>
+ <dimen name="num_pad_entry_row_margin_bottom">16dp</dimen>
<dimen name="num_pad_row_margin_bottom">6dp</dimen>
<dimen name="num_pad_key_margin_end">12dp</dimen>