summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Vashi <neobuddy89@gmail.com>2021-05-16 15:37:20 +0530
committeralk3pInjection <webmaster@raspii.tech>2021-09-27 21:17:05 +0800
commitcc73b7ab4322f3931a7d3fd9930f84c68255c8c2 (patch)
tree30df20ea173583070b98c3ab57c2d88772696f62
parent74747d8da02522822859afe095a15a7b626ef02d (diff)
[crdroid][11.0] VolumeDialog: always show ringer icon
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Change-Id: Ie184937404f1419723d18dd9468e679654f101fc
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java23
1 files changed, 3 insertions, 20 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 8a0cdb4252db..c503177fd147 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -192,7 +192,6 @@ public class VolumeDialogImpl implements VolumeDialog,
private boolean mHasSeenODICaptionsTooltip;
private ViewStub mODICaptionsTooltipViewStub;
private View mODICaptionsTooltipView = null;
- private boolean mHasAlertSlider;
private boolean mLeftVolumeRocker;
private LocalMediaManager mLocalMediaManager;
@@ -220,7 +219,6 @@ public class VolumeDialogImpl implements VolumeDialog,
mShowActiveStreamOnly = showActiveStreamOnly();
mHasSeenODICaptionsTooltip =
Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false);
- mHasAlertSlider = mContext.getResources().getBoolean(com.android.internal.R.bool.config_hasAlertSlider);
mLeftVolumeRocker = mContext.getResources().getBoolean(R.bool.config_audioPanelOnLeftSide);
mVibrateOnSlider = mContext.getResources().getBoolean(R.bool.config_vibrateOnIconAnimation);
mElevation = mContext.getResources().getDimension(R.dimen.volume_dialog_elevation);
@@ -359,7 +357,7 @@ public class VolumeDialogImpl implements VolumeDialog,
if (mRinger != null) {
mRingerIcon = mRinger.findViewById(R.id.ringer_icon);
mZenIcon = mRinger.findViewById(R.id.dnd_icon);
- Util.setVisOrGone(mRinger, !mHasAlertSlider);
+ Util.setVisOrGone(mRinger, true);
}
mODICaptionsView = mDialog.findViewById(R.id.odi_captions);
@@ -645,8 +643,8 @@ public class VolumeDialogImpl implements VolumeDialog,
});
mMediaButton.setOnClickListener(v -> {
int x = (int) (isLandscape() ? (isAudioPanelOnLeftSide() ? (
- (mWidth + mSpacer) * (mHasAlertSlider ? 1 : 2) + mWidth / 2)
- : (mHasAlertSlider ? mWidth * 1.5 + mSpacer : mWidth / 2))
+ (mWidth + mSpacer) * 2 + mWidth / 2)
+ : mWidth / 2)
: (1.5 * mWidth + mSpacer));
int endRadius = (int) Math.hypot((isLandscape() ? 2.2 : 1.1) * (1.5 * mWidth +
mSpacer), mHeight);
@@ -1962,12 +1960,6 @@ public class VolumeDialogImpl implements VolumeDialog,
if (mRow.ss == null) return;
if (D.BUG) Log.d(TAG, AudioSystem.streamToString(mRow.stream)
+ " onProgressChanged " + progress + " fromUser=" + fromUser);
- if ((mRow.stream == STREAM_RING || mRow.stream == STREAM_NOTIFICATION) && mHasAlertSlider) {
- if (mRow.ss.muted) {
- seekBar.setProgress(0);
- return;
- }
- }
if (!fromUser) return;
if (mRow.ss.levelMin > 0) {
final int minProgress = mRow.ss.levelMin * 100;
@@ -1978,15 +1970,6 @@ public class VolumeDialogImpl implements VolumeDialog,
}
final int userLevel = getImpliedLevel(seekBar, progress);
- if ((mRow.stream == STREAM_RING || mRow.stream == STREAM_NOTIFICATION) && mHasAlertSlider) {
- if (mRow.ss.level > mRow.ss.levelMin && userLevel == 0) {
- seekBar.setProgress((mRow.ss.levelMin + 1) * 100);
- Util.setText(mRow.header,
- Utils.formatPercentage(mRow.ss.levelMin + 1, mRow.ss.levelMax));
- return;
- }
- }
-
Util.setText(mRow.header, Utils.formatPercentage(userLevel, mRow.ss.levelMax));
if (mRow.ss.level != userLevel || mRow.ss.muted && userLevel > 0) {
mRow.userAttempt = SystemClock.uptimeMillis();