diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java | 1 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java index b08b26d77b76..275402651079 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java @@ -49,7 +49,6 @@ import com.android.internal.annotations.GuardedBy; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.SysUiServiceProvider; -import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.plugins.VolumeDialogController; import com.android.systemui.qs.tiles.DndTile; diff --git a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java b/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java index d28e42e61f29..474085c720bc 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java @@ -29,6 +29,8 @@ import com.android.systemui.volume.VolumeDialogControllerImpl; /** * A volume dialog controller for the automotive use case. + * TODO(hwwang): consider removing this class since it's coupled with stream_type and we are + * moving to use AudioAttributes usage for volume control in a car. * * {@link android.car.media.CarAudioManager} is the source of truth to get the stream volumes. * And volume changes should be sent to the car's audio module instead of the android's audio mixer. @@ -70,7 +72,7 @@ public class CarVolumeDialogController extends VolumeDialogControllerImpl { return; } try { - mCarAudioManager.setStreamVolume(stream, level, flag); + mCarAudioManager.setUsageVolume(stream, level, flag); } catch (CarNotConnectedException e) { Log.e(TAG, "Car is not connected", e); } @@ -84,7 +86,7 @@ public class CarVolumeDialogController extends VolumeDialogControllerImpl { } try { - return mCarAudioManager.getStreamVolume(stream); + return mCarAudioManager.getUsageVolume(stream); } catch (CarNotConnectedException e) { Log.e(TAG, "Car is not connected", e); return 0; @@ -99,7 +101,7 @@ public class CarVolumeDialogController extends VolumeDialogControllerImpl { } try { - return mCarAudioManager.getStreamMaxVolume(stream); + return mCarAudioManager.getUsageMaxVolume(stream); } catch (CarNotConnectedException e) { Log.e(TAG, "Car is not connected", e); return 0; @@ -114,7 +116,7 @@ public class CarVolumeDialogController extends VolumeDialogControllerImpl { } try { - return mCarAudioManager.getStreamMinVolume(stream); + return mCarAudioManager.getUsageMinVolume(stream); } catch (CarNotConnectedException e) { Log.e(TAG, "Car is not connected", e); return 0; |