Consolidate face enroll intro/consent screens
Updates the UI of the face enroll intro screen based on the latest mocks, while still allowing strings to be overlaid depending on the device and/or face auth implementation. Test: Manually tested face enrollment Bug: 187207438 Change-Id: I5d912261b1eecfc7a241d6b48d549c4ff253ecdf
This commit is contained in:
28
res/drawable/ic_face_enroll_introduction_glasses.xml
Normal file
28
res/drawable/ic_face_enroll_introduction_glasses.xml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (C) 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?android:attr/colorControlNormal">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#000000"
|
||||||
|
android:pathData="M18.75,7C16.26,7 14.19,8.74 13.65,11.065C12.39,10.525 11.22,10.675 10.35,11.05C9.795,8.725 7.725,7 5.25,7C2.355,7 0,9.355 0,12.25C0,15.145 2.355,17.5 5.25,17.5C8.01,17.5 10.245,15.37 10.455,12.67C10.905,12.355 12.09,11.77 13.545,12.7C13.785,15.385 16.005,17.5 18.75,17.5C21.645,17.5 24,15.145 24,12.25C24,9.355 21.645,7 18.75,7ZM5.25,16C3.18,16 1.5,14.32 1.5,12.25C1.5,10.18 3.18,8.5 5.25,8.5C7.32,8.5 9,10.18 9,12.25C9,14.32 7.32,16 5.25,16ZM18.75,16C16.68,16 15,14.32 15,12.25C15,10.18 16.68,8.5 18.75,8.5C20.82,8.5 22.5,10.18 22.5,12.25C22.5,14.32 20.82,16 18.75,16Z" />
|
||||||
|
</vector>
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2019 The Android Open Source Project
|
~ Copyright (C) 2021 The Android Open Source Project
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
~ See the License for the specific language governing permissions and
|
~ See the License for the specific language governing permissions and
|
||||||
~ limitations under the License
|
~ limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
@@ -31,13 +31,6 @@
|
|||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.setupdesign.view.RichTextView
|
|
||||||
android:id="@+id/sud_layout_description"
|
|
||||||
style="@style/SudDescription.Glif"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/security_settings_face_enroll_introduction_message"/>
|
|
||||||
|
|
||||||
<com.google.android.setupdesign.view.RichTextView
|
<com.google.android.setupdesign.view.RichTextView
|
||||||
android:id="@+id/error_text"
|
android:id="@+id/error_text"
|
||||||
style="@style/SudDescription.Glif"
|
style="@style/SudDescription.Glif"
|
||||||
@@ -48,7 +41,7 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="12dp">
|
android:layout_marginBottom="12dp">
|
||||||
|
|
||||||
<com.google.android.setupdesign.view.IllustrationVideoView
|
<com.google.android.setupdesign.view.IllustrationVideoView
|
||||||
android:id="@+id/illustration_normal"
|
android:id="@+id/illustration_normal"
|
||||||
@@ -67,23 +60,35 @@
|
|||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:paddingTop="12dp">
|
android:paddingTop="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/security_settings_face_enroll_introduction_info_title"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="24dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ic_info_outline_24dp">
|
android:background="@drawable/ic_face_enroll_introduction_glasses"/>
|
||||||
</ImageView>
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="24dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/security_settings_face_enroll_introduction_footer_part_0"/>
|
android:text="@string/security_settings_face_enroll_introduction_info_glasses"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:lineSpacingExtra="4sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -96,15 +101,19 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ic_face_enroll_introduction_shield">
|
android:background="@drawable/ic_face_enroll_introduction_visibility"/>
|
||||||
</ImageView>
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="24dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/security_settings_face_enroll_introduction_footer_part_1"/>
|
android:text="@string/security_settings_face_enroll_introduction_info_looking"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:lineSpacingExtra="4sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -117,40 +126,70 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ic_face_enroll_introduction_visibility">
|
android:background="@drawable/ic_face_enroll_introduction_shield"/>
|
||||||
</ImageView>
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="24dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/face_enroll_introduction_footer_part_2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/security_settings_face_enroll_introduction_info_security"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:lineSpacingExtra="4sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:text="@string/security_settings_face_enroll_introduction_how_title"
|
||||||
android:paddingTop="24dp">
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
<ImageView
|
<Space
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="24dp"/>
|
||||||
android:background="@drawable/ic_face_enroll_introduction_people">
|
|
||||||
</ImageView>
|
<TextView
|
||||||
<Space
|
android:layout_width="match_parent"
|
||||||
android:layout_width="24dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:text="@string/security_settings_face_enroll_introduction_how_message"
|
||||||
<TextView
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:layout_width="match_parent"
|
android:textSize="14sp"
|
||||||
android:layout_height="wrap_content"
|
android:lineSpacingExtra="2sp"/>
|
||||||
android:text="@string/security_settings_face_enroll_introduction_footer_part_3"/>
|
|
||||||
</LinearLayout>
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="24dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/security_settings_face_enroll_introduction_control_title"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="24dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/security_settings_face_enroll_introduction_control_message"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:lineSpacingExtra="2sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</com.google.android.setupdesign.GlifLayout>
|
</com.google.android.setupdesign.GlifLayout>
|
@@ -269,11 +269,6 @@
|
|||||||
<!-- ComponentName to launch a vendor-specific enrollment activity if available -->
|
<!-- ComponentName to launch a vendor-specific enrollment activity if available -->
|
||||||
<string name="config_face_enroll" translatable="false"></string>
|
<string name="config_face_enroll" translatable="false"></string>
|
||||||
|
|
||||||
<!-- Fully qualified name of the introductory activity for face enrollment. -->
|
|
||||||
<string name="config_face_enroll_introduction" translatable="false">
|
|
||||||
com.android.settings.biometrics.face.FaceEnrollIntroduction
|
|
||||||
</string>
|
|
||||||
|
|
||||||
<!-- App intent -->
|
<!-- App intent -->
|
||||||
<string name="config_account_intent_uri" translatable="false"></string>
|
<string name="config_account_intent_uri" translatable="false"></string>
|
||||||
|
|
||||||
|
@@ -777,7 +777,7 @@
|
|||||||
<!-- Button text to cancel enrollment [CHAR LIMIT=30] -->
|
<!-- Button text to cancel enrollment [CHAR LIMIT=30] -->
|
||||||
<string name="security_settings_face_enroll_introduction_no_thanks">No thanks</string>
|
<string name="security_settings_face_enroll_introduction_no_thanks">No thanks</string>
|
||||||
<!-- Button text to start enrollment [CHAR LIMIT=30] -->
|
<!-- Button text to start enrollment [CHAR LIMIT=30] -->
|
||||||
<string name="security_settings_face_enroll_introduction_agree">Agree</string>
|
<string name="security_settings_face_enroll_introduction_agree">I agree</string>
|
||||||
<!-- Button text to scroll to the end of a scrollview. [CHAR LIMIT=30] -->
|
<!-- Button text to scroll to the end of a scrollview. [CHAR LIMIT=30] -->
|
||||||
<string name="security_settings_face_enroll_introduction_more">More</string>
|
<string name="security_settings_face_enroll_introduction_more">More</string>
|
||||||
<!-- Introduction title shown in face enrollment to introduce the face unlock feature [CHAR LIMIT=40] -->
|
<!-- Introduction title shown in face enrollment to introduce the face unlock feature [CHAR LIMIT=40] -->
|
||||||
@@ -790,14 +790,22 @@
|
|||||||
<string name="security_settings_face_enroll_introduction_message_unlock_disabled">Use your face to unlock your phone or approve purchases.\n\nNote: You can\u2019t use your face to unlock this device. For more information, contact your organization\u2019s admin.</string>
|
<string name="security_settings_face_enroll_introduction_message_unlock_disabled">Use your face to unlock your phone or approve purchases.\n\nNote: You can\u2019t use your face to unlock this device. For more information, contact your organization\u2019s admin.</string>
|
||||||
<!-- Introduction detail message shown in face enrollment screen in setup wizard. [CHAR LIMIT=NONE] -->
|
<!-- Introduction detail message shown in face enrollment screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||||
<string name="security_settings_face_enroll_introduction_message_setup">Use your face to unlock your phone, authorize purchases, or sign in to apps</string>
|
<string name="security_settings_face_enroll_introduction_message_setup">Use your face to unlock your phone, authorize purchases, or sign in to apps</string>
|
||||||
<!-- Introduction message shown in face enrollment that provides extra detail. [CHAR LIMIT=NONE] -->
|
<!-- Title of a section on the face enrollment introduction page that provides additional information. [CHAR LIMIT=40] -->
|
||||||
<string name="security_settings_face_enroll_introduction_footer_part_0"></string>
|
<string name="security_settings_face_enroll_introduction_info_title"></string>
|
||||||
<!-- Introduction message shown in face enrollment that provides extra detail. [CHAR LIMIT=NONE] -->
|
<!-- Message on the face enrollment introduction page that provides information about glasses. [CHAR LIMIT=NONE] -->
|
||||||
<string name="security_settings_face_enroll_introduction_footer_part_1"></string>
|
<string name="security_settings_face_enroll_introduction_info_glasses"></string>
|
||||||
<!-- Introduction message shown in face enrollment that provides extra detail. [CHAR LIMIT=NONE] -->
|
<!-- Message on the face enrollment introduction page that provides information about what could cause the phone to unlock. [CHAR LIMIT=NONE] -->
|
||||||
<string name="security_settings_face_enroll_introduction_footer_part_2"></string>
|
<string name="security_settings_face_enroll_introduction_info_looking"></string>
|
||||||
<!-- Introduction message shown in face enrollment that provides extra detail. [CHAR LIMIT=NONE] -->
|
<!-- Message on the face enrollment introduction page that provides information about the security of face unlock. [CHAR LIMIT=NONE] -->
|
||||||
<string name="security_settings_face_enroll_introduction_footer_part_3"></string>
|
<string name="security_settings_face_enroll_introduction_info_security"></string>
|
||||||
|
<!-- Title of a section on the face enrollment introduction page that explains how face unlock works. [CHAR LIMIT=40] -->
|
||||||
|
<string name="security_settings_face_enroll_introduction_how_title"></string>
|
||||||
|
<!-- Message on the face enrollment introduction page that explains how face unlock works. [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="security_settings_face_enroll_introduction_how_message"></string>
|
||||||
|
<!-- Title of a section on the face enrollment introduction page that explains privacy controls for face unlock. [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="security_settings_face_enroll_introduction_control_title"></string>
|
||||||
|
<!-- Message on the face enrollment introduction page that explains privacy controls for face unlock [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="security_settings_face_enroll_introduction_control_message"></string>
|
||||||
<!-- Title shown in face enrollment dialog [CHAR LIMIT=40] -->
|
<!-- Title shown in face enrollment dialog [CHAR LIMIT=40] -->
|
||||||
<string name="security_settings_face_enroll_repeat_title">Center your face in the circle</string>
|
<string name="security_settings_face_enroll_repeat_title">Center your face in the circle</string>
|
||||||
<!-- Button text to skip enrollment of face [CHAR LIMIT=40] -->
|
<!-- Button text to skip enrollment of face [CHAR LIMIT=40] -->
|
||||||
|
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package com.android.settings.biometrics;
|
package com.android.settings.biometrics;
|
||||||
|
|
||||||
import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.admin.DevicePolicyManager;
|
import android.app.admin.DevicePolicyManager;
|
||||||
@@ -34,8 +32,8 @@ import androidx.fragment.app.FragmentActivity;
|
|||||||
|
|
||||||
import com.android.internal.widget.LockPatternUtils;
|
import com.android.internal.widget.LockPatternUtils;
|
||||||
import com.android.internal.widget.VerifyCredentialResponse;
|
import com.android.internal.widget.VerifyCredentialResponse;
|
||||||
import com.android.settings.R;
|
|
||||||
import com.android.settings.SetupWizardUtils;
|
import com.android.settings.SetupWizardUtils;
|
||||||
|
import com.android.settings.biometrics.face.FaceEnrollIntroduction;
|
||||||
import com.android.settings.biometrics.fingerprint.FingerprintEnrollFindSensor;
|
import com.android.settings.biometrics.fingerprint.FingerprintEnrollFindSensor;
|
||||||
import com.android.settings.biometrics.fingerprint.FingerprintEnrollIntroduction;
|
import com.android.settings.biometrics.fingerprint.FingerprintEnrollIntroduction;
|
||||||
import com.android.settings.biometrics.fingerprint.SetupFingerprintEnrollIntroduction;
|
import com.android.settings.biometrics.fingerprint.SetupFingerprintEnrollIntroduction;
|
||||||
@@ -173,9 +171,7 @@ public class BiometricUtils {
|
|||||||
*/
|
*/
|
||||||
public static Intent getFaceIntroIntent(@NonNull Context context,
|
public static Intent getFaceIntroIntent(@NonNull Context context,
|
||||||
@NonNull Intent activityIntent) {
|
@NonNull Intent activityIntent) {
|
||||||
final String className = context.getString(R.string.config_face_enroll_introduction);
|
final Intent intent = new Intent(context, FaceEnrollIntroduction.class);
|
||||||
Intent intent = new Intent();
|
|
||||||
intent.setClassName(SETTINGS_PACKAGE_NAME, className);
|
|
||||||
WizardManagerHelper.copyWizardManagerExtras(activityIntent, intent);
|
WizardManagerHelper.copyWizardManagerExtras(activityIntent, intent);
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 The Android Open Source Project
|
* Copyright (C) 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.settings.biometrics.face;
|
package com.android.settings.biometrics.face;
|
||||||
@@ -41,8 +41,11 @@ import com.google.android.setupdesign.template.RequireScrollMixin;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides introductory info about face unlock and prompts the user to agree before starting face
|
||||||
|
* enrollment.
|
||||||
|
*/
|
||||||
public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
||||||
|
|
||||||
private static final String TAG = "FaceEnrollIntroduction";
|
private static final String TAG = "FaceEnrollIntroduction";
|
||||||
|
|
||||||
private FaceManager mFaceManager;
|
private FaceManager mFaceManager;
|
||||||
@@ -66,6 +69,9 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
getLayout().setDescriptionText(getString(
|
||||||
|
R.string.security_settings_face_enroll_introduction_message));
|
||||||
|
|
||||||
mFaceManager = Utils.getFaceManagerOrNull(this);
|
mFaceManager = Utils.getFaceManagerOrNull(this);
|
||||||
mFaceFeatureProvider = FeatureFactory.getFactory(getApplicationContext())
|
mFaceFeatureProvider = FeatureFactory.getFactory(getApplicationContext())
|
||||||
.getFaceFeatureProvider();
|
.getFaceFeatureProvider();
|
||||||
@@ -82,7 +88,7 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
|
|
||||||
FooterButton.Builder nextButtonBuilder = new FooterButton.Builder(this)
|
FooterButton.Builder nextButtonBuilder = new FooterButton.Builder(this)
|
||||||
.setText(R.string.security_settings_face_enroll_introduction_agree)
|
.setText(R.string.security_settings_face_enroll_introduction_agree)
|
||||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
.setButtonType(FooterButton.ButtonType.OPT_IN)
|
||||||
.setTheme(R.style.SudGlifButton_Primary);
|
.setTheme(R.style.SudGlifButton_Primary);
|
||||||
if (maxFacesEnrolled()) {
|
if (maxFacesEnrolled()) {
|
||||||
nextButtonBuilder.setListener(this::onNextButtonClick);
|
nextButtonBuilder.setListener(this::onNextButtonClick);
|
||||||
@@ -97,13 +103,6 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
this::onNextButtonClick);
|
this::onNextButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
final TextView footer2 = findViewById(R.id.face_enroll_introduction_footer_part_2);
|
|
||||||
final int footer2TextResource =
|
|
||||||
mFaceFeatureProvider.isAttentionSupported(getApplicationContext())
|
|
||||||
? R.string.security_settings_face_enroll_introduction_footer_part_2
|
|
||||||
: R.string.security_settings_face_settings_footer_attention_not_supported;
|
|
||||||
footer2.setText(footer2TextResource);
|
|
||||||
|
|
||||||
// This path is an entry point for SetNewPasswordController, e.g.
|
// This path is an entry point for SetNewPasswordController, e.g.
|
||||||
// adb shell am start -a android.app.action.SET_NEW_PASSWORD
|
// adb shell am start -a android.app.action.SET_NEW_PASSWORD
|
||||||
if (mToken == null && BiometricUtils.containsGatekeeperPasswordHandle(getIntent())) {
|
if (mToken == null && BiometricUtils.containsGatekeeperPasswordHandle(getIntent())) {
|
||||||
|
@@ -68,7 +68,7 @@ public class FaceStatusPreferenceController extends BiometricStatusPreferenceCon
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getEnrollClassName() {
|
protected String getEnrollClassName() {
|
||||||
return mContext.getResources().getString(R.string.config_face_enroll_introduction);
|
return FaceEnrollIntroduction.class.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user