Loading core/java/android/preference/SeekBarVolumizer.java +4 −17 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.preference.VolumePreference.VolumeStore; import android.provider.DeviceConfig; import android.provider.Settings; import android.provider.Settings.Global; import android.provider.Settings.System; Loading @@ -47,7 +46,6 @@ import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import com.android.internal.annotations.GuardedBy; import com.android.internal.config.sysui.SystemUiDeviceConfigFlags; import com.android.internal.os.SomeArgs; import java.util.concurrent.TimeUnit; Loading Loading @@ -295,14 +293,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (zenMuted) { mSeekBar.setProgress(mLastAudibleStreamVolume, true); } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { /** * the first variable above is preserved and the conditions below are made explicit * so that when user attempts to slide the notification seekbar out of vibrate the * seekbar doesn't wrongly snap back to 0 when the streams aren't aliased */ if (!DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) || mStreamType == AudioManager.STREAM_RING // For ringer-mode affected streams, show volume as zero when ringermode is vibrate if (mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } Loading Loading @@ -397,9 +389,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba // set the time of stop volume if ((mStreamType == AudioManager.STREAM_VOICE_CALL || mStreamType == AudioManager.STREAM_RING || (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_NOTIFICATION || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -686,10 +676,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba } private void updateVolumeSlider(int streamType, int streamValue) { final boolean streamMatch = !DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) && mNotificationOrRing ? isNotificationOrRing(streamType) : streamType == mStreamType; final boolean streamMatch = (streamType == mStreamType); if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) || streamValue == 0; Loading core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java +0 −5 Original line number Diff line number Diff line Loading @@ -548,11 +548,6 @@ public final class SystemUiDeviceConfigFlags { public static final String TASK_MANAGER_INFORM_JOB_SCHEDULER_OF_PENDING_APP_STOP = "task_manager_inform_job_scheduler_of_pending_app_stop"; /** * (boolean) Whether to show notification volume control slider separate from ring. */ public static final String VOLUME_SEPARATE_NOTIFICATION = "volume_separate_notification"; /** * (boolean) Whether widget provider info would be saved to / loaded from system persistence * layer as opposed to individual manifests in respective apps. Loading packages/SystemUI/res/layout/volume_ringer_drawer.xml +2 −2 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ android:layout_height="@dimen/volume_ringer_drawer_icon_size" android:layout_gravity="center" android:tint="?android:attr/textColorPrimary" android:src="@drawable/ic_volume_ringer_mute" /> android:src="@drawable/ic_speaker_mute" /> </FrameLayout> Loading @@ -102,7 +102,7 @@ android:layout_height="@dimen/volume_ringer_drawer_icon_size" android:layout_gravity="center" android:tint="?android:attr/textColorPrimary" android:src="@drawable/ic_volume_ringer" /> android:src="@drawable/ic_speaker_on" /> </FrameLayout> Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +12 −87 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import android.os.Message; import android.os.SystemClock; import android.os.Trace; import android.os.VibrationEffect; import android.provider.DeviceConfig; import android.provider.Settings; import android.provider.Settings.Global; import android.text.InputFilter; Loading Loading @@ -113,7 +112,6 @@ import androidx.annotation.Nullable; import com.android.app.animation.Interpolators; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.config.sysui.SystemUiDeviceConfigFlags; import com.android.internal.graphics.drawable.BackgroundBlurDrawable; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.view.RotationPolicy; Loading @@ -133,15 +131,11 @@ import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DevicePostureController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.AlphaTintDrawableWrapper; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.util.RoundedCornerProgressDrawable; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; /** Loading Loading @@ -198,9 +192,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private ViewGroup mDialogRowsView; private ViewGroup mRinger; private DeviceConfigProxy mDeviceConfigProxy; private Executor mExecutor; /** * Container for the top part of the dialog, which contains the ringer, the ringer drawer, the * volume rows, and the ellipsis button. This does not include the live caption button. Loading Loading @@ -290,14 +281,12 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private BackgroundBlurDrawable mDialogRowsViewBackground; private final InteractionJankMonitor mInteractionJankMonitor; private boolean mSeparateNotification; private int mWindowGravity; @VisibleForTesting int mVolumeRingerIconDrawableId; final int mVolumeRingerIconDrawableId = R.drawable.ic_speaker_on; @VisibleForTesting int mVolumeRingerMuteIconDrawableId; final int mVolumeRingerMuteIconDrawableId = R.drawable.ic_speaker_mute; private int mOriginalGravity; private final DevicePostureController.Callback mDevicePostureControllerCallback; Loading @@ -315,8 +304,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, VolumePanelFactory volumePanelFactory, ActivityStarter activityStarter, InteractionJankMonitor interactionJankMonitor, DeviceConfigProxy deviceConfigProxy, Executor executor, CsdWarningDialog.Factory csdWarningDialogFactory, DevicePostureController devicePostureController, Looper looper, Loading Loading @@ -374,12 +361,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } else { mDevicePostureControllerCallback = null; } mDeviceConfigProxy = deviceConfigProxy; mExecutor = executor; mSeparateNotification = mDeviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false); updateRingerModeIconSet(); } /** Loading @@ -401,44 +382,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, return mWindowGravity; } /** * If ringer and notification are the same stream (T and earlier), use notification-like bell * icon set. * If ringer and notification are separated, then use generic speaker icons. */ private void updateRingerModeIconSet() { if (mSeparateNotification) { mVolumeRingerIconDrawableId = R.drawable.ic_speaker_on; mVolumeRingerMuteIconDrawableId = R.drawable.ic_speaker_mute; } else { mVolumeRingerIconDrawableId = R.drawable.ic_volume_ringer; mVolumeRingerMuteIconDrawableId = R.drawable.ic_volume_ringer_mute; } if (mRingerDrawerMuteIcon != null) { mRingerDrawerMuteIcon.setImageResource(mVolumeRingerMuteIconDrawableId); } if (mRingerDrawerNormalIcon != null) { mRingerDrawerNormalIcon.setImageResource(mVolumeRingerIconDrawableId); } } /** * Change icon for ring stream (not ringer mode icon) */ private void updateRingRowIcon() { Optional<VolumeRow> volumeRow = mRows.stream().filter(row -> row.stream == STREAM_RING) .findFirst(); if (volumeRow.isPresent()) { VolumeRow volRow = volumeRow.get(); volRow.iconRes = mSeparateNotification ? R.drawable.ic_ring_volume : R.drawable.ic_volume_ringer; volRow.iconMuteRes = mSeparateNotification ? R.drawable.ic_ring_volume_off : R.drawable.ic_volume_ringer_mute; volRow.setIcon(volRow.iconRes, mContext.getTheme()); } } @Override public void onUiModeChanged() { mContext.getTheme().applyStyle(mContext.getThemeResId(), true); Loading @@ -454,9 +397,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mConfigurationController.addCallback(this); mDeviceConfigProxy.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, mExecutor, this::onDeviceConfigChange); if (mDevicePostureController != null) { mDevicePostureController.addCallback(mDevicePostureControllerCallback); } Loading @@ -467,28 +407,11 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mController.removeCallback(mControllerCallbackH); mHandler.removeCallbacksAndMessages(null); mConfigurationController.removeCallback(this); mDeviceConfigProxy.removeOnPropertiesChangedListener(this::onDeviceConfigChange); if (mDevicePostureController != null) { mDevicePostureController.removeCallback(mDevicePostureControllerCallback); } } /** * Update ringer mode icon based on the config */ private void onDeviceConfigChange(DeviceConfig.Properties properties) { Set<String> changeSet = properties.getKeyset(); if (changeSet.contains(SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION)) { boolean newVal = properties.getBoolean( SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false); if (newVal != mSeparateNotification) { mSeparateNotification = newVal; updateRingerModeIconSet(); updateRingRowIcon(); } } } @Override public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo internalInsetsInfo) { // Set touchable region insets on the root dialog view. This tells WindowManager that Loading Loading @@ -699,7 +622,12 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mRingerDrawerNormalIcon = mDialog.findViewById(R.id.volume_drawer_normal_icon); mRingerDrawerNewSelectionBg = mDialog.findViewById(R.id.volume_drawer_selection_background); updateRingerModeIconSet(); if (mRingerDrawerMuteIcon != null) { mRingerDrawerMuteIcon.setImageResource(mVolumeRingerMuteIconDrawableId); } if (mRingerDrawerNormalIcon != null) { mRingerDrawerNormalIcon.setImageResource(mVolumeRingerIconDrawableId); } setupRingerDrawer(); Loading @@ -724,13 +652,10 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, addRow(AudioManager.STREAM_MUSIC, R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true, true); if (!AudioSystem.isSingleVolume(mContext)) { if (mSeparateNotification) { addRow(AudioManager.STREAM_RING, R.drawable.ic_ring_volume, R.drawable.ic_ring_volume_off, true, false); } else { addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer, true, false); } addRow(STREAM_ALARM, R.drawable.ic_alarm, R.drawable.ic_volume_alarm_mute, true, false); Loading packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java +0 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.media.AudioManager; import android.os.Looper; import com.android.internal.jank.InteractionJankMonitor; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.media.dialog.MediaOutputDialogFactory; import com.android.systemui.plugins.ActivityStarter; Loading @@ -31,7 +30,6 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DevicePostureController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.volume.CsdWarningDialog; import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeDialogComponent; Loading @@ -42,8 +40,6 @@ import dagger.Binds; import dagger.Module; import dagger.Provides; import java.util.concurrent.Executor; /** Dagger Module for code in the volume package. */ @Module public interface VolumeModule { Loading @@ -63,8 +59,6 @@ public interface VolumeModule { VolumePanelFactory volumePanelFactory, ActivityStarter activityStarter, InteractionJankMonitor interactionJankMonitor, DeviceConfigProxy deviceConfigProxy, @Main Executor executor, CsdWarningDialog.Factory csdFactory, DevicePostureController devicePostureController, DumpManager dumpManager) { Loading @@ -78,8 +72,6 @@ public interface VolumeModule { volumePanelFactory, activityStarter, interactionJankMonitor, deviceConfigProxy, executor, csdFactory, devicePostureController, Looper.getMainLooper(), Loading Loading
core/java/android/preference/SeekBarVolumizer.java +4 −17 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.preference.VolumePreference.VolumeStore; import android.provider.DeviceConfig; import android.provider.Settings; import android.provider.Settings.Global; import android.provider.Settings.System; Loading @@ -47,7 +46,6 @@ import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import com.android.internal.annotations.GuardedBy; import com.android.internal.config.sysui.SystemUiDeviceConfigFlags; import com.android.internal.os.SomeArgs; import java.util.concurrent.TimeUnit; Loading Loading @@ -295,14 +293,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (zenMuted) { mSeekBar.setProgress(mLastAudibleStreamVolume, true); } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { /** * the first variable above is preserved and the conditions below are made explicit * so that when user attempts to slide the notification seekbar out of vibrate the * seekbar doesn't wrongly snap back to 0 when the streams aren't aliased */ if (!DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) || mStreamType == AudioManager.STREAM_RING // For ringer-mode affected streams, show volume as zero when ringermode is vibrate if (mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } Loading Loading @@ -397,9 +389,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba // set the time of stop volume if ((mStreamType == AudioManager.STREAM_VOICE_CALL || mStreamType == AudioManager.STREAM_RING || (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_NOTIFICATION || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -686,10 +676,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba } private void updateVolumeSlider(int streamType, int streamValue) { final boolean streamMatch = !DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false) && mNotificationOrRing ? isNotificationOrRing(streamType) : streamType == mStreamType; final boolean streamMatch = (streamType == mStreamType); if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) || streamValue == 0; Loading
core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java +0 −5 Original line number Diff line number Diff line Loading @@ -548,11 +548,6 @@ public final class SystemUiDeviceConfigFlags { public static final String TASK_MANAGER_INFORM_JOB_SCHEDULER_OF_PENDING_APP_STOP = "task_manager_inform_job_scheduler_of_pending_app_stop"; /** * (boolean) Whether to show notification volume control slider separate from ring. */ public static final String VOLUME_SEPARATE_NOTIFICATION = "volume_separate_notification"; /** * (boolean) Whether widget provider info would be saved to / loaded from system persistence * layer as opposed to individual manifests in respective apps. Loading
packages/SystemUI/res/layout/volume_ringer_drawer.xml +2 −2 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ android:layout_height="@dimen/volume_ringer_drawer_icon_size" android:layout_gravity="center" android:tint="?android:attr/textColorPrimary" android:src="@drawable/ic_volume_ringer_mute" /> android:src="@drawable/ic_speaker_mute" /> </FrameLayout> Loading @@ -102,7 +102,7 @@ android:layout_height="@dimen/volume_ringer_drawer_icon_size" android:layout_gravity="center" android:tint="?android:attr/textColorPrimary" android:src="@drawable/ic_volume_ringer" /> android:src="@drawable/ic_speaker_on" /> </FrameLayout> Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +12 −87 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import android.os.Message; import android.os.SystemClock; import android.os.Trace; import android.os.VibrationEffect; import android.provider.DeviceConfig; import android.provider.Settings; import android.provider.Settings.Global; import android.text.InputFilter; Loading Loading @@ -113,7 +112,6 @@ import androidx.annotation.Nullable; import com.android.app.animation.Interpolators; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.config.sysui.SystemUiDeviceConfigFlags; import com.android.internal.graphics.drawable.BackgroundBlurDrawable; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.view.RotationPolicy; Loading @@ -133,15 +131,11 @@ import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DevicePostureController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.AlphaTintDrawableWrapper; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.util.RoundedCornerProgressDrawable; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; /** Loading Loading @@ -198,9 +192,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private ViewGroup mDialogRowsView; private ViewGroup mRinger; private DeviceConfigProxy mDeviceConfigProxy; private Executor mExecutor; /** * Container for the top part of the dialog, which contains the ringer, the ringer drawer, the * volume rows, and the ellipsis button. This does not include the live caption button. Loading Loading @@ -290,14 +281,12 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private BackgroundBlurDrawable mDialogRowsViewBackground; private final InteractionJankMonitor mInteractionJankMonitor; private boolean mSeparateNotification; private int mWindowGravity; @VisibleForTesting int mVolumeRingerIconDrawableId; final int mVolumeRingerIconDrawableId = R.drawable.ic_speaker_on; @VisibleForTesting int mVolumeRingerMuteIconDrawableId; final int mVolumeRingerMuteIconDrawableId = R.drawable.ic_speaker_mute; private int mOriginalGravity; private final DevicePostureController.Callback mDevicePostureControllerCallback; Loading @@ -315,8 +304,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, VolumePanelFactory volumePanelFactory, ActivityStarter activityStarter, InteractionJankMonitor interactionJankMonitor, DeviceConfigProxy deviceConfigProxy, Executor executor, CsdWarningDialog.Factory csdWarningDialogFactory, DevicePostureController devicePostureController, Looper looper, Loading Loading @@ -374,12 +361,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } else { mDevicePostureControllerCallback = null; } mDeviceConfigProxy = deviceConfigProxy; mExecutor = executor; mSeparateNotification = mDeviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false); updateRingerModeIconSet(); } /** Loading @@ -401,44 +382,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, return mWindowGravity; } /** * If ringer and notification are the same stream (T and earlier), use notification-like bell * icon set. * If ringer and notification are separated, then use generic speaker icons. */ private void updateRingerModeIconSet() { if (mSeparateNotification) { mVolumeRingerIconDrawableId = R.drawable.ic_speaker_on; mVolumeRingerMuteIconDrawableId = R.drawable.ic_speaker_mute; } else { mVolumeRingerIconDrawableId = R.drawable.ic_volume_ringer; mVolumeRingerMuteIconDrawableId = R.drawable.ic_volume_ringer_mute; } if (mRingerDrawerMuteIcon != null) { mRingerDrawerMuteIcon.setImageResource(mVolumeRingerMuteIconDrawableId); } if (mRingerDrawerNormalIcon != null) { mRingerDrawerNormalIcon.setImageResource(mVolumeRingerIconDrawableId); } } /** * Change icon for ring stream (not ringer mode icon) */ private void updateRingRowIcon() { Optional<VolumeRow> volumeRow = mRows.stream().filter(row -> row.stream == STREAM_RING) .findFirst(); if (volumeRow.isPresent()) { VolumeRow volRow = volumeRow.get(); volRow.iconRes = mSeparateNotification ? R.drawable.ic_ring_volume : R.drawable.ic_volume_ringer; volRow.iconMuteRes = mSeparateNotification ? R.drawable.ic_ring_volume_off : R.drawable.ic_volume_ringer_mute; volRow.setIcon(volRow.iconRes, mContext.getTheme()); } } @Override public void onUiModeChanged() { mContext.getTheme().applyStyle(mContext.getThemeResId(), true); Loading @@ -454,9 +397,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mConfigurationController.addCallback(this); mDeviceConfigProxy.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, mExecutor, this::onDeviceConfigChange); if (mDevicePostureController != null) { mDevicePostureController.addCallback(mDevicePostureControllerCallback); } Loading @@ -467,28 +407,11 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mController.removeCallback(mControllerCallbackH); mHandler.removeCallbacksAndMessages(null); mConfigurationController.removeCallback(this); mDeviceConfigProxy.removeOnPropertiesChangedListener(this::onDeviceConfigChange); if (mDevicePostureController != null) { mDevicePostureController.removeCallback(mDevicePostureControllerCallback); } } /** * Update ringer mode icon based on the config */ private void onDeviceConfigChange(DeviceConfig.Properties properties) { Set<String> changeSet = properties.getKeyset(); if (changeSet.contains(SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION)) { boolean newVal = properties.getBoolean( SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, false); if (newVal != mSeparateNotification) { mSeparateNotification = newVal; updateRingerModeIconSet(); updateRingRowIcon(); } } } @Override public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo internalInsetsInfo) { // Set touchable region insets on the root dialog view. This tells WindowManager that Loading Loading @@ -699,7 +622,12 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mRingerDrawerNormalIcon = mDialog.findViewById(R.id.volume_drawer_normal_icon); mRingerDrawerNewSelectionBg = mDialog.findViewById(R.id.volume_drawer_selection_background); updateRingerModeIconSet(); if (mRingerDrawerMuteIcon != null) { mRingerDrawerMuteIcon.setImageResource(mVolumeRingerMuteIconDrawableId); } if (mRingerDrawerNormalIcon != null) { mRingerDrawerNormalIcon.setImageResource(mVolumeRingerIconDrawableId); } setupRingerDrawer(); Loading @@ -724,13 +652,10 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, addRow(AudioManager.STREAM_MUSIC, R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true, true); if (!AudioSystem.isSingleVolume(mContext)) { if (mSeparateNotification) { addRow(AudioManager.STREAM_RING, R.drawable.ic_ring_volume, R.drawable.ic_ring_volume_off, true, false); } else { addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer, true, false); } addRow(STREAM_ALARM, R.drawable.ic_alarm, R.drawable.ic_volume_alarm_mute, true, false); Loading
packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java +0 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.media.AudioManager; import android.os.Looper; import com.android.internal.jank.InteractionJankMonitor; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.media.dialog.MediaOutputDialogFactory; import com.android.systemui.plugins.ActivityStarter; Loading @@ -31,7 +30,6 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DevicePostureController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.volume.CsdWarningDialog; import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeDialogComponent; Loading @@ -42,8 +40,6 @@ import dagger.Binds; import dagger.Module; import dagger.Provides; import java.util.concurrent.Executor; /** Dagger Module for code in the volume package. */ @Module public interface VolumeModule { Loading @@ -63,8 +59,6 @@ public interface VolumeModule { VolumePanelFactory volumePanelFactory, ActivityStarter activityStarter, InteractionJankMonitor interactionJankMonitor, DeviceConfigProxy deviceConfigProxy, @Main Executor executor, CsdWarningDialog.Factory csdFactory, DevicePostureController devicePostureController, DumpManager dumpManager) { Loading @@ -78,8 +72,6 @@ public interface VolumeModule { volumePanelFactory, activityStarter, interactionJankMonitor, deviceConfigProxy, executor, csdFactory, devicePostureController, Looper.getMainLooper(), Loading