Loading media/java/android/media/AudioManager.java +0 −14 Original line number Diff line number Diff line Loading @@ -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 Loading media/java/android/media/AudioService.java +23 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -54,6 +55,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; /** * The implementation of the volume manager service. * <p> Loading Loading @@ -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 Loading Loading @@ -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; Loading @@ -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() { Loading Loading @@ -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]); Loading Loading
media/java/android/media/AudioManager.java +0 −14 Original line number Diff line number Diff line Loading @@ -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 Loading
media/java/android/media/AudioService.java +23 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -54,6 +55,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; /** * The implementation of the volume manager service. * <p> Loading Loading @@ -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 Loading Loading @@ -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; Loading @@ -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() { Loading Loading @@ -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]); Loading