With volume_separate_notification flag enbaled, muting ring volume
slice will cause notification volume slice to gray out.
There used to be a bug in which notification slice would not get
updated in response to a change in ring volume mute/unmute broadcast.
The resulting erroneous behavior was notification slider would get to
zero but not get grayed out. To fix that bug, VolumeSliceHelper listens
to ring stream mute/unmute broadcasts and forwards them to notification
slice.
Bug: b/266072907
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="NotificationVolumePreferenceControllerTest|VolumeSliceHelperTest" RunSettingsRoboTests -j40
Change-Id: I2ab51f1272bf99a0c3d9ca285354052d00910c90
Before:
"Ring & notification volume" showed up in volume panel and in volume
settings.
Now (what prompted this bugreport):
A device config was changed to mark it not voice capable.
"Ring & notification volume" disappeared from both places;
"Notification volume" showed up only in volume settings, not panel.
Fix: the voice capable should not be a factor when determining
availability for ring/notification slices.
After this fix is applied:
"Ring & notification volume" to reappear at both settings and panel.
Bug: 256548882
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="VolumePanelTest|RingVolumePreferenceControllerTest|NotificationVolumePreferenceControllerTest|SeparateRingVolumePreferenceController" RunSettingsRoboTests -j40
Change-Id: Ie2b1913bde6a64303c4d9fde3724889f949c363b
Problem:
Exception thrown when maps was in PIP mode.
Solution:
Use Binder to give permission to Settings reading device config
SEPARATE_VOLUME_NOTIFICATION.
Bug: 261809910
Test: Manual. (from bug report) Launch Maps and navigate to a place.
Minimize maps app. Open Settings. Should open normally and not crash.
Change-Id: I38735ebc7d555ead54e3aa77b50e4a7077fe452b
When ring volume is separated from notification, a new xml preferece and
controller is needed for it, so that the settings search can show/hide
the slice correctly.
1. Use a separate preference and controller for ring volume (vs ring &
notification combined)
2. Notification slice in settings no longer grays out when ringer mode
is set to mute or vibrate.
3. Introduce an abstract RingerModeAffected preference controller class
to factor out duplicate code among ring, notification, and separate-ring
controller classes.
Bug: b/259084354
Test: make ROBOTEST_FILTER=RingVolumePreferenceControllerTest
RunSettingsRoboTests -j40
make ROBOTEST_FILTER=SeparateRingVolumePreferenceControllerTest
RunSettingsRoboTests -j40
make ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest
RunSettingsRoboTests -j40
make ROBOTEST_FILTER=VolumePanelTest RunSettingsRoboTests -j40
make
ROBOTEST_FILTER=RingerModeAffectedVolumePreferenceControllerTest -j40
Known Issue:
1. When streams are separate and ring volume set to mute/vibrate,
notification is set to zero, but not disabled. So it can be turned on
by user (and in settings the icon will stay mute/vibrate instead of
changing to the normal notification icon).
2. In the above scenario after notification is unmuted in settings,
the notification icon continues to stay vibrate/mute -- should change
to the normal notification icon.
Note: This feature is controlled using a boolean DeviceConfig flag:
systemui/"volume_separate_ring". The default value is 'false', which is
meant to keep the experience the same as before. It will be set to
'true' for teamfood and dogfood. Eventually the flag will be removed and
the code in the 'true' branch will prevail.
Change-Id: Ibec871eafeef4081e96c5e0dd04535565d50a077
Replace the build-time boolean resource with a run time device config flag that
signals whether the ring notification slider should be displayed or not
Bug: b/38477228
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest RunSettingsRoboTests -j40
make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=RingVolumePreferenceControllerTest RunSettingsRoboTests -j40
Change-Id: I8b9a2cbd5af7fa1bba56ff9ba62771d677d4a932
Separate notification and ring controllers based on the ring/volume
stream alias boolean in config.xml.
For both ring and volume controller: Not show vibrate icon when vibration is not supported on device. Show
silent icon instead.
Known issue: Add the notification volume slider only in Settings, and
not in VolumePanelDialog. When the alias is set to false and the streams
separated, the ring volume slider in VolumePanelDialog keeps its title
of "Ring & notification volume" instead of changing to "Ring volume".
Bug: b/38477228
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest RunSettingsRoboTests -j40
make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=RingVolumePreferenceControllerTest RunSettingsRoboTests -j40
make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=SoundSettingsTest RunSettingsRoboTests
Change-Id: Id17523f49b291a5cf612b90f93c3b2ab6486c62f
Only PreferenceControllers with isPublicSlice() set to true are exposed
to other apps. Others will be Settings only.
Bug: 141088937
Test: robotests
Change-Id: I6e7b9d45084ea9944143e606bfac56b2cae3e8a3
In several places we were referencing private icons from
frameworks/base/core instead of versions we already had in
settings. Also add in a "media stream off" icon to match the one we
already had for "media stream on".
Bug: 77982107
Test: manual (Settings->Sound, then use hardware controls to modify
media and ring volumes)
Change-Id: I3a1d808b3028bb4f2feae4536194dc58c3177a66
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.
Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.
Test: robotests
Change-Id: I85848c2cdf3e151fa94b33dd1dc5c0374ef94b5b
Merged-In: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Fixes: 79779103
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.
The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.
Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.
Bug: 78910582
Fixes: 79245656
Test: robotests
Change-Id: I42c2cedab66be2d76999795f46470a079cc1ec71
Merged-In: I58821a6cfd6134b3b351657b6edf5f74ead00643
This adds the following 7 new boolean flags:
config_show_alarm_volume
config_show_charging_sounds
config_show_media_volume
config_show_notification_ringtone
config_show_notification_volume
config_show_screen_locking_sounds
config_show_touch_sounds
Which when set to false, will hide the respective preferences in Sounds
page.
Bug: 69813881
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.notification all pass.
Change-Id: I84a2ce66b07c00d658422ce1a0eacaf9a01fae8a
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.
Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
&& make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
- 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