diff options
author | Amith Yamasani <yamasani@google.com> | 2011-11-29 16:32:17 -0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2011-11-30 15:28:43 -0800 |
commit | 2b0acc90ae5a1133356b3af43d99056de1b3f626 (patch) | |
tree | b1ec75ddd9e1264ddabb72ee0952810e4a3b1a73 /core | |
parent | e5715521232443f01f8c0c0633cac364c8136bde (diff) | |
download | frameworks_base-2b0acc90ae5a1133356b3af43d99056de1b3f626.zip frameworks_base-2b0acc90ae5a1133356b3af43d99056de1b3f626.tar.gz frameworks_base-2b0acc90ae5a1133356b3af43d99056de1b3f626.tar.bz2 |
No clicking on volume icon in volume dialog.
Don't disable volume slider when it hits zero.
Show correct icon for Silent mode in Power menu.
Bug: 5586083
Change-Id: Iaa957fc08e314e0de1c007dfc967a1d960080aab
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/view/VolumePanel.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java index b657204..48fe0df 100644 --- a/core/java/android/view/VolumePanel.java +++ b/core/java/android/view/VolumePanel.java @@ -278,10 +278,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie } private void createSliders() { - final int silentableStreams = System.getInt(mContext.getContentResolver(), - System.MODE_RINGER_STREAMS_AFFECTED, - ((1 << AudioSystem.STREAM_NOTIFICATION) | (1 << AudioSystem.STREAM_RING))); - LayoutInflater inflater = (LayoutInflater) mContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); mStreamControls = new HashMap<Integer, StreamControl>(STREAMS.length); @@ -297,9 +293,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie sc.group = (ViewGroup) inflater.inflate(R.layout.volume_adjust_item, null); sc.group.setTag(sc); sc.icon = (ImageView) sc.group.findViewById(R.id.stream_icon); - if ((silentableStreams & (1 << sc.streamType)) != 0) { - sc.icon.setOnClickListener(this); - } sc.icon.setTag(sc); sc.icon.setContentDescription(res.getString(streamRes.descRes)); sc.iconRes = streamRes.iconRes; @@ -356,7 +349,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie && mAudioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) { sc.icon.setImageResource(R.drawable.ic_audio_ring_notif_vibrate); } - sc.seekbarView.setEnabled(!muted); } private boolean isExpanded() { @@ -436,8 +428,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie mAudioService.getLastAudibleStreamVolume(streamType) : mAudioService.getStreamVolume(streamType); -// int message = UNKNOWN_VOLUME_TEXT; -// int additionalMessage = 0; mRingIsSilent = false; if (LOGD) { @@ -697,18 +687,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie public void onClick(View v) { if (v == mMoreButton) { expand(); - } else if (v.getTag() instanceof StreamControl) { - StreamControl sc = (StreamControl) v.getTag(); - boolean vibeInSilent = Settings.System.getInt(mContext.getContentResolver(), - System.VIBRATE_IN_SILENT, 1) == 1; - int newMode = mAudioManager.isSilentMode() - ? AudioManager.RINGER_MODE_NORMAL - : (vibeInSilent - ? AudioManager.RINGER_MODE_VIBRATE - : AudioManager.RINGER_MODE_SILENT); - mAudioManager.setRingerMode(newMode); - // Expand the dialog if it hasn't been expanded yet. - if (mShowCombinedVolumes && !isExpanded()) expand(); } resetTimeout(); } |