Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d40442c9 authored by Shawn Lin's avatar Shawn Lin Committed by Android (Google) Code Review
Browse files

Merge "[Biometric Onboarding & Edu] Update face settings page" into main

parents a796ca49 d747235a
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2025 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="960"
        android:viewportHeight="960"
        android:tint="?attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M360,570Q339,570 324.5,555.5Q310,541 310,520Q310,499 324.5,484.5Q339,470 360,470Q381,470 395.5,484.5Q410,499 410,520Q410,541 395.5,555.5Q381,570 360,570ZM600,570Q579,570 564.5,555.5Q550,541 550,520Q550,499 564.5,484.5Q579,470 600,470Q621,470 635.5,484.5Q650,499 650,520Q650,541 635.5,555.5Q621,570 600,570ZM480,800Q614,800 707,707Q800,614 800,480Q800,456 797,433.5Q794,411 786,390Q765,395 744,397.5Q723,400 700,400Q609,400 528,361Q447,322 390,252Q358,330 298.5,387.5Q239,445 160,474Q160,476 160,477Q160,478 160,480Q160,614 253,707Q346,800 480,800ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM426,165Q468,235 540,277.5Q612,320 700,320Q714,320 727,318.5Q740,317 754,315Q712,245 640,202.5Q568,160 480,160Q466,160 453,161.5Q440,163 426,165ZM177,379Q228,350 266,304Q304,258 323,201Q272,230 234,276Q196,322 177,379ZM426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165Q426,165 426,165ZM323,201Q323,201 323,201Q323,201 323,201Q323,201 323,201Q323,201 323,201Z"/>
</vector>
+10 −0
Original line number Diff line number Diff line
@@ -914,6 +914,14 @@
    <string name="security_settings_face_enroll_improve_face_alert_body_fingerprint">Delete your current face model to set up Face Unlock again.\n\nYour face model will be permanently and securely deleted.\n\nAfter deletion, you will need your fingerprint, PIN, pattern, or password to unlock your phone or for authentication in apps.</string>
    <!-- Title for a category shown for the face settings page. [CHAR LIMIT=20] -->
    <string name="security_settings_face_settings_use_face_category">Use Face Unlock for</string>
    <!-- Description shown on face settings page. -->
    <string name="security_settings_face_description"></string>
    <!-- Footer description shown on face settings page. -->
    <string name="security_settings_face_footer_description_class3"></string>
    <!-- Footer learn more description shown on face settings page. -->
    <string name="security_settings_face_footer_learn_more_description"></string>
    <!-- Footer learn more URL shown on face settings page  [DO NOT TRANSLATE] -->
    <string name="security_settings_face_footer_learn_more_url" translatable="false"></string>
    <!-- Title for a category shown for the face settings page. [CHAR LIMIT=20] -->
    <string name="security_settings_face_settings_face_category">Face</string>
    <!-- Title for a category shown for the face settings page. [CHAR LIMIT=20] -->
@@ -948,6 +956,8 @@
    <string name="security_settings_face_remove_dialog_details_fingerprint_conv">Your face model will be permanently and securely deleted.\n\nAfter deletion, you will need your fingerprint, PIN, pattern, or password to unlock your phone.</string>
    <!-- Subtitle shown for contextual setting face enrollment [CHAR LIMIT=NONE] -->
    <string name="security_settings_face_settings_context_subtitle">Use Face Unlock to unlock your phone</string>
    <!-- Title shown for adding face in face settings page. -->
    <string name="security_settings_face_add">Add face</string>
    <!-- Fingerprint enrollment and settings --><skip />
    <!-- Note: Update FingerprintEnrollParentalConsent.CONSENT_STRING_RESOURCES when any _consent_ strings are added or removed. -->
+21 −2
Original line number Diff line number Diff line
@@ -19,6 +19,11 @@
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/security_settings_face_preference_title">

    <com.android.settingslib.widget.TopIntroPreference
        android:key="security_settings_face_description"
        settings:searchable="false"
        settings:isPreferenceVisible="false" />

    <PreferenceCategory
        android:key="biometric_settings_use_face_to"
        android:title="@string/security_settings_face_settings_use_face_to_category"
@@ -37,6 +42,18 @@
            settings:controller="com.android.settings.biometrics.face.FaceSettingsAppsPreferenceController"/>
    </PreferenceCategory>

    <PreferenceCategory
        android:key="security_settings_face_enrolled_category"
        android:title="@string/security_settings_face_preference_title_new"
        settings:isPreferenceVisible="false">
        <com.android.settings.biometrics.face.FacePreference
            android:key="security_settings_face_remove"
            android:title="@string/security_settings_face_preference_title_new"/>
        <Preference
            android:key="security_settings_face_enroll"
            android:title="@string/security_settings_face_add"/>
    </PreferenceCategory>

    <PreferenceCategory
        android:key="security_settings_face_unlock_category"
        android:title="@string/security_settings_face_settings_use_face_category"
@@ -88,13 +105,15 @@
        android:key="security_settings_face_delete_faces_container"
        android:title="@string/security_settings_face_settings_remove_face_model"
        android:selectable="false"
        android:layout="@layout/face_remove_button"/>
        android:layout="@layout/face_remove_button"
        settings:isPreferenceVisible="false"/>

    <com.android.settingslib.widget.LayoutPreference
        android:key="security_settings_face_enroll_faces_container"
        android:title="@string/security_settings_face_settings_enroll"
        android:selectable="false"
        android:layout="@layout/face_enroll_button"/>
        android:layout="@layout/face_enroll_button"
        settings:isPreferenceVisible="false"/>

    <com.android.settingslib.widget.FooterPreference
        android:key="security_face_footer"
+9 −0
Original line number Diff line number Diff line
@@ -42,4 +42,13 @@ public interface FaceFeatureProvider {
    default FaceEnrollActivityClassProvider getEnrollActivityClassProvider() {
        return FaceEnrollActivityClassProvider.getInstance();
    }

    /**
     * Gets the feature provider for FaceSettings page
     * @return the provider
     */
    @NonNull
    default FaceSettingsFeatureProvider getFaceSettingsFeatureProvider() {
        return FaceSettingsFeatureProvider.getInstance();
    }
}
+52 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 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.
 */

package com.android.settings.biometrics.face;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.settings.R;
import com.android.settingslib.widget.TwoTargetPreference;

public class FacePreference extends TwoTargetPreference {

    public FacePreference(@NonNull Context context) {
        super(context);
    }

    public FacePreference(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public FacePreference(
            @NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public FacePreference(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr,
            int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    @Override
    protected int getSecondTargetResId() {
        return R.layout.preference_widget_delete;
    }
}
Loading