Merge changes from topic "auth_credential_pin-tm-qpr-dev" into tm-qpr-dev am: c3910e2e64
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20152024 Change-Id: Idd695c3273d93af6e6fc1522291d24de2745ee41 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,45 +16,47 @@
|
||||
|
||||
<com.android.systemui.biometrics.AuthCredentialPasswordView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="@dimen/biometric_dialog_elevation">
|
||||
android:elevation="@dimen/biometric_dialog_elevation"
|
||||
android:theme="?app:attr/lockPinPasswordStyle">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/auth_credential_header"
|
||||
style="@style/AuthCredentialHeaderStyle"
|
||||
style="?headerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Icon"
|
||||
style="?headerIconStyle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Title"
|
||||
style="?titleTextAppearance"
|
||||
android:layout_below="@id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
|
||||
style="?subTitleTextAppearance"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Description"
|
||||
style="?descriptionTextAppearance"
|
||||
android:layout_below="@id/subtitle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -67,7 +69,7 @@
|
||||
|
||||
<ImeAwareEditText
|
||||
android:id="@+id/lockPassword"
|
||||
style="@style/TextAppearance.AuthCredential.PasswordEntry"
|
||||
style="?passwordTextAppearance"
|
||||
android:layout_width="208dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@@ -77,7 +79,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Error"
|
||||
style="?errorTextAppearance"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
@@ -16,91 +16,71 @@
|
||||
|
||||
<com.android.systemui.biometrics.AuthCredentialPatternView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="@dimen/biometric_dialog_elevation">
|
||||
android:elevation="@dimen/biometric_dialog_elevation"
|
||||
android:theme="?app:attr/lockPatternStyle">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/auth_credential_header"
|
||||
style="?headerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
style="?headerIconStyle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="?titleTextAppearance"
|
||||
android:layout_below="@id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.AuthCredential.Title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.AuthCredential.Subtitle"/>
|
||||
style="?subTitleTextAppearance"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.AuthCredential.Description"/>
|
||||
style="?descriptionTextAppearance"
|
||||
android:layout_below="@id/subtitle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_weight="1"
|
||||
style="?containerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="?errorTextAppearance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.AuthCredential.Error"/>
|
||||
android:layout_gravity="center_horizontal|bottom"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
style="@style/LockPatternContainerStyle">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
style="@style/LockPatternStyleBiometricPrompt"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</com.android.systemui.biometrics.AuthCredentialPatternView>
|
||||
@@ -16,43 +16,45 @@
|
||||
|
||||
<com.android.systemui.biometrics.AuthCredentialPasswordView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:elevation="@dimen/biometric_dialog_elevation"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:theme="?app:attr/lockPinPasswordStyle">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/auth_credential_header"
|
||||
style="@style/AuthCredentialHeaderStyle"
|
||||
style="?headerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Icon"
|
||||
style="?headerIconStyle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Title"
|
||||
style="?titleTextAppearance"
|
||||
android:layout_below="@id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
|
||||
style="?subTitleTextAppearance"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Description"
|
||||
style="?descriptionTextAppearance"
|
||||
android:layout_below="@id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -64,7 +66,7 @@
|
||||
|
||||
<ImeAwareEditText
|
||||
android:id="@+id/lockPassword"
|
||||
style="@style/TextAppearance.AuthCredential.PasswordEntry"
|
||||
style="?passwordTextAppearance"
|
||||
android:layout_width="208dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -74,7 +76,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Error"
|
||||
style="?errorTextAppearance"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
@@ -16,87 +16,66 @@
|
||||
|
||||
<com.android.systemui.biometrics.AuthCredentialPatternView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:elevation="@dimen/biometric_dialog_elevation">
|
||||
android:elevation="@dimen/biometric_dialog_elevation"
|
||||
android:theme="?app:attr/lockPatternStyle">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/auth_credential_header"
|
||||
style="?headerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/auth_credential_header"
|
||||
style="@style/AuthCredentialHeaderStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
style="?headerIconStyle"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@null"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="@null" />
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="?titleTextAppearance"
|
||||
android:layout_below="@id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/auth_credential_header"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="60dp">
|
||||
|
||||
<FrameLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
style="@style/LockPatternStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="@style/TextAppearance.AuthNonBioCredential.Error"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
style="?subTitleTextAppearance"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
style="?descriptionTextAppearance"
|
||||
android:layout_below="@id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/auth_credential_container"
|
||||
style="?containerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
style="?errorTextAppearance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"/>
|
||||
</FrameLayout>
|
||||
|
||||
</com.android.systemui.biometrics.AuthCredentialPatternView>
|
||||
@@ -24,7 +24,36 @@
|
||||
<item name="android:paddingEnd">24dp</item>
|
||||
<item name="android:paddingTop">48dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
<item name="android:gravity">top|center_horizontal</item>
|
||||
<item name="android:gravity">top|left</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">320dp</item>
|
||||
<item name="android:maxWidth">320dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:paddingHorizontal">60dp</item>
|
||||
<item name="android:paddingVertical">20dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">6dp</item>
|
||||
<item name="android:textSize">36dp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Subtitle">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">6dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Description">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">6dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
47
packages/SystemUI/res/values-sw600dp-land/styles.xml
Normal file
47
packages/SystemUI/res/values-sw600dp-land/styles.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 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 xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">420dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:paddingHorizontal">120dp</item>
|
||||
<item name="android:paddingVertical">40dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Subtitle">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Description">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
44
packages/SystemUI/res/values-sw600dp-port/styles.xml
Normal file
44
packages/SystemUI/res/values-sw600dp-port/styles.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 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 xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthCredentialHeaderStyle">
|
||||
<item name="android:paddingStart">120dp</item>
|
||||
<item name="android:paddingEnd">120dp</item>
|
||||
<item name="android:paddingTop">80dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
<item name="android:layout_gravity">top</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">420dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:paddingHorizontal">180dp</item>
|
||||
<item name="android:paddingVertical">80dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">24dp</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
48
packages/SystemUI/res/values-sw720dp-land/styles.xml
Normal file
48
packages/SystemUI/res/values-sw720dp-land/styles.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 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 xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">420dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:paddingHorizontal">120dp</item>
|
||||
<item name="android:paddingVertical">40dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Subtitle">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Description">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
44
packages/SystemUI/res/values-sw720dp-port/styles.xml
Normal file
44
packages/SystemUI/res/values-sw720dp-port/styles.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 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 xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthCredentialHeaderStyle">
|
||||
<item name="android:paddingStart">120dp</item>
|
||||
<item name="android:paddingEnd">120dp</item>
|
||||
<item name="android:paddingTop">80dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
<item name="android:layout_gravity">top</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">420dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:paddingHorizontal">240dp</item>
|
||||
<item name="android:paddingVertical">120dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">24dp</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -191,5 +191,18 @@
|
||||
<declare-styleable name="DelayableMarqueeTextView">
|
||||
<attr name="marqueeDelay" format="integer" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AuthCredentialView">
|
||||
<attr name="lockPatternStyle" format="reference" />
|
||||
<attr name="lockPinPasswordStyle" format="reference" />
|
||||
<attr name="containerStyle" format="reference" />
|
||||
<attr name="headerStyle" format="reference" />
|
||||
<attr name="headerIconStyle" format="reference" />
|
||||
<attr name="titleTextAppearance" format="reference" />
|
||||
<attr name="subTitleTextAppearance" format="reference" />
|
||||
<attr name="descriptionTextAppearance" format="reference" />
|
||||
<attr name="passwordTextAppearance" format="reference" />
|
||||
<attr name="errorTextAppearance" format="reference"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -195,15 +195,11 @@
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Icon">
|
||||
<item name="android:layout_width">@dimen/biometric_auth_icon_size</item>
|
||||
<item name="android:layout_height">@dimen/biometric_auth_icon_size</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Title">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">20dp</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:layout_marginTop">24dp</item>
|
||||
<item name="android:textSize">36dp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Subtitle">
|
||||
@@ -215,12 +211,10 @@
|
||||
<style name="TextAppearance.AuthNonBioCredential.Description">
|
||||
<item name="android:fontFamily">google-sans</item>
|
||||
<item name="android:layout_marginTop">20dp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AuthNonBioCredential.Error">
|
||||
<item name="android:paddingTop">6dp</item>
|
||||
<item name="android:paddingBottom">18dp</item>
|
||||
<item name="android:paddingHorizontal">24dp</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">?android:attr/colorError</item>
|
||||
@@ -239,12 +233,33 @@
|
||||
<style name="AuthCredentialHeaderStyle">
|
||||
<item name="android:paddingStart">48dp</item>
|
||||
<item name="android:paddingEnd">48dp</item>
|
||||
<item name="android:paddingTop">28dp</item>
|
||||
<item name="android:paddingBottom">20dp</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingTop">48dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
<item name="android:layout_gravity">top</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialIconStyle">
|
||||
<item name="android:layout_width">@dimen/biometric_auth_icon_size</item>
|
||||
<item name="android:layout_height">@dimen/biometric_auth_icon_size</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">420dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">200dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
<item name="android:padding">20dp</item>
|
||||
</style>
|
||||
|
||||
<style name="AuthCredentialPinPasswordContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">48dp</item>
|
||||
<item name="android:maxWidth">600dp</item>
|
||||
<item name="android:minHeight">48dp</item>
|
||||
<item name="android:minWidth">200dp</item>
|
||||
</style>
|
||||
|
||||
<style name="DeviceManagementDialogTitle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.DeviceManagementDialog.Title</item>
|
||||
@@ -282,7 +297,9 @@
|
||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
|
||||
<item name="wallpaperTextColorAccent">@color/material_dynamic_primary90</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
|
||||
<item name="*android:lockPatternStyle">@style/LockPatternViewStyle</item>
|
||||
<item name="lockPatternStyle">@style/LockPatternContainerStyle</item>
|
||||
<item name="lockPinPasswordStyle">@style/LockPinPasswordContainerStyle</item>
|
||||
<item name="passwordStyle">@style/PasswordTheme</item>
|
||||
<item name="numPadKeyStyle">@style/NumPadKey</item>
|
||||
<item name="backgroundProtectedStyle">@style/BackgroundProtectedStyle</item>
|
||||
@@ -308,27 +325,33 @@
|
||||
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPatternContainerStyle">
|
||||
<item name="android:maxHeight">400dp</item>
|
||||
<item name="android:maxWidth">420dp</item>
|
||||
<item name="android:minHeight">0dp</item>
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:paddingHorizontal">60dp</item>
|
||||
<item name="android:paddingBottom">40dp</item>
|
||||
<style name="AuthCredentialStyle">
|
||||
<item name="*android:regularColor">?android:attr/colorForeground</item>
|
||||
<item name="*android:successColor">?android:attr/colorForeground</item>
|
||||
<item name="*android:errorColor">?android:attr/colorError</item>
|
||||
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
|
||||
<item name="headerStyle">@style/AuthCredentialHeaderStyle</item>
|
||||
<item name="headerIconStyle">@style/AuthCredentialIconStyle</item>
|
||||
<item name="titleTextAppearance">@style/TextAppearance.AuthNonBioCredential.Title</item>
|
||||
<item name="subTitleTextAppearance">@style/TextAppearance.AuthNonBioCredential.Subtitle</item>
|
||||
<item name="descriptionTextAppearance">@style/TextAppearance.AuthNonBioCredential.Description</item>
|
||||
<item name="passwordTextAppearance">@style/TextAppearance.AuthCredential.PasswordEntry</item>
|
||||
<item name="errorTextAppearance">@style/TextAppearance.AuthNonBioCredential.Error</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPatternStyle">
|
||||
<style name="LockPatternViewStyle" >
|
||||
<item name="*android:regularColor">?android:attr/colorAccent</item>
|
||||
<item name="*android:successColor">?android:attr/textColorPrimary</item>
|
||||
<item name="*android:errorColor">?android:attr/colorError</item>
|
||||
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPatternStyleBiometricPrompt">
|
||||
<item name="*android:regularColor">?android:attr/colorForeground</item>
|
||||
<item name="*android:successColor">?android:attr/colorForeground</item>
|
||||
<item name="*android:errorColor">?android:attr/colorError</item>
|
||||
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
|
||||
<style name="LockPatternContainerStyle" parent="@style/AuthCredentialStyle">
|
||||
<item name="containerStyle">@style/AuthCredentialPatternContainerStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="LockPinPasswordContainerStyle" parent="@style/AuthCredentialStyle">
|
||||
<item name="containerStyle">@style/AuthCredentialPinPasswordContainerStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault">
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.content.Context;
|
||||
import android.graphics.Insets;
|
||||
import android.os.UserHandle;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
@@ -151,39 +152,52 @@ public class AuthCredentialPasswordView extends AuthCredentialView
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
|
||||
if (mAuthCredentialInput == null || mAuthCredentialHeader == null
|
||||
|| mSubtitleView == null || mPasswordField == null || mErrorView == null) {
|
||||
if (mAuthCredentialInput == null || mAuthCredentialHeader == null || mSubtitleView == null
|
||||
|| mDescriptionView == null || mPasswordField == null || mErrorView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// b/157910732 In AuthContainerView#getLayoutParams() we used to prevent jank risk when
|
||||
// resizing by IME show or hide, we used to setFitInsetsTypes `~WindowInsets.Type.ime()` to
|
||||
// LP. As a result this view needs to listen onApplyWindowInsets() and handle onLayout.
|
||||
int inputLeftBound;
|
||||
int inputTopBound;
|
||||
int headerRightBound = right;
|
||||
int headerTopBounds = top;
|
||||
final int subTitleBottom = (mSubtitleView.getVisibility() == GONE) ? mTitleView.getBottom()
|
||||
: mSubtitleView.getBottom();
|
||||
final int descBottom = (mDescriptionView.getVisibility() == GONE) ? subTitleBottom
|
||||
: mDescriptionView.getBottom();
|
||||
if (getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
|
||||
inputTopBound = (bottom - (mPasswordField.getHeight() + mErrorView.getHeight())) / 2;
|
||||
inputTopBound = (bottom - mAuthCredentialInput.getHeight()) / 2;
|
||||
inputLeftBound = (right - left) / 2;
|
||||
headerRightBound = inputLeftBound;
|
||||
headerTopBounds -= Math.min(mIconView.getBottom(), mBottomInset);
|
||||
} else {
|
||||
inputTopBound = mSubtitleView.getBottom() + (bottom - mSubtitleView.getBottom()) / 2;
|
||||
inputTopBound =
|
||||
descBottom + (bottom - descBottom - mAuthCredentialInput.getHeight()) / 2;
|
||||
inputLeftBound = (right - left - mAuthCredentialInput.getWidth()) / 2;
|
||||
}
|
||||
|
||||
mAuthCredentialHeader.layout(left, top, headerRightBound, bottom);
|
||||
if (mDescriptionView.getBottom() > mBottomInset) {
|
||||
mAuthCredentialHeader.layout(left, headerTopBounds, headerRightBound, bottom);
|
||||
}
|
||||
mAuthCredentialInput.layout(inputLeftBound, inputTopBound, right, bottom);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
final int newWidth = MeasureSpec.getSize(widthMeasureSpec);
|
||||
final int newHeight = MeasureSpec.getSize(heightMeasureSpec) - mBottomInset;
|
||||
|
||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), newHeight);
|
||||
setMeasuredDimension(newWidth, newHeight);
|
||||
|
||||
measureChildren(widthMeasureSpec,
|
||||
MeasureSpec.makeMeasureSpec(newHeight, MeasureSpec.AT_MOST));
|
||||
final int halfWidthSpec = MeasureSpec.makeMeasureSpec(getWidth() / 2,
|
||||
MeasureSpec.AT_MOST);
|
||||
final int fullHeightSpec = MeasureSpec.makeMeasureSpec(newHeight, MeasureSpec.UNSPECIFIED);
|
||||
if (getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
|
||||
measureChildren(halfWidthSpec, fullHeightSpec);
|
||||
} else {
|
||||
measureChildren(widthMeasureSpec, fullHeightSpec);
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -193,6 +207,20 @@ public class AuthCredentialPasswordView extends AuthCredentialView
|
||||
final Insets bottomInset = insets.getInsets(ime());
|
||||
if (v instanceof AuthCredentialPasswordView && mBottomInset != bottomInset.bottom) {
|
||||
mBottomInset = bottomInset.bottom;
|
||||
if (mBottomInset > 0
|
||||
&& getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
|
||||
mTitleView.setSingleLine(true);
|
||||
mTitleView.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
mTitleView.setMarqueeRepeatLimit(-1);
|
||||
// select to enable marquee unless a screen reader is enabled
|
||||
mTitleView.setSelected(!mAccessibilityManager.isEnabled()
|
||||
|| !mAccessibilityManager.isTouchExplorationEnabled());
|
||||
} else {
|
||||
mTitleView.setSingleLine(false);
|
||||
mTitleView.setEllipsize(null);
|
||||
// select to enable marquee unless a screen reader is enabled
|
||||
mTitleView.setSelected(false);
|
||||
}
|
||||
requestLayout();
|
||||
}
|
||||
return insets;
|
||||
|
||||
@@ -93,7 +93,9 @@ public class AuthCredentialPatternView extends AuthCredentialView {
|
||||
@Override
|
||||
protected void onErrorTimeoutFinish() {
|
||||
super.onErrorTimeoutFinish();
|
||||
mLockPatternView.setEnabled(true);
|
||||
// select to enable marquee unless a screen reader is enabled
|
||||
mLockPatternView.setEnabled(!mAccessibilityManager.isEnabled()
|
||||
|| !mAccessibilityManager.isTouchExplorationEnabled());
|
||||
}
|
||||
|
||||
public AuthCredentialPatternView(Context context, AttributeSet attrs) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class AuthCredentialView extends LinearLayout {
|
||||
protected final Handler mHandler;
|
||||
protected final LockPatternUtils mLockPatternUtils;
|
||||
|
||||
private final AccessibilityManager mAccessibilityManager;
|
||||
protected final AccessibilityManager mAccessibilityManager;
|
||||
private final UserManager mUserManager;
|
||||
private final DevicePolicyManager mDevicePolicyManager;
|
||||
|
||||
@@ -85,10 +85,10 @@ public abstract class AuthCredentialView extends LinearLayout {
|
||||
private boolean mShouldAnimatePanel;
|
||||
private boolean mShouldAnimateContents;
|
||||
|
||||
private TextView mTitleView;
|
||||
protected TextView mTitleView;
|
||||
protected TextView mSubtitleView;
|
||||
private TextView mDescriptionView;
|
||||
private ImageView mIconView;
|
||||
protected TextView mDescriptionView;
|
||||
protected ImageView mIconView;
|
||||
protected TextView mErrorView;
|
||||
|
||||
protected @Utils.CredentialType int mCredentialType;
|
||||
|
||||
Reference in New Issue
Block a user