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
This commit is contained in:
@@ -27,11 +27,9 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.DeviceConfig;
|
||||
import android.service.notification.NotificationListenerService;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.testutils.shadow.ShadowDeviceConfig;
|
||||
|
||||
@@ -83,9 +81,6 @@ public class RingVolumePreferenceControllerTest {
|
||||
when(mContext.getResources()).thenReturn(mResources);
|
||||
mController = new RingVolumePreferenceController(mContext);
|
||||
mController.setAudioHelper(mHelper);
|
||||
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "false", false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -110,7 +105,6 @@ public class RingVolumePreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void isAvailable_notSingleVolume_VoiceCapable_shouldReturnTrue() {
|
||||
|
||||
when(mHelper.isSingleVolume()).thenReturn(false);
|
||||
when(mTelephonyManager.isVoiceCapable()).thenReturn(true);
|
||||
|
||||
@@ -139,10 +133,6 @@ public class RingVolumePreferenceControllerTest {
|
||||
*/
|
||||
@Test
|
||||
public void ringNotificationStreamsSeparate_controllerIsNotAvailable() {
|
||||
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "true", false);
|
||||
|
||||
final RingVolumePreferenceController controller =
|
||||
new RingVolumePreferenceController(mContext);
|
||||
|
||||
@@ -153,58 +143,19 @@ public class RingVolumePreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintsRing_aliased_Matches() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "false", false);
|
||||
|
||||
|
||||
public void setHintsRing_Matches() {
|
||||
assertThat(mController.hintsMatch(
|
||||
NotificationListenerService.HINT_HOST_DISABLE_CALL_EFFECTS)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintsRingNotification_aliased_Matches() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "false", false);
|
||||
|
||||
public void setHintsRingNotification_Matches() {
|
||||
assertThat(mController.hintsMatch(NotificationListenerService.HINT_HOST_DISABLE_EFFECTS))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintNotification_aliased_Matches() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "false", false);
|
||||
|
||||
|
||||
assertThat(mController
|
||||
.hintsMatch(NotificationListenerService.HINT_HOST_DISABLE_NOTIFICATION_EFFECTS))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintsRing_unaliased_Matches() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "true", false);
|
||||
|
||||
assertThat(mController.hintsMatch(
|
||||
NotificationListenerService.HINT_HOST_DISABLE_CALL_EFFECTS)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintsRingNotification_unaliased_Matches() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "true", false);
|
||||
|
||||
assertThat(mController.hintsMatch(NotificationListenerService.HINT_HOST_DISABLE_EFFECTS))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setHintNotification_unaliased_doesNotMatch() {
|
||||
DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, "true", false);
|
||||
|
||||
public void setHintNotification_doesNotMatch() {
|
||||
assertThat(mController
|
||||
.hintsMatch(NotificationListenerService.HINT_HOST_DISABLE_NOTIFICATION_EFFECTS))
|
||||
.isFalse();
|
||||
|
Reference in New Issue
Block a user