|
修改文件:
/frameworks/base/media/java/android/media/AudioManager.java
/frameworks/base/media/java/android/media/AudioService.java
相关代码片段:
[java] view plaincopyprint?
1. /** @hide Default volume index values for audio streams */
2. public static final int[] DEFAULT_STREAM_VOLUME = new int[] {
3. 4, // STREAM_VOICE_CALL
4. 7, // STREAM_SYSTEM
5. 5, // STREAM_RING
6. 11, // STREAM_MUSIC
7. 6, // STREAM_ALARM
8. 5, // STREAM_NOTIFICATION
9. 7, // STREAM_BLUETOOTH_SCO
10. 7, // STREAM_SYSTEM_ENFORCED
11. 11, // STREAM_DTMF
12. 11, // STREAM_TTS
13. 11 // STREAM_FM
14. };
[java] view plaincopyprint?
1. /** @hide Maximum volume index values for audio streams */
2. private int[] MAX_STREAM_VOLUME = new int[] {
3. 5, // STREAM_VOICE_CALL
4. 7, // STREAM_SYSTEM
5. 7, // STREAM_RING
6. 15, // STREAM_MUSIC
7. 7, // STREAM_ALARM
8. 7, // STREAM_NOTIFICATION
9. 15, // STREAM_BLUETOOTH_SCO
10. 15, // STREAM_FM
11. 15, // STREAM_DTMF
12. 15, // STREAM_TTS
13. 7, // STREAM_SYSTEM_ENFORCED
14. };
修改方法:
默认值的修改可以直接修改 AudioManager 中对应的值即可,也可以在 DatabaseHelper 的初始化中进行修改,此处不详述。 |
|