Loading packages/SystemUI/aconfig/systemui.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -547,13 +547,6 @@ flag { } } flag { name: "haptic_volume_slider" namespace: "systemui" description: "Adds haptic feedback to the volume slider." bug: "316953430" } flag { name: "new_volume_panel" namespace: "systemui" Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.internal.jank.InteractionJankMonitor.CUJ_VOLUME_CONTROL; import static com.android.internal.jank.InteractionJankMonitor.Configuration.Builder; import static com.android.settingslib.flags.Flags.volumeDialogAudioSharingFix; import static com.android.systemui.Flags.hapticVolumeSlider; import static com.android.systemui.volume.Events.DISMISS_REASON_POSTURE_CHANGED; import static com.android.systemui.volume.Events.DISMISS_REASON_SETTINGS_CLICKED; Loading Loading @@ -928,11 +927,9 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } private void addSliderHapticsToRow(VolumeRow row) { if (hapticVolumeSlider()) { row.createPlugin(mVibratorHelper, mSystemClock); HapticSliderViewBinder.bind(row.slider, row.mHapticPlugin); } } @VisibleForTesting void addSliderHapticsToRows() { for (VolumeRow row: mRows) { Loading packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java +2 −19 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.media.AudioManager.RINGER_MODE_NORMAL; import static android.media.AudioManager.RINGER_MODE_SILENT; import static android.media.AudioManager.RINGER_MODE_VIBRATE; import static com.android.systemui.Flags.FLAG_HAPTIC_VOLUME_SLIDER; import static com.android.systemui.volume.Events.DISMISS_REASON_UNKNOWN; import static com.android.systemui.volume.Events.SHOW_REASON_UNKNOWN; import static com.android.systemui.volume.VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST; Loading Loading @@ -51,7 +50,6 @@ import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.media.AudioSystem; import android.os.SystemClock; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.provider.Settings; import android.testing.TestableLooper; Loading Loading @@ -285,23 +283,8 @@ public class VolumeDialogImplTest extends SysuiTestCase { } @Test @DisableFlags(FLAG_HAPTIC_VOLUME_SLIDER) public void addSliderHaptics_withHapticsDisabled_doesNotDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics flag is disabled and we try to add haptics to volume rows mDialog.addSliderHapticsToRows(); // WHEN haptics try to be delivered to a volume stream boolean canDeliverHaptics = mDialog.canDeliverProgressHapticsToStream(AudioSystem.STREAM_MUSIC, true, 50); // THEN the result is that haptics are not successfully delivered assertFalse(canDeliverHaptics); } @Test @EnableFlags(FLAG_HAPTIC_VOLUME_SLIDER) public void addSliderHaptics_withHapticsEnabled_canDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics flag is enabled and we try to add haptics to volume rows public void addSliderHaptics_canDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics are added to rows mDialog.addSliderHapticsToRows(); // WHEN haptics try to be delivered to a volume stream Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -547,13 +547,6 @@ flag { } } flag { name: "haptic_volume_slider" namespace: "systemui" description: "Adds haptic feedback to the volume slider." bug: "316953430" } flag { name: "new_volume_panel" namespace: "systemui" Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.internal.jank.InteractionJankMonitor.CUJ_VOLUME_CONTROL; import static com.android.internal.jank.InteractionJankMonitor.Configuration.Builder; import static com.android.settingslib.flags.Flags.volumeDialogAudioSharingFix; import static com.android.systemui.Flags.hapticVolumeSlider; import static com.android.systemui.volume.Events.DISMISS_REASON_POSTURE_CHANGED; import static com.android.systemui.volume.Events.DISMISS_REASON_SETTINGS_CLICKED; Loading Loading @@ -928,11 +927,9 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } private void addSliderHapticsToRow(VolumeRow row) { if (hapticVolumeSlider()) { row.createPlugin(mVibratorHelper, mSystemClock); HapticSliderViewBinder.bind(row.slider, row.mHapticPlugin); } } @VisibleForTesting void addSliderHapticsToRows() { for (VolumeRow row: mRows) { Loading
packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java +2 −19 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.media.AudioManager.RINGER_MODE_NORMAL; import static android.media.AudioManager.RINGER_MODE_SILENT; import static android.media.AudioManager.RINGER_MODE_VIBRATE; import static com.android.systemui.Flags.FLAG_HAPTIC_VOLUME_SLIDER; import static com.android.systemui.volume.Events.DISMISS_REASON_UNKNOWN; import static com.android.systemui.volume.Events.SHOW_REASON_UNKNOWN; import static com.android.systemui.volume.VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST; Loading Loading @@ -51,7 +50,6 @@ import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.media.AudioSystem; import android.os.SystemClock; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.provider.Settings; import android.testing.TestableLooper; Loading Loading @@ -285,23 +283,8 @@ public class VolumeDialogImplTest extends SysuiTestCase { } @Test @DisableFlags(FLAG_HAPTIC_VOLUME_SLIDER) public void addSliderHaptics_withHapticsDisabled_doesNotDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics flag is disabled and we try to add haptics to volume rows mDialog.addSliderHapticsToRows(); // WHEN haptics try to be delivered to a volume stream boolean canDeliverHaptics = mDialog.canDeliverProgressHapticsToStream(AudioSystem.STREAM_MUSIC, true, 50); // THEN the result is that haptics are not successfully delivered assertFalse(canDeliverHaptics); } @Test @EnableFlags(FLAG_HAPTIC_VOLUME_SLIDER) public void addSliderHaptics_withHapticsEnabled_canDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics flag is enabled and we try to add haptics to volume rows public void addSliderHaptics_canDeliverOnProgressChangedHaptics() { // GIVEN that the slider haptics are added to rows mDialog.addSliderHapticsToRows(); // WHEN haptics try to be delivered to a volume stream Loading