summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJared Suttles <jared.suttles@motorola.com>2009-08-13 21:50:52 -0500
committerRebecca Schultz Zavin <rebecca@android.com>2009-08-13 21:27:55 -0700
commit5982013cfc8274ff0bafaba83c676b3a8890cba9 (patch)
treecf34011c5e9867f8f1445310b4d125f6681bef04 /media
parent455e3af1f82629d274447cd5d08d3c8dc1c58967 (diff)
downloadframeworks_base-5982013cfc8274ff0bafaba83c676b3a8890cba9.zip
frameworks_base-5982013cfc8274ff0bafaba83c676b3a8890cba9.tar.gz
frameworks_base-5982013cfc8274ff0bafaba83c676b3a8890cba9.tar.bz2
Change the number of volume steps from 6 to 7 per Verizon Requirements
Submitted on behalf of Helen Tran <Helen.Tran@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioManager.java14
-rw-r--r--media/java/android/media/AudioService.java24
2 files changed, 23 insertions, 15 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 60fc0e0..16bf8a2 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -153,20 +153,6 @@ public class AudioManager {
@Deprecated public static final int NUM_STREAMS = AudioSystem.NUM_STREAMS;
- /** @hide Maximum volume index values for audio streams */
- public static final int[] MAX_STREAM_VOLUME = new int[] {
- 6, // STREAM_VOICE_CALL
- 8, // STREAM_SYSTEM
- 8, // STREAM_RING
- 16, // STREAM_MUSIC
- 8, // STREAM_ALARM
- 8, // STREAM_NOTIFICATION
- 16, // STREAM_BLUETOOTH_SCO
- 8, // STREAM_SYSTEM_ENFORCED
- 16, // STREAM_DTMF
- 16 // STREAM_TTS
- };
-
/** @hide Default volume index values for audio streams */
public static final int[] DEFAULT_STREAM_VOLUME = new int[] {
4, // STREAM_VOICE_CALL
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 9afe6a1..5a59712 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -44,6 +44,7 @@ import android.provider.Settings;
import android.provider.Settings.System;
import android.util.Log;
import android.view.VolumePanel;
+import android.os.SystemProperties;
import com.android.internal.telephony.ITelephony;
@@ -54,6 +55,7 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+
/**
* The implementation of the volume manager service.
* <p>
@@ -140,6 +142,19 @@ public class AudioService extends IAudioService.Stub {
{4, -1} // FX_FOCUS_RETURN
};
+ /** @hide Maximum volume index values for audio streams */
+ private int[] MAX_STREAM_VOLUME = new int[] {
+ 6, // STREAM_VOICE_CALL
+ 8, // STREAM_SYSTEM
+ 8, // STREAM_RING
+ 16, // STREAM_MUSIC
+ 8, // STREAM_ALARM
+ 8, // STREAM_NOTIFICATION
+ 16, // STREAM_BLUETOOTH_SCO
+ 8, // STREAM_SYSTEM_ENFORCED
+ 16, // STREAM_DTMF
+ 16 // STREAM_TTS
+ };
/* STREAM_VOLUME_ALIAS[] indicates for each stream if it uses the volume settings
* of another stream: This avoids multiplying the volume settings for hidden
* stream types that follow other stream behavior for volume settings
@@ -231,6 +246,12 @@ public class AudioService extends IAudioService.Stub {
public AudioService(Context context) {
mContext = context;
mContentResolver = context.getContentResolver();
+
+ // Intialized volume
+ MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = SystemProperties.getInt(
+ "ro.config.vc_call_vol_steps",
+ MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
+
mVolumePanel = new VolumePanel(context, this);
mSettingsObserver = new SettingsObserver();
mMode = AudioSystem.MODE_NORMAL;
@@ -249,6 +270,7 @@ public class AudioService extends IAudioService.Stub {
intentFilter.addAction(BluetoothA2dp.SINK_STATE_CHANGED_ACTION);
intentFilter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
context.registerReceiver(mReceiver, intentFilter);
+
}
private void createAudioSystemThread() {
@@ -945,7 +967,7 @@ public class AudioService extends IAudioService.Stub {
mStreamType = streamType;
final ContentResolver cr = mContentResolver;
- mIndexMax = AudioManager.MAX_STREAM_VOLUME[streamType];
+ mIndexMax = MAX_STREAM_VOLUME[streamType];
mIndex = Settings.System.getInt(cr,
mVolumeIndexSettingName,
AudioManager.DEFAULT_STREAM_VOLUME[streamType]);