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

Commit 3def4425 authored by d34d's avatar d34d Committed by Arne Coucheron
Browse files

fingerpint: Allow devices to configure sensor location

The text for enrolling a fingerprint always assumes the sensor is
located on the back.  This patch adds a config integer that defines
where the sensor is located on the device.
  0 = back
  1 = front
  2 = left side
  3 = right side

This patch also adds a new drawable that shows the front of the device
when applicable.

Change-Id: Ia8f5f8ff4ba4d13d35aed3052f60ff665dd4f294
TICKET: CYNGNOS-3089
parent 99e3ff38
Loading
Loading
Loading
Loading
+2.64 KiB
Loading image diff...
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@

                <TextView
                    style="@style/TextAppearance.FingerprintMessage"
                    android:id="@+id/find_sensor_message"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@

            <TextView
                style="@style/TextAppearance.FingerprintMessage"
                android:id="@+id/find_sensor_message"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/suw_description_glif_margin_top"
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@
        android:src="@drawable/fingerprint_sensor_location"
        android:scaleType="centerInside"/>

    <ImageView
        android:id="@+id/fingerprint_sensor_location_front_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@string/security_settings_fingerprint_enroll_find_sensor_content_description"
        android:src="@drawable/fingerprint_sensor_location_front_overlay"
        android:scaleType="centerInside"
        android:visibility="gone"/>

    <com.android.settings.fingerprint.FingerprintLocationAnimationView
        android:id="@+id/fingerprint_sensor_location_animation"
        android:layout_width="match_parent"
+10 −0
Original line number Diff line number Diff line
@@ -230,4 +230,14 @@
        <item>900000</item>
        <item>1800000</item>
    </string-array>

    <!-- Fingerprint sensor locations.  Devices should configure their sensor location using
         config_fingerprintSensorLocation -->
    <string-array name="security_settings_fingerprint_sensor_locations" translatable="false">
        <item>@string/security_settings_fingerprint_sensor_location_back</item>
        <item>@string/security_settings_fingerprint_sensor_location_front</item>
        <item>@string/security_settings_fingerprint_sensor_location_left</item>
        <item>@string/security_settings_fingerprint_sensor_location_right</item>
    </string-array>

</resources>
Loading