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

Unverified Commit a1c95410 authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Michael Bestas
Browse files

Settings: gestures: Add page for Screen-Off UDFPS

Change-Id: I313969384fe605d7b5ff7dfc3a3fcebd514dd7cf
parent b3a5bc2e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -162,4 +162,13 @@
    <!-- FastCharge feature -->
    <string name="fast_charging_title">Fast charging</string>
    <string name="fast_charging_summary">Disable to reduce the heat produced by the device while charging or to extend the lifespan of the battery</string>

    <!-- Preference and settings suggestion title text for screen off UDFPS (phone) [CHAR LIMIT=60]-->
    <string name="ambient_display_screen_off_udfps_title" product="default">Long press on fingerprint sensor to unlock phone</string>
    <!-- Preference and settings suggestion title text for screen off UDFPS  (tablet) [CHAR LIMIT=60]-->
    <string name="ambient_display_screen_off_udfps_title" product="tablet">Long press on fingerprint sensor to unlock tablet</string>
    <!-- Preference and settings suggestion title text for screen off UDFPS  (device) [CHAR LIMIT=60]-->
    <string name="ambient_display_screen_off_udfps_title" product="device">Long press on fingerprint sensor to unlock device</string>
    <!-- Summary text for screen off UDFPS [CHAR LIMIT=NONE]-->
    <string name="ambient_display_screen_off_udfps_summary">To wake up your screen and unlock, long press your under-display fingerprint sensor.</string>
</resources>
+7 −0
Original line number Diff line number Diff line
@@ -94,6 +94,13 @@
        settings:searchable="false"
        settings:controller="com.android.settings.gestures.PickupGesturePreferenceController" />

    <Preference
        android:key="gesture_screen_off_udfps_input_summary"
        android:title="@string/ambient_display_screen_off_udfps_title"
        android:fragment="com.android.settings.gestures.ScreenOffUdfpsSettings"
        settings:searchable="false"
        settings:controller="com.android.settings.gestures.ScreenOffUdfpsPreferenceController" />

    <Preference
        android:key="gesture_power_menu_summary"
        android:title="@string/power_menu_setting_name"
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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.
-->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:title="@string/ambient_display_screen_off_udfps_title">

    <SwitchPreference
        android:key="gesture_screen_off_udfps"
        android:title="@string/ambient_display_screen_off_udfps_title"
        android:summary="@string/ambient_display_screen_off_udfps_summary"
        app:keywords="@string/keywords_gesture"
        app:controller="com.android.settings.gestures.ScreenOffUdfpsPreferenceController"
        app:allowDividerAbove="true" />

</PreferenceScreen>
+7 −0
Original line number Diff line number Diff line
@@ -116,6 +116,13 @@
            settings:searchable="false"
            settings:controller="com.android.settings.gestures.PickupGesturePreferenceController" />

        <Preference
            android:key="gesture_screen_off_udfps_input_summary"
            android:title="@string/ambient_display_screen_off_udfps_title"
            android:fragment="com.android.settings.gestures.ScreenOffUdfpsSettings"
            settings:searchable="false"
            settings:controller="com.android.settings.gestures.ScreenOffUdfpsPreferenceController" />

        <SwitchPreference
            android:key="ambient_display_notification"
            android:title="@string/doze_title"
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class GestureSettings extends DashboardFragment {
        use(AssistGestureSettingsPreferenceController.class).setAssistOnly(false);
        use(PickupGesturePreferenceController.class).setConfig(getConfig(context));
        use(DoubleTapScreenPreferenceController.class).setConfig(getConfig(context));
        use(ScreenOffUdfpsPreferenceController.class).setConfig(getConfig(context));
    }

    private AmbientDisplayConfiguration getConfig(Context context) {
Loading