Commit Graph

9 Commits

Author SHA1 Message Date
Chun-Ku Lin
bbb2f96af3 [Flag cleanup] remove separate_accessibility_vibration_settings_fragments
This bug fix associated with this flag is low risk. The flag has been
soaked in the Trunkfood full for 30 days and tested by 1000+ users.
Based on the flag cleanup policy, we can clean up the flag.

Bug: 289967175
Flag: EXEMPT flag cleanup
Test: Run the Settings app and can still see the vibration & haptics
screen

Change-Id: I39890a33f04b53565461ae2c6c4e63b94f205e6d
2024-04-10 19:27:55 +00:00
Daniel Norman
35265e838f Fix missing declared accessibility PreferenceControllers.
This includes 3 fixes:

Adds missing settings:controller attribute for bold & high-contrast
text preferences.

Separates VibrationSettings into two fragments, one per fragment XML resource.
  Instead of using a conditional to choose the XML resource ID,
  we now use the conditional to choose which fragment to launch.
  This allows both fragment's preference controllers to be inspected
  by CodeInspectionTest#runSliceControllerInXmlInspection.
  Also updates the preference keys which must be unique per XML in order
  to appear in Settings Search.

Adds Magnification preference controllers to exempt-not-in-XML list.
  These controllers are for fragments that are not declared in an XML.
  See ToggleScreenMagnificationPreferenceFragment
        #getPreferenceScreenResId.

Bug: 289967175
Test: atest SettingsRoboTests:com.android.settings.accessibility
Test: atest CodeInspectionTest#runSliceControllerInXmlInspection;
      Observe no errors in the accessibility package.
Test: Open Settings > Accessibility > Vibration & haptics;
      observe vibration intensity page is shown (behavior unchanged).
      Hardcode config_vibration_supported_intensity_levels=1;
      observe vibration page with toggles is shown (behavior unchanged).
Change-Id: I257b5ad390371bedb1623af6289016b06d478707
2023-10-02 18:00:30 +00:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
2022-08-26 00:07:08 +00:00
Lais Andrade
cc8790f7b3 Create separate On/Off string resources for Vibration & haptics
Some translators need to be able to adapt the text for On/Off preference
state to match the preference title "Vibration & haptics", which
requires a different inflection and plural form on some languages.

This change separates this resource string from the more generic one
that was used before to allow this flexible translation.

Fix: 228342641
Fix: 229060423
Test: VibrationPreferenceControllerTest
Change-Id: Ib46b3e0d0a980ff57e91f55c73348c440327bad7
2022-04-25 17:15:39 +01:00
Lais Andrade
68d7b91bb1 Add summary to "Vibration & haptics" settings
Use VIBRATE_ON main toggle to display on/off state as summary for
"Vibration & haptics" settings provider.

Fix: 220218654
Test: VibrationPreferenceControllerTest
Change-Id: Ifd4b9c7b1cb68ad0ea535091804a1e7f54297c44
2022-03-23 12:14:52 +00:00
Lais Andrade
dbcdd2bf46 Add VibrationPreferenceControler to check availability
Add check to Vibrator.hasVibrator() to the "Vibration & haptics"
settings page.

Bug: 178530831
Test: VibrationPreferenceControllerTest
Change-Id: Ia574d59ad086dd273a9a4ca9d3b472bf23e3684a
2022-01-24 15:45:13 +00:00
Lais Andrade
141b5bb3bc 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
2022-01-12 22:59:29 +00:00
Mill Chen
5aa742bc00 Separate vibration preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: Ic309fd69b68bfa1c3290a696e0987de2621f6dc4
2019-06-28 11:38:13 +08:00