Loading core/java/android/preference/SeekBarVolumizer.java +7 −15 Original line number Diff line number Diff line Loading @@ -16,9 +16,7 @@ package android.preference; import android.Manifest; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.app.NotificationManager; import android.compat.annotation.UnsupportedAppUsage; import android.content.BroadcastReceiver; Loading @@ -37,7 +35,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 +44,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 @@ -119,6 +115,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba private final int mMaxStreamVolume; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; private final boolean mNotifAliasRing; private final Receiver mReceiver = new Receiver(); private Handler mHandler; Loading Loading @@ -161,7 +158,6 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba this(context, streamType, defaultUri, callback, true /* playSample */); } @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) public SeekBarVolumizer( Context context, int streamType, Loading @@ -184,6 +180,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } mNotifAliasRing = mContext.getResources().getBoolean( com.android.internal.R.bool.config_alias_ring_notif_stream_types); mZenMode = mNotificationManager.getZenMode(); if (hasAudioProductStrategies()) { Loading Loading @@ -290,9 +288,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba * 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 if (mNotifAliasRing || mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } Loading Loading @@ -369,9 +365,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) || (!mNotifAliasRing && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -650,10 +644,8 @@ 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 = mNotifAliasRing && mNotificationOrRing ? isNotificationOrRing(streamType) : 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 @@ -561,11 +561,6 @@ public final class SystemUiDeviceConfigFlags { public static final String TASK_MANAGER_SHOW_USER_VISIBLE_JOBS = "task_manager_show_user_visible_jobs"; /** * (boolean) Whether to show notification volume control slider separate from ring. */ public static final String VOLUME_SEPARATE_NOTIFICATION = "volume_separate_notification"; /** * (boolean) Whether the clipboard overlay is enabled. */ Loading core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2018,6 +2018,10 @@ STREAM_MUSIC as if it's on TV platform. --> <bool name="config_single_volume">false</bool> <!-- Flag indicating whether notification and ringtone volumes are controlled together (aliasing is true) or not. --> <bool name="config_alias_ring_notif_stream_types">true</bool> <!-- The number of volume steps for the notification stream --> <integer name="config_audio_notif_vol_steps">7</integer> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,7 @@ <java-symbol type="attr" name="autofillSaveCustomSubtitleMaxHeight"/> <java-symbol type="bool" name="action_bar_embed_tabs" /> <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" /> <java-symbol type="bool" name="config_alias_ring_notif_stream_types" /> <java-symbol type="integer" name="config_audio_notif_vol_default" /> <java-symbol type="integer" name="config_audio_notif_vol_steps" /> <java-symbol type="integer" name="config_audio_ring_vol_default" /> Loading packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -791,13 +791,13 @@ private class AnimatedDialog( // Move the drawing of the source in the overlay of this dialog, then animate. We trigger a // one-off synchronization to make sure that this is done in sync between the two different // windows. controller.startDrawingInOverlayOf(decorView) synchronizeNextDraw( then = { isSourceDrawnInDialog = true maybeStartLaunchAnimation() } ) controller.startDrawingInOverlayOf(decorView) } /** Loading Loading
core/java/android/preference/SeekBarVolumizer.java +7 −15 Original line number Diff line number Diff line Loading @@ -16,9 +16,7 @@ package android.preference; import android.Manifest; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.app.NotificationManager; import android.compat.annotation.UnsupportedAppUsage; import android.content.BroadcastReceiver; Loading @@ -37,7 +35,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 +44,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 @@ -119,6 +115,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba private final int mMaxStreamVolume; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; private final boolean mNotifAliasRing; private final Receiver mReceiver = new Receiver(); private Handler mHandler; Loading Loading @@ -161,7 +158,6 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba this(context, streamType, defaultUri, callback, true /* playSample */); } @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) public SeekBarVolumizer( Context context, int streamType, Loading @@ -184,6 +180,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } mNotifAliasRing = mContext.getResources().getBoolean( com.android.internal.R.bool.config_alias_ring_notif_stream_types); mZenMode = mNotificationManager.getZenMode(); if (hasAudioProductStrategies()) { Loading Loading @@ -290,9 +288,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba * 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 if (mNotifAliasRing || mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } Loading Loading @@ -369,9 +365,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) || (!mNotifAliasRing && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -650,10 +644,8 @@ 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 = mNotifAliasRing && mNotificationOrRing ? isNotificationOrRing(streamType) : 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 @@ -561,11 +561,6 @@ public final class SystemUiDeviceConfigFlags { public static final String TASK_MANAGER_SHOW_USER_VISIBLE_JOBS = "task_manager_show_user_visible_jobs"; /** * (boolean) Whether to show notification volume control slider separate from ring. */ public static final String VOLUME_SEPARATE_NOTIFICATION = "volume_separate_notification"; /** * (boolean) Whether the clipboard overlay is enabled. */ Loading
core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2018,6 +2018,10 @@ STREAM_MUSIC as if it's on TV platform. --> <bool name="config_single_volume">false</bool> <!-- Flag indicating whether notification and ringtone volumes are controlled together (aliasing is true) or not. --> <bool name="config_alias_ring_notif_stream_types">true</bool> <!-- The number of volume steps for the notification stream --> <integer name="config_audio_notif_vol_steps">7</integer> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,7 @@ <java-symbol type="attr" name="autofillSaveCustomSubtitleMaxHeight"/> <java-symbol type="bool" name="action_bar_embed_tabs" /> <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" /> <java-symbol type="bool" name="config_alias_ring_notif_stream_types" /> <java-symbol type="integer" name="config_audio_notif_vol_default" /> <java-symbol type="integer" name="config_audio_notif_vol_steps" /> <java-symbol type="integer" name="config_audio_ring_vol_default" /> Loading
packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -791,13 +791,13 @@ private class AnimatedDialog( // Move the drawing of the source in the overlay of this dialog, then animate. We trigger a // one-off synchronization to make sure that this is done in sync between the two different // windows. controller.startDrawingInOverlayOf(decorView) synchronizeNextDraw( then = { isSourceDrawnInDialog = true maybeStartLaunchAnimation() } ) controller.startDrawingInOverlayOf(decorView) } /** Loading