Commit Graph

15 Commits

Author SHA1 Message Date
John Li
8622d91973 Perform haptic feedback when the seekbar snaps.
- add haptic feedback mode to perform haptic feedback as the seekbar's progress value is updated.
- add haptic feedback mode to perform haptic feedback as the seekbar's progress value is equal to the min/max value

Bug: 172900709
Test: make -j42 RunSettingsRoboTests ROBOTEST_FILTER=SeekBarPreferenceTest
Change-Id: I9378313d366f09bb8e7069d9240fde24af318c53
2020-11-18 08:08:03 +00:00
Hugh Chen
2e5e04e79d Add a new method to set state description
- This CL add a new method setSeekBarStateDescription() to set
  the state of seek bar. Because in some case the description of
  seek bar is not align progress of seek bar.
- Add test case

Bug: 157629483
Test: make -j42 RunSettingsRoboTests
Change-Id: I432e6f9deef59756b0a41244d50aaada1ddac6a9
2020-06-05 15:00:45 +08:00
Raff Tsai
81b9f5083d Make SeekBarPreference to be selectable
Fixes: 132983200
Test: make RunSettingsRoboTests, manual
Change-Id: I3d4bc59d948236ff2482945a4fc976ee61c37c27
2019-05-21 11:39:02 +08:00
Edgar Wang
73454f2607 "Disallow adjust volume" restricted dialog didn't show
root casue: VolumeSeekBarPreference & SeekBarPreference will return
false when call isSelectable() then this preference won't perform Click

Fixes: 123745455
Test: Manual & robotest
Change-Id: Iba27b503e8a272260c80bd41aecdd5cdbc39f962
2019-04-16 09:41:07 +08:00
Raff Tsai
736eae02bd Fix talkback speaks "double tap to activate" on preference
Talkback will speak "double tap to activate" on clickable view.
But the SliderPreference is not clickable. Because it is default
clickable for Preference. We should set android:selectable in every
SliderPreference.

Change-Id: I7bf09c2a7e2d8688352e35c1882674b6e73e5db7
Fixes: 121111172
Test: Manual
2018-12-20 06:57:52 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Phil Weaver
16904e3019 Merge "Improve battery saver setting a11y semantics" into pi-dev am: 577f2af92b
am: d7d1f98fa7

Change-Id: Ic79fa7da89397c517acd3087e23d652056296e89
2018-04-26 17:57:23 -07:00
Phil Weaver
1979829294 Improve battery saver setting a11y semantics
Adding the ability to override a couple a11y traits
of the Settings version of SeekBarPreference.
Setting semantics for the battery level to report
itself as a percentage. Also tweaking the content
description to use a different title. The title isn't
exactly what I'd like, but it is better than just
saying "At 15% - 15%".

Bug: 74357845
Fixes: 78479637
Test: Used a custom accessibility service to inspect
the information coming from the battery saver seek bar.

Change-Id: I9db55cf0bb3cfee86a46d22c1208262407332d5f
2018-04-24 15:23:38 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Doris Ling
de08eaf437 Fix issue in ring volume sample not always being played.
- when we adjust the sound volme in Sound settings, we only re-post the
stop sample message when we receive the onSampleStarting callback.
However, if we change the volume while a sample is still playing,
onSampleStarting will not be called as it's already started. This
results in shortened sample duration, which in extreme case, the new
sample will not be played at all if the new volume change is made almost
towards the end of the previous sample period. So, everytime user change
the volume, we should re-post the stop sample message, so that the
sample playing duration would be extended properly.

- also removed the original calls to the onStreamValueChanged() during
init, as the original implementation is empty, and during init, we do
not need any handling to start/stop the sample.

Change-Id: I9f35ddfb6d809eeb83b1a732a09362286ff6ed77
Fixes: 77514234
Test: make RunSettingsRoboTests
2018-04-04 17:35:41 -07:00
jackqdyulei
b77fec0872 Add preference controller for battery seekbar
Also update SeekBarPreference so we can set min for it.

Bug: 72228477
Test: RunSettingsRoboTests
Change-Id: I5ab1bfd78b0bd461551012c121c7e76764843a30
2018-02-05 19:32:24 -08:00
Kevin Chyn
8b99c8cfa3 Add setShouldBlink method to get SeekBarPreference
Bug: 63642792

Test: make -j && make -j RunSettingsRoboTests
Change-Id: I92bb34282fe2b89644a3e004ec0da7d3c1f3db43
2017-07-14 22:45:01 -07:00
Philip Quinn
648ddd5c83 Add SeekBarPreference.getMax().
Bug: 63047816
Test: make -j
Change-Id: I416d044fa32f3aed32c1e6239baf9c57652bca2e
2017-07-07 03:39:40 +00:00
Fan Zhang
cbfe1eb881 Add title to SeekbarPreference content description.
Adding a title to contentDesciption of the seekbar.
The title is helpful to indicate which seekbar user is changing when
talkback is enabled.

Also move SeekBarPreference from root package to widget packge.

Change-Id: I793f41c4902e350b6bc6d62761362779cc3722a9
Fix: 35421942
Test: make RunSettingsRoboTests
2017-05-16 12:35:45 -07:00