1.关于音量
packages/apps/Settings/src/com/android/settings/RingerVolumePreference.java
设置音量的函数是
audioManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION,
audioManager.getStreamVolume(AudioManager.STREAM_RING), 0);
2.
./frameworks/base/media/java/android/media/AudioManager.java
3.AudioManager里有个FLAG_SHOW_UI,是否表示显示音量的toast
Show a toast containing the current volume.
FLAG_SHOW_UI
5
./frameworks/base/media/java/android/media/IAudioService.aidl:33: void setStreamVolume(int streamType, int index, int flags);
./frameworks/base/media/java/android/media/AudioService.java:465: public void setStreamVolume(int streamType, int index, int flags) {
setStreamMute
6.AudioManager.setStreamVolume
------>IAudioService.setStreamVolume[./frameworks/base/media/java/android/media/AudioService.java]
------>setStreamVolumeInt
------> sendVolumeUpdat:::广播了事件AudioManager.VOLUME_CHANGED_ACTION
7.关于系统音量的设置jni
./frameworks/base/core/jni/android_media_AudioSystem.cpp
接着调用库
./frameworks/base/media/libmedia/AudioSystem.cpp
./frameworks/base/libs/audioflinger/AudioPolicyService.cpp
./frameworks/base/libs/audioflinger/AudioPolicyManagerBase.cpp
./frameworks/base/media/java/android/media/AudioService.java
./frameworks/base/libs/audioflinger/AudioPolicyService.cpp
./frameworks/base/media/libmedia/AudioSystem.cpp
./frameworks/base/libs/audioflinger/AudioFlinger.cpp
./frameworks/base/libs/audioflinger/AudioMixer.cpp
阅读(2176) | 评论(0) | 转发(0) |