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

Commit c3222323 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Merge branch '6853-s-one_fp_setup' into 'v1-s'

FingerprintEnroll: Add config for dedicated side mounted fps

See merge request !177
parents 394d240e 62f454ea
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
<!--
     Copyright (C) 2020-2022 The LineageOS Project
     Copyright (C) 2020-2023 The LineageOS 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.
@@ -18,6 +18,10 @@
    <!-- Indicates whether device has a front facing fingerprint sensor (not udfps). -->
    <!-- Indicates whether device has a front facing fingerprint sensor (not udfps). -->
    <bool name="config_is_front_facing_fps" translatable="false">false</bool>
    <bool name="config_is_front_facing_fps" translatable="false">false</bool>


    <!-- Indicates whether device has a side mounted fingerprint sensor,
         but a dedicated one, i.e. not embedded in the power button. -->
    <bool name="config_is_side_fps" translatable="false">false</bool>

    <string-array name="config_ignored_backup_transports" translatable="false">
    <string-array name="config_ignored_backup_transports" translatable="false">
        <item>com.android.localtransport/.LocalTransport</item>
        <item>com.android.localtransport/.LocalTransport</item>
    </string-array>
    </string-array>
+3 −1
Original line number Original line Diff line number Diff line
@@ -743,7 +743,9 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
        public Dialog onCreateDialog(Bundle savedInstanceState) {
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            final boolean isFrontFacingFps = getResources().getBoolean(
            final boolean isFrontFacingFps = getResources().getBoolean(
                    R.bool.config_is_front_facing_fps);
                    R.bool.config_is_front_facing_fps);
            final String fpsLocation = getString(sCanAssumeSidefps
            final boolean isSideMountedfps = sCanAssumeSidefps || getResources().getBoolean(
                    R.bool.config_is_side_fps);
            final String fpsLocation = getString(isSideMountedfps
                    ? R.string.fingerprint_enroll_touch_dialog_message_side : isFrontFacingFps
                    ? R.string.fingerprint_enroll_touch_dialog_message_side : isFrontFacingFps
                            ? R.string.fingerprint_enroll_touch_dialog_message_front
                            ? R.string.fingerprint_enroll_touch_dialog_message_front
                            : R.string.fingerprint_enroll_touch_dialog_message_rear);
                            : R.string.fingerprint_enroll_touch_dialog_message_rear);
+3 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,9 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements
        } else {
        } else {
            final boolean isFrontFacingFps = getResources().getBoolean(
            final boolean isFrontFacingFps = getResources().getBoolean(
                    R.bool.config_is_front_facing_fps);
                    R.bool.config_is_front_facing_fps);
            final String fpsLocation = getString(mCanAssumeSidefps
            final boolean isSideMountedFps = mCanAssumeSidefps || getResources().getBoolean(
                    R.bool.config_is_side_fps);
            final String fpsLocation = getString(isSideMountedFps
                    ? R.string.fingerprint_enroll_find_sensor_message_side : isFrontFacingFps
                    ? R.string.fingerprint_enroll_find_sensor_message_side : isFrontFacingFps
                            ? R.string.fingerprint_enroll_find_sensor_message_front
                            ? R.string.fingerprint_enroll_find_sensor_message_front
                            : R.string.fingerprint_enroll_find_sensor_message_rear);
                            : R.string.fingerprint_enroll_find_sensor_message_rear);