Commit Graph

20 Commits

Author SHA1 Message Date
Jean-Michel Trivi
32cf7ea45c Sound: VolumeSeekBarPreference must observe min vol index
The volume sliders must observe the minimum volume stream
  index, not just the maximum.

Bug: 74985293
Test: try to mute alarms through UI and fail
Change-Id: Icc5173898eb951239d02f5822239085f1ec3fc9a
2018-04-02 18:05:54 -07:00
Doris Ling
b7490bea28 Initialize the volume seekbar preference max and progress.
When the media stream is set, initialize the preference max and progress
with the streams current value. Otherwise, when we initialize the seekbar
volumizer, it will first set the seekbar max to 0 and progress to 0,
then update with the correct value, which will result in the jank that
is seen when the sound settings are displayed.

Change-Id: I515c97bbc6ec38bbe92755e3d7cb53bb13ac52d0
Fix: 34035654
Test: make RunSettingsRoboTests
2017-08-09 13:56:13 -07:00
Sheng Wang
fd1a02d914 Merge "Volume can not be updated in Sound&notification" am: c0fdbab185 am: 161e3d14e1 am: 9dbd34a3d9
am: 61a420df95

Change-Id: I0ed31e1c4e8b1a74a2aca2288876ca57f05ca79c
2017-06-02 00:57:09 +00:00
Sheng Wang
61a420df95 Merge "Volume can not be updated in Sound&notification" am: c0fdbab185 am: 161e3d14e1
am: 9dbd34a3d9

Change-Id: I50a30452b6e0162070960ffdc35197ddef785609
2017-06-02 00:27:56 +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
Sheng Wang
176ee343b4 Volume can not be updated in Sound&notification
After "onActivityPause()" is invoked and "onActivityResume()"
is invoked again, "mVolumizer" is not empty object,
so volume is not updated.

To fix this issue, set "mVolumizer" is null in "onActivityPause()",
if "onActivityResume()" is invoked again, recreate "mVolumizer"
and update volume.

Bug: 37558283

Change-Id: Id91064ea32305b5bf203f34e31988ac923beee6d
2017-04-22 13:40:21 +09:00
Fan Zhang
bfb006aa32 Use framework support to customize dividers between prefs.
Bug: 33579296
Test: make RunSettingsRoboTests
Change-Id: I1bb3b82b88dc727cda05b00058e6f40564f0e5db
2017-02-27 12:47:44 -08:00
Doris Ling
1b3ec04748 Update SoundSettings to extend DashboardFragment.
- initial round of refactoring SoundSettings to use DashboardFragment.
- add controller for Cast, Do not disturb, Alarm volume, Media volume,
  Ring volume and Notification volume.

Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: I5c02a344bff5117bfce93d7ccac650fccc82d2b0
2016-12-01 17:24:05 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jason Monk
72965ad53b Handle adjust volume user restriction
- Finish all do not disturb pages immediately
 - Disable relevant items in Sounds & notification

Bug: 21642285
Change-Id: I8de9bd10b8cea8adaa306b1ae388ab7d1ccc4e7e
2015-06-30 19:21:10 +00:00
John Spurlock
f82154de8c Settings: Follow frameworks change to volume sliders.
Bug: 21267436
Change-Id: I72c6411346429ebf428662d1c6d6d8a7529c0d67
2015-06-11 10:06:30 -04:00
John Spurlock
aaaa54ec0e Settings: Rebind to volume sliders after returning from stopped.
Bug: 18118623
Change-Id: I29fb22a1a4476639a4f5cce06affd8ce58b6105d
2014-12-08 15:20:33 -05:00
John Spurlock
c868f7035a Settings: Improve inline volume sliders.
- Track framework changes to show mute states for non-ringer streams
 - Update vibrate icon in sync with other system components.

Depends on:
  Ie2df52edb070055ef59c74039162a0e785d2fdbb

Bug: 17899613
Change-Id: Ib38c86600693e0f36fe72deb231ea751e0486af7
2014-12-01 11:58:25 -05:00
John Spurlock
04b2e7957d Settings: Restart volumizers explicitly on resume.
onBindView is no longer called in all cases, so use
onResume as an additional signal that the user returned
to the settings page.  onActivityStop is called in both
cases to cleanup.

Bug: 17461564
Change-Id: I73a6775260951d4fd82ca8c3d8eb852f8dcc7452
2014-11-26 11:08:43 -05:00
John Spurlock
fdebfc35c4 Settings: Add effects suppression text to Ring volume.
If the effects are being muted by a notification listener, display
a "Muted by <x>" msg instead of an active slider inside the
Ring/Notification volume setting pref.

Update volume pref design to optimize for this new custom appearance.

Depends on frameworks/base:
  Icdb5f85eb4bcaa1ead7d77c1460e06ad3f0604d5

Bug: 17461563
Change-Id: I6da871e16009370402451a2ff507de4762644a80
2014-11-14 14:38:03 -05:00
John Spurlock
af05fda24d Settings: Restart existing volumizers in volume prefs.
Use the new .start() method to ensure the underlying volumizer
is always started, regardless of pref activity lifecycle.

Depends on frameworks/base:
  I2f860864161f818d5a62a28331ef1c47051fb39f

Bug:17898190
Change-Id: I55dea590c13363730549aa29f194337efccdeaf7
2014-10-13 20:47:05 +00:00
Dan Sandler
cb9f35171d Switch to vibrate (or slash-bell) icon at ringer volume 0.
Bug: 16900054
Change-Id: If94a18a7cac596c0f4c33421b642f96dcf0280fd
2014-09-02 12:48:51 +02:00
Fabrice Di Meglio
dbaf080f44 Fix VolumeSeekBarPreference
- was not able to do theming and all progress was blocked to "0"
- add missing constructors

Change-Id: Iee0d14b7f6e6708290e5d7838768f7a8da934c93
2014-06-17 11:37:55 -07:00
John Spurlock
85315533a1 Settings: Performance tweaks for SeekBarVolumizer.
Bind to existing volumizer instance when possible.

Bug:15091992
Change-Id: I26248967ff85fdb7a850451336d6850e508d4f18
2014-05-27 13:12:35 -04:00
John Spurlock
81bef1d745 VolumeZen: Sound & Notifications settings.
- Add sound settings under the newly combined Sound & Notifications
  top-level settings page.
- New slider preferences for setting audio stream volumes.
- Migrate checkbox prefs to switch prefs.
- New settings subpage for touch sounds.
- New settings subpage for "Showing notifications"
- New setting pref for displaying intercepted notifications in zen mode.
- New tri-state lockscreen notifications pref.
- Add priority + sensitivity options to app notification dialog.
- Remove badges on app notifications row, migrate to subtitle text.
- Migrate strings to common spot in strings.xml
- Remove heads up setting.
- Remove tweaks category (unused).
- Clean up notification settings, separate out into a code section per option.
- Clean up _settings.xml files, prefix each pref with option name.
- Add appropriate indexing data to each settings page.

Depends on f/b change Ic30aa575ae07650cee62c8c1d83b6bc69395cf0d

Change-Id: If700385a7d0057f6c4c4bcf6e648dcf88b8ebff2
2014-05-18 15:37:09 -04:00