按音量上下键的时候
通过过log打印
01-02 02:45:51.464 3416 3519 D AudioService: adjustSuggestedStreamVolume() stream=-2147483648, flags=4608, caller=MediaSessionService, mVolumeControlStream= -1
01-02 02:45:51.474 3416 3519 V AudioService: getActiveStreamType: Forcing STREAM_MUSIC stream active
01-02 02:45:51.474 3416 3519 D AudioService: adjustStreamVolume() stream=3, dir=-1, flags=4608, caller=MediaSessionService
会调用AudioService.java相关的接口adjustSuggestedStreamVolume,
///
// IPC methods
///
/** @see AudioManager#adjustVolume(int, int) */
public void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
String callingPackage, String caller) {
adjustSuggestedStreamVolume(direction, suggestedStreamType, flags, callingPackage,
caller, Binder.getCallingUid());
}
继续调用 <