Commit Graph

3 Commits

Author SHA1 Message Date
Behnam Heydarshahi
f07e023302 Remove volume_separate_notification flag
Fully enable the feature

Bug: b/255363741, b/38477228

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="NotificationVolumePreferenceControllerTest|SeparateRingVolumePreferenceControllerTest|RingerModeAffectedPreferenceControllerTest|SoundSettingsTest" RunSettingsRoboTests -j40
Change-Id: Iec490fc254f71b6461dbf9f9beb4a11645a4a497
2023-05-15 21:19:26 +00:00
Behnam Heydarshahi
18469d2975 Ring & notif vol missing on a largescreen device
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
2023-01-11 22:14:29 +00:00
Behnam Heydarshahi
4f87dd4b56 Implement a separate controller for ring volume
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
2022-12-28 22:33:50 +00:00