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

Commit 141b5bb3 authored by Lais Andrade's avatar Lais Andrade
Browse files

Update Settings to use intensity settings as main preference keys

Updating the Settings app to allow setting the value off for key
HAPTIC_FEEDBACK_INTENSITY. This setting state is also copied onto
HAPTIC_FEEDBACK_ENABLED setting, so both should be in sync after this
change.

Similar logic is applied between RING_VIBRATION_INTENSITY and
VIBRATE_WHEN_RINGING.

This will not disable the hardware feedback since that one is controlled
by a separate setting key now.

The "vibrate for calls" was also removed and the single toggle for
"vibrate first then ring gradually" was moved into the "Vibration &
haptics" page.

Bug: 185351540
Test: [HapticFeedback|NotificationVibration|RingVibration][Intensity|Toggle]PreferenceControllerTest
      and manual testing of the AOSP settings app
Change-Id: I9c94cef331a1500a1272a601ba32667ca995ddab
parent 085aadb7
Loading
Loading
Loading
Loading
+5 −28
Original line number Diff line number Diff line
@@ -5565,8 +5565,10 @@
    <string name="accessibility_autoclick_longer_desc">Longer</string>
    <!-- Description for the seekbar that adjust auto click time. [CHAR_LIMIT=NONE] -->
    <string name="accessibility_autoclick_seekbar_desc">Auto click time</string>
    <!-- Title for accessibility preference screen for configuring vibrations. -->
    <!-- Title for preference screen for configuring vibrations. [CHAR LIMIT=NONE] -->
    <string name="accessibility_vibration_settings_title">Vibration &amp; haptics</string>
    <!-- Summary for preference screen for configuring vibrations. [CHAR LIMIT=NONE] -->
    <string name="accessibility_vibration_settings_summary">Control the vibration strength for different usages</string>
    <!-- Title for the category of preferences to configure device vibrations related to calls. [CHAR LIMIT=NONE] -->
    <string name="accessibility_call_vibration_category_title">Calls</string>
    <!-- Title for the category of preferences to configure device vibrations related to notifications and alarms. [CHAR LIMIT=NONE] -->
@@ -5734,33 +5736,6 @@
        <item quantity="other"><xliff:g id="click_delay_label">%1$s</xliff:g> seconds</item>
    </plurals>
    <!-- Summary for vibration settings preference when notification vibration and haptic feedback intensity are set. [CHAR LIMIT=50] -->
    <string name="accessibility_vibration_summary">Ring <xliff:g id="summary_ring" example="Medium">%1$s</xliff:g>, notification <xliff:g id="summary_notification" example="Low">%2$s</xliff:g>, touch <xliff:g id="summary_touch" example="High">%3$s</xliff:g></string>
    <!-- Summary for vibration settings preference when ring & notification are set to off-->
    <string name="accessibility_vibration_summary_off">Ring &amp; notification set to off</string>
    <!-- Summary for vibration settings preference when ring & notification are set to low-->
    <string name="accessibility_vibration_summary_low">Ring &amp; notification set to low</string>
    <!-- Summary for vibration settings preference when ring & notification are set to medium-->
    <string name="accessibility_vibration_summary_medium">Ring &amp; notification set to medium</string>
    <!-- Summary for vibration settings preference when ring & notification are set to high-->
    <string name="accessibility_vibration_summary_high">Ring &amp; notification set to high</string>
    <!-- Label describing an option turning vibrations off. [CHAR LIMIT=15] -->
    <string name="accessibility_vibration_intensity_off">Off</string>
    <!-- Label describing a low intensity vibration option. [CHAR LIMIT=15] -->
    <string name="accessibility_vibration_intensity_low">Low</string>
    <!-- Label describing a medium intensity vibration option. [CHAR LIMIT=15] -->
    <string name="accessibility_vibration_intensity_medium">Medium</string>
    <!-- Label describing a high intensity vibration option. [CHAR LIMIT=15] -->
    <string name="accessibility_vibration_intensity_high">High</string>
    <!-- Title for accessibility menu item to launch a settings activity. [CHAR LIMIT=15] -->
    <string name="accessibility_menu_item_settings">Settings</string>
@@ -8425,6 +8400,8 @@
    <string name="keywords_touch_vibration">haptics, vibrate, screen, sensitivity</string>
    <!-- List of synonyms for ring vibration setting (changes whether your phone vibrates when it rings), used to match in settings search [CHAR LIMIT=NONE] -->
    <string name="keywords_ring_vibration">haptics, vibrate, phone, call, sensitivity, ring</string>
    <!-- List of synonyms for ring vibration setting (changes whether your phone vibrates when it rings), used to match in settings search [CHAR LIMIT=NONE] -->
    <string name="keywords_ramping_ringer_vibration">haptics, vibrate, phone, call, ring, gradually</string>
    <!-- List of synonyms for notification vibration setting (changes whether your phone vibrates when it shows a notification), used to match in settings search [CHAR LIMIT=NONE] -->
    <string name="keywords_notification_vibration">haptics, vibrate, sensitivity</string>
    <!-- List of synonyms for vibration and haptics setting, used to match in settings search [CHAR LIMIT=NONE] -->
+0 −20
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.
  -->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/accessibility_notification_vibration_title" />
+0 −20
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.
  -->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/accessibility_ring_vibration_title" />
+2 −1
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@
            android:persistent="false"
            android:title="@string/accessibility_vibration_settings_title"
            settings:controller="com.android.settings.accessibility.VibrationPreferenceController"
            settings:keywords="@string/keywords_vibration"/>
            settings:keywords="@string/keywords_vibration"
            android:summary="@string/accessibility_vibration_settings_summary"/>

    </PreferenceCategory>

+0 −20
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.
  -->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/accessibility_touch_vibration_title" />
Loading