Update work profile lock in Settings to latest spec
* Updated FrameLayout of work profile lock in Settings to use GlifLayout * Removed old background image of work profile lock * Updated text for PIN, password and pattern * Added enterprise logo to work profile lock Bug: 141290838 Test: Manual testing atest com.android.settings.password Change-Id: Ie09974857b6c76a182a8075b9e1964a2e0af0de9
This commit is contained in:
25
res/drawable/ic_enterprise.xml
Normal file
25
res/drawable/ic_enterprise.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2019 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"
|
||||
android:fillColor="?android:attr/colorPrimary"/>
|
||||
</vector>
|
@@ -13,81 +13,98 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAutofill="noExcludeDescendants">
|
||||
android:icon="@drawable/ic_enterprise"
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<include layout="@layout/confirm_lock_background_base" />
|
||||
|
||||
<LinearLayout
|
||||
<!--common_typos_disable-->
|
||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Title"
|
||||
android:id="@+id/headerText"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Body1"
|
||||
android:id="@+id/sud_layout_description"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
android:id="@+id/cancelButton"
|
||||
<ImageView
|
||||
android:id="@+id/sud_layout_icon"
|
||||
style="@style/SudGlifIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:text="@string/cancel"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="14dp"/>
|
||||
android:layout_gravity="?attr/sudGlifHeaderGravity"
|
||||
android:src="@drawable/ic_enterprise" />
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/headerText"
|
||||
style="@style/SudGlifHeaderTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_layout_description"
|
||||
style="@style/SudDescription.Glif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.settings.widget.ScrollToParentEditText
|
||||
android:id="@+id/password_entry"
|
||||
android:layout_width="208dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||
android:gravity="center"
|
||||
style="@style/TextAppearance.PasswordEntry"/>
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView style="@style/TextAppearance.ErrorText"
|
||||
android:accessibilityLiveRegion="polite"
|
||||
android:id="@+id/errorText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
<com.android.settings.widget.ScrollToParentEditText
|
||||
android:id="@+id/password_entry"
|
||||
android:layout_width="208dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:inputType="textPassword"
|
||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||
android:gravity="center"
|
||||
style="@style/TextAppearance.PasswordEntry"/>
|
||||
|
||||
</FrameLayout>
|
||||
<TextView
|
||||
style="@style/TextAppearance.ErrorText"
|
||||
android:accessibilityLiveRegion="polite"
|
||||
android:id="@+id/errorText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
<!--common_typos_disable-->
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
@@ -13,83 +13,67 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include layout="@layout/confirm_lock_background_base" />
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_enterprise"
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Headline"
|
||||
android:id="@+id/headerText"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Body1"
|
||||
android:id="@+id/sud_layout_description"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<Button
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="16dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<ScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
android:fillViewport="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/leftSpacer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
<ImageView
|
||||
android:id="@+id/sud_layout_icon"
|
||||
style="@style/SudGlifIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="?attr/sudGlifHeaderGravity"
|
||||
android:src="@drawable/ic_enterprise" />
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
<TextView
|
||||
android:id="@+id/headerText"
|
||||
style="@style/SudGlifHeaderTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_layout_description"
|
||||
style="@style/SudDescription.Glif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides" />x
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
style="@style/SetupWizardButton.Negative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.ErrorText"
|
||||
@@ -97,16 +81,30 @@
|
||||
android:id="@+id/errorText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
</FrameLayout>
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/rightSpacer"
|
||||
android:layout_width="0dp"
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.setupdesign.view.FillContentLayout
|
||||
style="@style/LockPatternContainerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="0dp">
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</com.google.android.setupdesign.view.FillContentLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</FrameLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
||||
|
@@ -14,15 +14,16 @@
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAutofill="noExcludeDescendants">
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<include
|
||||
layout="@layout/confirm_lock_password_base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
</FrameLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
@@ -13,12 +13,16 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<include layout="@layout/confirm_lock_pattern_base"
|
||||
<include
|
||||
layout="@layout/confirm_lock_pattern_base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</FrameLayout>
|
||||
android:layout_gravity="center_horizontal" />
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
@@ -13,55 +13,52 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAutofill="noExcludeDescendants">
|
||||
|
||||
<include layout="@layout/confirm_lock_background_base" />
|
||||
android:icon="@drawable/ic_enterprise"
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="@dimen/confirm_credentials_layout_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:paddingTop="@dimen/confirm_credentials_top_padding">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Headline"
|
||||
android:id="@+id/headerText"
|
||||
android:layout_marginStart="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginEnd="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginTop="?attr/confirmDeviceCredentialsTopMargin"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/colorAccent"/>
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Body1"
|
||||
android:id="@+id/sud_layout_description"
|
||||
android:layout_marginStart="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginEnd="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<ImageView
|
||||
android:id="@+id/sud_layout_icon"
|
||||
style="@style/SudGlifIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="?attr/sudGlifHeaderGravity"
|
||||
android:src="@drawable/ic_enterprise" />
|
||||
|
||||
<Button
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="16dp"/>
|
||||
<TextView
|
||||
android:id="@+id/headerText"
|
||||
style="@style/SudGlifHeaderTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/sud_layout_description"
|
||||
style="@style/SudDescription.Glif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides" />
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -73,6 +70,7 @@
|
||||
android:id="@+id/password_entry"
|
||||
android:layout_width="208dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:inputType="textPassword"
|
||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||
android:gravity="center"
|
||||
@@ -90,5 +88,21 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</FrameLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
@@ -13,91 +13,95 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include layout="@layout/confirm_lock_background_base" />
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_enterprise"
|
||||
android:layout="@layout/sud_glif_blank_template">
|
||||
|
||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="@dimen/confirm_credentials_layout_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:paddingTop="@dimen/confirm_credentials_top_padding">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Headline"
|
||||
android:id="@+id/headerText"
|
||||
android:layout_marginStart="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginEnd="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginTop="?attr/confirmDeviceCredentialsTopMargin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
style="@*android:style/TextAppearance.DeviceDefault.Body1"
|
||||
android:id="@+id/sud_layout_description"
|
||||
android:layout_marginStart="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginEnd="?attr/confirmDeviceCredentialsSideMargin"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<Button
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="16dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.android.internal.widget.LockPatternView
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="312dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_layout_icon"
|
||||
style="@style/SudGlifIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="?attr/sudGlifHeaderGravity"
|
||||
android:src="@drawable/ic_enterprise" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headerText"
|
||||
style="@style/SudGlifHeaderTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_layout_description"
|
||||
style="@style/SudDescription.Glif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides" />x
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SudContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
|
||||
<com.google.android.setupdesign.view.FillContentLayout
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</com.google.android.setupdesign.view.FillContentLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.ErrorText"
|
||||
android:accessibilityLiveRegion="polite"
|
||||
android:id="@+id/errorText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="?attr/sudMarginSides"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</FrameLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
@@ -2086,7 +2086,7 @@
|
||||
<!-- Title for the fragment to show that the QR code is for sharing Wi-Fi hotspot network [CHAR LIMIT=50] -->
|
||||
<string name="wifi_dpp_share_hotspot">Share hotspot</string>
|
||||
<!-- Title for Wi-Fi DPP lockscreen title [CHAR LIMIT=50] -->
|
||||
<string name="wifi_dpp_lockscreen_title">Verify it\u0027s you</string>
|
||||
<string name="wifi_dpp_lockscreen_title">Verify that it\u0027s you</string>
|
||||
<!-- Hint for Wi-Fi password [CHAR LIMIT=50] -->
|
||||
<string name="wifi_dpp_wifi_password">Wi\u2011Fi password: <xliff:g id="password" example="my password">%1$s</xliff:g></string>
|
||||
<!-- Hint for Wi-Fi hotspot password [CHAR LIMIT=50] -->
|
||||
@@ -3969,10 +3969,16 @@
|
||||
<string name="lockpassword_choose_your_pattern_message">For security, set pattern</string>
|
||||
<!-- Header on password confirm screen [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_confirm_your_password_header">Re-enter your password</string>
|
||||
<!-- Header on password confirm screen for the work profile [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_confirm_your_work_password_header">Enter your work password</string>
|
||||
<!-- Header on pattern confirm screen [CHAR LIMIT=30] -->
|
||||
<string name="lockpassword_confirm_your_pattern_header">Confirm your pattern</string>
|
||||
<!-- Header on pattern confirm screen for the work profile [CHAR LIMIT=30] -->
|
||||
<string name="lockpassword_confirm_your_work_pattern_header">Enter your work pattern</string>
|
||||
<!-- Header on password confirm screen [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_confirm_your_pin_header">Re-enter your PIN</string>
|
||||
<!-- Header on password confirm screen for the work profile [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_confirm_your_work_pin_header">Enter your work PIN</string>
|
||||
<!-- Header on password confirm screen if second password doesn't match the first. [CHAR LIMIT=30] -->
|
||||
<string name="lockpassword_confirm_passwords_dont_match">Passwords don\u2019t match</string>
|
||||
<!-- Header on pin confirm screen if second pin doesn't match the first. [CHAR LIMIT=30]-->
|
||||
|
@@ -186,8 +186,6 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
|
||||
final LockPatternUtils lockPatternUtils = new LockPatternUtils(this);
|
||||
|
||||
final Bundle bpBundle = new Bundle();
|
||||
mTitle = bpBundle.getString(BiometricPrompt.KEY_TITLE);
|
||||
mDetails = bpBundle.getString(BiometricPrompt.KEY_SUBTITLE);
|
||||
bpBundle.putString(BiometricPrompt.KEY_TITLE, mTitle);
|
||||
bpBundle.putString(BiometricPrompt.KEY_DESCRIPTION, mDetails);
|
||||
bpBundle.putBoolean(BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS,
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.password;
|
||||
|
||||
import android.app.KeyguardManager;
|
||||
import android.hardware.biometrics.BiometricManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserManager;
|
||||
import android.util.Log;
|
||||
@@ -65,7 +64,7 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
return;
|
||||
}
|
||||
if (UserManager.get(this).isManagedProfile(credentialOwnerUserId)) {
|
||||
setTheme(R.style.Theme_ConfirmDeviceCredentialsWork);
|
||||
setTheme(SetupWizardUtils.getTheme(getIntent()));
|
||||
mConfirmCredentialTheme = ConfirmCredentialTheme.WORK;
|
||||
} else if (getIntent().getBooleanExtra(
|
||||
ConfirmDeviceCredentialBaseFragment.DARK_THEME, false)) {
|
||||
|
@@ -140,9 +140,6 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
|
||||
Utils.getUserIdFromBundle(
|
||||
getActivity(),
|
||||
getActivity().getIntent().getExtras(), isInternalActivity()));
|
||||
if (mUserManager.isManagedProfile(credentialOwnerUserId)) {
|
||||
setWorkChallengeBackground(view, credentialOwnerUserId);
|
||||
}
|
||||
}
|
||||
|
||||
// User could be locked while Effective user is unlocked even though the effective owns the
|
||||
|
@@ -56,16 +56,12 @@ import java.util.ArrayList;
|
||||
|
||||
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
|
||||
// The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
||||
// The index of the array is isStrongAuth << 1 + isAlpha.
|
||||
private static final int[] DETAIL_TEXTS = new int[] {
|
||||
R.string.lockpassword_confirm_your_pin_generic,
|
||||
R.string.lockpassword_confirm_your_password_generic,
|
||||
R.string.lockpassword_confirm_your_pin_generic_profile,
|
||||
R.string.lockpassword_confirm_your_password_generic_profile,
|
||||
R.string.lockpassword_strong_auth_required_device_pin,
|
||||
R.string.lockpassword_strong_auth_required_device_password,
|
||||
R.string.lockpassword_strong_auth_required_work_pin,
|
||||
R.string.lockpassword_strong_auth_required_work_password,
|
||||
R.string.lockpassword_strong_auth_required_device_password
|
||||
};
|
||||
|
||||
public static class InternalActivity extends ConfirmLockPassword {
|
||||
@@ -109,6 +105,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
private InputMethodManager mImm;
|
||||
private AppearAnimationUtils mAppearAnimationUtils;
|
||||
private DisappearAnimationUtils mDisappearAnimationUtils;
|
||||
private boolean mIsManagedProfile;
|
||||
|
||||
// required constructor for fragments
|
||||
public ConfirmLockPasswordFragment() {
|
||||
@@ -149,6 +146,8 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
mImm = (InputMethodManager) getActivity().getSystemService(
|
||||
Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||
|
||||
Intent intent = getActivity().getIntent();
|
||||
if (intent != null) {
|
||||
CharSequence headerMessage = intent.getCharSequenceExtra(
|
||||
@@ -205,6 +204,10 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header_frp
|
||||
: R.string.lockpassword_confirm_your_pin_header_frp;
|
||||
}
|
||||
if (mIsManagedProfile) {
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_work_password_header
|
||||
: R.string.lockpassword_confirm_your_work_pin_header;
|
||||
}
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header
|
||||
: R.string.lockpassword_confirm_your_pin_header;
|
||||
}
|
||||
@@ -215,10 +218,8 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
: R.string.lockpassword_confirm_your_pin_details_frp;
|
||||
}
|
||||
boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||
boolean isProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||
// Map boolean flags to an index by isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
||||
int index = ((isStrongAuthRequired ? 1 : 0) << 2) + ((isProfile ? 1 : 0) << 1)
|
||||
+ (mIsAlpha ? 1 : 0);
|
||||
// Map boolean flags to an index by isStrongAuth << 1 + isAlpha.
|
||||
int index = ((isStrongAuthRequired ? 1 : 0) << 1) + (mIsAlpha ? 1 : 0);
|
||||
return DETAIL_TEXTS[index];
|
||||
}
|
||||
|
||||
|
@@ -90,8 +90,6 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
|
||||
private TextView mHeaderTextView;
|
||||
private TextView mDetailsTextView;
|
||||
private View mLeftSpacerLandscape;
|
||||
private View mRightSpacerLandscape;
|
||||
|
||||
// caller-supplied text for various prompts
|
||||
private CharSequence mHeaderText;
|
||||
@@ -100,6 +98,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
private AppearAnimationUtils mAppearAnimationUtils;
|
||||
private DisappearAnimationUtils mDisappearAnimationUtils;
|
||||
|
||||
private boolean mIsManagedProfile;
|
||||
|
||||
// required constructor for fragments
|
||||
public ConfirmLockPatternFragment() {
|
||||
|
||||
@@ -119,8 +119,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
|
||||
mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
|
||||
mErrorTextView = (TextView) view.findViewById(R.id.errorText);
|
||||
mLeftSpacerLandscape = view.findViewById(R.id.leftSpacer);
|
||||
mRightSpacerLandscape = view.findViewById(R.id.rightSpacer);
|
||||
|
||||
mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||
|
||||
// make it so unhandled touch events within the unlock screen go to the
|
||||
// lock pattern view.
|
||||
@@ -325,7 +325,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
}
|
||||
|
||||
private int getDefaultHeader() {
|
||||
return mFrp ? R.string.lockpassword_confirm_your_pattern_header_frp
|
||||
if (mFrp) return R.string.lockpassword_confirm_your_pattern_header_frp;
|
||||
return mIsManagedProfile
|
||||
? R.string.lockpassword_confirm_your_work_pattern_header
|
||||
: R.string.lockpassword_confirm_your_pattern_header;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user