Lines Matching refs:streamType

174         int streamType;
181 StreamResources(int streamType, int descRes, int iconRes, int iconMuteRes, boolean show) {
182 this.streamType = streamType;
204 int streamType;
259 streamRes.show = (streamRes.streamType == STREAM_MASTER);
348 private boolean isMuted(int streamType) {
349 if (streamType == STREAM_MASTER) {
351 } else if (streamType == AudioService.STREAM_REMOTE_MUSIC) {
354 return mAudioManager.isStreamMute(streamType);
358 private int getStreamMaxVolume(int streamType) {
359 if (streamType == STREAM_MASTER) {
361 } else if (streamType == AudioService.STREAM_REMOTE_MUSIC) {
364 return mAudioManager.getStreamMaxVolume(streamType);
368 private int getStreamVolume(int streamType) {
369 if (streamType == STREAM_MASTER) {
371 } else if (streamType == AudioService.STREAM_REMOTE_MUSIC) {
374 return mAudioManager.getStreamVolume(streamType);
378 private void setStreamVolume(int streamType, int index, int flags) {
379 if (streamType == STREAM_MASTER) {
381 } else if (streamType == AudioService.STREAM_REMOTE_MUSIC) {
384 mAudioManager.setStreamVolume(streamType, index, flags);
395 int streamType = streamRes.streamType;
400 sc.streamType = streamType;
410 int plusOne = (streamType == AudioSystem.STREAM_BLUETOOTH_SCO ||
411 streamType == AudioSystem.STREAM_VOICE_CALL) ? 1 : 0;
412 sc.seekbarView.setMax(getStreamMaxVolume(streamType) + plusOne);
415 mStreamControls.put(streamType, sc);
441 final int streamType = STREAMS[i].streamType;
442 if (!STREAMS[i].show || streamType == mActiveStreamType) {
445 StreamControl sc = mStreamControls.get(streamType);
453 sc.seekbarView.setProgress(getStreamVolume(sc.streamType));
454 final boolean muted = isMuted(sc.streamType);
456 if (sc.streamType == AudioManager.STREAM_RING &&
460 if (sc.streamType == AudioService.STREAM_REMOTE_MUSIC) {
464 } else if (sc.streamType != mAudioManager.getMasterStreamType() && muted) {
501 public void postVolumeChanged(int streamType, int flags) {
509 obtainMessage(MSG_VOLUME_CHANGED, streamType, flags).sendToTarget();
512 public void postRemoteVolumeChanged(int streamType, int flags) {
520 obtainMessage(MSG_REMOTE_VOLUME_CHANGED, streamType, flags).sendToTarget();
550 public void postMuteChanged(int streamType, int flags) {
558 obtainMessage(MSG_MUTE_CHANGED, streamType, flags).sendToTarget();
575 protected void onVolumeChanged(int streamType, int flags) {
577 if (LOGD) Log.d(TAG, "onVolumeChanged(streamType: " + streamType + ", flags: " + flags + ")");
581 if (mActiveStreamType != streamType) {
582 reorderSliders(streamType);
584 onShowVolumeChanged(streamType, flags);
590 sendMessageDelayed(obtainMessage(MSG_PLAY_SOUND, streamType, flags), PLAY_SOUND_DELAY);
605 protected void onMuteChanged(int streamType, int flags) {
607 if (LOGD) Log.d(TAG, "onMuteChanged(streamType: " + streamType + ", flags: " + flags + ")");
609 StreamControl sc = mStreamControls.get(streamType);
611 sc.icon.setImageResource(isMuted(sc.streamType) ? sc.iconMuteRes : sc.iconRes);
614 onVolumeChanged(streamType, flags);
617 protected void onShowVolumeChanged(int streamType, int flags) {
618 int index = getStreamVolume(streamType);
623 Log.d(TAG, "onShowVolumeChanged(streamType: " + streamType
629 int max = getStreamMaxVolume(streamType);
631 switch (streamType) {
697 StreamControl sc = mStreamControls.get(streamType);
705 (streamType != mAudioManager.getMasterStreamType() &&
706 streamType != AudioService.STREAM_REMOTE_MUSIC &&
707 isMuted(streamType))) {
715 int stream = (streamType == AudioService.STREAM_REMOTE_MUSIC) ? -1 : streamType;
727 if ((streamType != AudioService.STREAM_REMOTE_MUSIC) &&
729 mAudioService.isStreamAffectedByRingerMode(streamType) &&
735 protected void onPlaySound(int streamType, int flags) {
744 ToneGenerator toneGen = getOrCreateToneGenerator(streamType);
775 protected void onRemoteVolumeChanged(int streamType, int flags) {
776 // streamType is the real stream type being affected, but for the UI sliders, we
779 if (LOGD) Log.d(TAG, "onRemoteVolumeChanged(stream:"+streamType+", flags: " + flags + ")");
794 sendMessageDelayed(obtainMessage(MSG_PLAY_SOUND, streamType, flags), PLAY_SOUND_DELAY);
822 * @param streamType can be a valid stream type value, or VolumePanel.STREAM_MASTER,
826 synchronized protected void onSliderVisibilityChanged(int streamType, int visible) {
827 if (LOGD) Log.d(TAG, "onSliderVisibilityChanged(stream="+streamType+", visi="+visible+")");
831 if (streamRes.streamType == streamType) {
833 if (!isVisible && (mActiveStreamType == streamType)) {
870 private ToneGenerator getOrCreateToneGenerator(int streamType) {
871 if (streamType == STREAM_MASTER) {
876 streamType = AudioManager.STREAM_SYSTEM;
882 if (mToneGenerators[streamType] == null) {
884 mToneGenerators[streamType] = new ToneGenerator(streamType, MAX_VOLUME);
892 return mToneGenerators[streamType];
906 sc.icon.setImageResource(isMuted(sc.streamType) ? sc.iconMuteRes : sc.iconRes);
1003 if (getStreamVolume(sc.streamType) != progress) {
1004 setStreamVolume(sc.streamType, progress, 0);
1021 if (sc.streamType == AudioService.STREAM_REMOTE_MUSIC) {