Skip to content

Commit e9b0608

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "No clicking on volume icon in volume dialog." into ics-mr1
2 parents 4f92693 + 2b0acc9 commit e9b0608

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

core/java/android/view/VolumePanel.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,6 @@ private boolean isMuted(int streamType) {
278278
}
279279

280280
private void createSliders() {
281-
final int silentableStreams = System.getInt(mContext.getContentResolver(),
282-
System.MODE_RINGER_STREAMS_AFFECTED,
283-
((1 << AudioSystem.STREAM_NOTIFICATION) | (1 << AudioSystem.STREAM_RING)));
284-
285281
LayoutInflater inflater = (LayoutInflater) mContext
286282
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
287283
mStreamControls = new HashMap<Integer, StreamControl>(STREAMS.length);
@@ -297,9 +293,6 @@ private void createSliders() {
297293
sc.group = (ViewGroup) inflater.inflate(R.layout.volume_adjust_item, null);
298294
sc.group.setTag(sc);
299295
sc.icon = (ImageView) sc.group.findViewById(R.id.stream_icon);
300-
if ((silentableStreams & (1 << sc.streamType)) != 0) {
301-
sc.icon.setOnClickListener(this);
302-
}
303296
sc.icon.setTag(sc);
304297
sc.icon.setContentDescription(res.getString(streamRes.descRes));
305298
sc.iconRes = streamRes.iconRes;
@@ -356,7 +349,6 @@ private void updateSlider(StreamControl sc) {
356349
&& mAudioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) {
357350
sc.icon.setImageResource(R.drawable.ic_audio_ring_notif_vibrate);
358351
}
359-
sc.seekbarView.setEnabled(!muted);
360352
}
361353

362354
private boolean isExpanded() {
@@ -436,8 +428,6 @@ protected void onShowVolumeChanged(int streamType, int flags) {
436428
mAudioService.getLastAudibleStreamVolume(streamType)
437429
: mAudioService.getStreamVolume(streamType);
438430

439-
// int message = UNKNOWN_VOLUME_TEXT;
440-
// int additionalMessage = 0;
441431
mRingIsSilent = false;
442432

443433
if (LOGD) {
@@ -697,18 +687,6 @@ public void onStopTrackingTouch(SeekBar seekBar) {
697687
public void onClick(View v) {
698688
if (v == mMoreButton) {
699689
expand();
700-
} else if (v.getTag() instanceof StreamControl) {
701-
StreamControl sc = (StreamControl) v.getTag();
702-
boolean vibeInSilent = Settings.System.getInt(mContext.getContentResolver(),
703-
System.VIBRATE_IN_SILENT, 1) == 1;
704-
int newMode = mAudioManager.isSilentMode()
705-
? AudioManager.RINGER_MODE_NORMAL
706-
: (vibeInSilent
707-
? AudioManager.RINGER_MODE_VIBRATE
708-
: AudioManager.RINGER_MODE_SILENT);
709-
mAudioManager.setRingerMode(newMode);
710-
// Expand the dialog if it hasn't been expanded yet.
711-
if (mShowCombinedVolumes && !isExpanded()) expand();
712690
}
713691
resetTimeout();
714692
}

policy/src/com/android/internal/policy/impl/GlobalActions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ private AlertDialog createDialog() {
121121
R.string.global_action_silent_mode_off_status) {
122122

123123
void willCreate() {
124-
mEnabledIconResId = (Settings.System.getInt(mContext.getContentResolver(),
125-
Settings.System.VIBRATE_IN_SILENT, 1) == 1)
124+
mEnabledIconResId =
125+
mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE
126126
? R.drawable.ic_audio_ring_notif_vibrate
127127
: R.drawable.ic_audio_vol_mute;
128128
}

0 commit comments

Comments
 (0)