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

Commit 4882e875 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

1/n Start adding Face settings (base, intro)

This change refactors common biometric settings code as well to minimize
duplicated code in areas such as:
    Preference Controller
    EnrollBase
    EnrollIntro

This change also updates ChooseLock to have Face + Pin/Pattern/Pass

Bug: 110589286

Test: Fingerprint settings/enrollment still works
Test: make -j56 RunSettingsRoboTests
Change-Id: Ie35406a01b85617423beece42683ac086e9bc4a7
parent 87007778
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1562,6 +1562,8 @@
            android:windowSoftInputMode="stateHidden|adjustResize"
            android:theme="@style/GlifTheme.Light"/>

        <activity android:name=".biometrics.face.FaceEnrollIntroduction" android:exported="false" />

        <activity android:name=".biometrics.fingerprint.FingerprintSettings" android:exported="false"/>
        <activity android:name=".biometrics.fingerprint.FingerprintEnrollFindSensor" android:exported="false"/>
        <activity android:name=".biometrics.fingerprint.FingerprintEnrollEnrolling" android:exported="false"/>
+23 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 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:height="24dp"
    android:width="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path android:fillColor="#000" android:pathData="M9,11.75A1.25,1.25 0 0,0 7.75,13A1.25,1.25 0 0,0 9,14.25A1.25,1.25 0 0,0 10.25,13A1.25,1.25 0 0,0 9,11.75M15,11.75A1.25,1.25 0 0,0 13.75,13A1.25,1.25 0 0,0 15,14.25A1.25,1.25 0 0,0 16.25,13A1.25,1.25 0 0,0 15,11.75M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,11.71 4,11.42 4.05,11.14C6.41,10.09 8.28,8.16 9.26,5.77C11.07,8.33 14.05,10 17.42,10C18.2,10 18.95,9.91 19.67,9.74C19.88,10.45 20,11.21 20,12C20,16.41 16.41,20 12,20Z" />
</vector>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 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:height="24dp"
    android:width="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path android:fillColor="#000" android:pathData="M9,11.75A1.25,1.25 0 0,0 7.75,13A1.25,1.25 0 0,0 9,14.25A1.25,1.25 0 0,0 10.25,13A1.25,1.25 0 0,0 9,11.75M15,11.75A1.25,1.25 0 0,0 13.75,13A1.25,1.25 0 0,0 15,14.25A1.25,1.25 0 0,0 16.25,13A1.25,1.25 0 0,0 15,11.75M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,11.71 4,11.42 4.05,11.14C6.41,10.09 8.28,8.16 9.26,5.77C11.07,8.33 14.05,10 17.42,10C18.2,10 18.95,9.91 19.67,9.74C19.88,10.45 20,11.21 20,12C20,16.41 16.41,20 12,20Z" />
</vector>
 No newline at end of file
+64 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2018 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
  -->

<com.android.setupwizardlib.GlifLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    style="?attr/face_layout_theme"
    android:id="@+id/setup_wizard_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:suwFooter="@layout/face_enroll_introduction_footer">

    <LinearLayout
        style="@style/SuwContentFrame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="vertical">

        <com.android.setupwizardlib.view.RichTextView
            android:id="@+id/description_text"
            style="@style/SuwDescription.Glif"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/security_settings_face_enroll_introduction_message" />

        <com.android.setupwizardlib.view.RichTextView
            android:id="@+id/error_text"
            style="@style/SuwDescription.Glif"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <com.android.setupwizardlib.view.FillContentLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1">

            <ImageView
                style="@style/SuwContentIllustration"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:contentDescription="@null"
                android:src="@drawable/face_enroll_introduction" />

        </com.android.setupwizardlib.view.FillContentLayout>

    </LinearLayout>

</com.android.setupwizardlib.GlifLayout>
+44 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2018 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
  -->

<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
<com.android.setupwizardlib.view.ButtonBarLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/SuwGlifButtonBar.Stackable"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <Button
        android:id="@+id/face_cancel_button"
        style="@style/SuwGlifButton.Secondary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/security_settings_face_enroll_introduction_cancel" />

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1" />

    <Button
        android:id="@+id/face_next_button"
        style="@style/SuwGlifButton.Primary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/suw_next_button_label" />

</com.android.setupwizardlib.view.ButtonBarLayout>
Loading