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

Commit 03555961 authored by Mehdi Alizadeh's avatar Mehdi Alizadeh
Browse files

Adds a new activity for Gesture Navigation settings

Bug: 146004827
Test: WIP

Change-Id: Id2732a94e7e1469575aa8204c727379a829bccf8
parent 3f227978
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -3244,6 +3244,24 @@
                android:value="com.android.settings.gestures.GlobalActionsPanelSettings" />
        </activity>

        <activity
            android:name="Settings$GestureNavigationSettingsActivity"
            android:label="@string/gesture_settings_activity_title"
            android:enabled="true">
            <intent-filter android:priority="32">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="com.android.settings.GESTURE_NAVIGATION_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.gestures.GestureNavigationSettingsFragment" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                       android:value="true" />
        </activity>

        <!-- This is the longest AndroidManifest.xml ever. -->
    </application>
</manifest>
+3 −0
Original line number Diff line number Diff line
@@ -10237,6 +10237,9 @@
    <!-- Title for the screen to show all the gesture navigation settings [CHAR LIMIT=80] -->
    <string name="gesture_settings_activity_title">Gesture Settings</string>
    <!-- Keywords for the gesture navigation settings. [CHAR LIMIT=NONE] -->
    <string name="keywords_gesture_navigation_settings">gesture navigation, back sensitivity, back gesture</string>
    <!-- Preference and settings suggestion title text for ambient display double tap (phone) [CHAR LIMIT=60]-->
    <string name="ambient_display_title" product="default">Double-tap to check phone</string>
    <!-- Preference and settings suggestion title text for ambient display double tap (tablet) [CHAR LIMIT=60]-->
+51 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2019 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:settings="http://schemas.android.com/apk/res-auto"
    android:key="gesture_navigation_settings_page"
    android:title="@string/gesture_settings_activity_title"
    settings:keywords="@string/keywords_gesture_navigation_settings">

    <PreferenceCategory
        android:key="back_sensitivity_category"
        android:persistent="false"
        android:title="@string/back_sensitivity_dialog_title">

        <com.android.settings.gestures.GestureNavigationSeekBarPreference
            android:key="gesture_left_back_sensitivity"
            android:title="@string/left_edge"
            android:max="3"
            android:selectable="true"/>

        <com.android.settings.gestures.GestureNavigationSeekBarPreference
            android:key="gesture_right_back_sensitivity"
            android:title="@string/right_edge"
            android:max="3"
            android:selectable="true"/>
    </PreferenceCategory>

    <com.android.settingslib.widget.FooterPreference
        android:key="gesture_navigation_settings_footer"
        android:title="@string/back_sensitivity_dialog_message"
        android:selectable="false"
        settings:searchable="false"
        settings:allowDividerAbove="true"/>
</PreferenceScreen>
+1 −0
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ public class Settings extends SettingsActivity {
    public static class PhotosStorageActivity extends SettingsActivity {
        /* empty */
    }
    public static class GestureNavigationSettingsActivity extends SettingsActivity { /* empty */ }

    public static class ApnSettingsActivity extends SettingsActivity { /* empty */ }
    public static class WifiCallingSettingsActivity extends SettingsActivity { /* empty */ }
+3 −1
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ import com.android.settings.gestures.AssistGestureSettings;
import com.android.settings.gestures.DoubleTapPowerSettings;
import com.android.settings.gestures.DoubleTapScreenSettings;
import com.android.settings.gestures.DoubleTwistGestureSettings;
import com.android.settings.gestures.GestureNavigationSettingsFragment;
import com.android.settings.gestures.GlobalActionsPanelSettings;
import com.android.settings.gestures.PickupGestureSettings;
import com.android.settings.gestures.SwipeToNotificationSettings;
@@ -289,7 +290,8 @@ public class SettingsGateway {
            MobileNetworkListFragment.class.getName(),
            GlobalActionsPanelSettings.class.getName(),
            DarkModeSettingsFragment.class.getName(),
            BugReportHandlerPicker.class.getName()
            BugReportHandlerPicker.class.getName(),
            GestureNavigationSettingsFragment.class.getName()
    };

    public static final String[] SETTINGS_FOR_RESTRICTED = {
Loading