src/sh/jay/xposed/waze/AudioEmphasis.java
/**
     * Whenever Waze wants to output audio, it takes audio focus. Just *before*
     * it does that, we increase the volume.
     * 
     * @param classLoader ClassLoader for the com.waze package.
     */
Whenever Waze wants to output audio, it takes audio focus. Just *before
it does that, we increase the volume.

@param classLoader ClassLoader for the com.waze package.
Whenever Waze wants to output audio it takes audio focus . Just * before it does that we increase the volume . @param classLoader ClassLoader for the com . waze package .
private void hookWazeRequestAudioFocus(final ClassLoader classLoader) {
        findAndHookMethod(WAZE_SOUNDMANAGER_CLASS_NAME, classLoader, WAZE_AFTER_AUDIO_PLAYS_METHOD, new AudioAware_XC_MethodHook() {
        	@Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        		AudioManager audioManager = this.getAudioManager(param);
            	debug("[START] beforeHookedMethod of " + param.method.getName());
        		if (null != audioManager) {
        			previousStreamVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
                	int maxStreamVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
                	audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, maxStreamVolume, generateSetStreamVolumeFlags());
                	debug("Updated audio to maximum (" + maxStreamVolume + ")");
                }
            	debug("[END] beforeHookedMethod of " + param.method.getName());
            }
        });
    }
private void hookWazeRequestAudioFocus ( final ClassLoader classLoader ) { findAndHookMethod ( WAZE_SOUNDMANAGER_CLASS_NAME , classLoader , WAZE_AFTER_AUDIO_PLAYS_METHOD , new AudioAware_XC_MethodHook ( ) { @ Override protected void beforeHookedMethod ( MethodHookParam param ) throws Throwable { AudioManager audioManager = this . getAudioManager ( param ) ; debug ( "[START] beforeHookedMethod of " + param . method . getName ( ) ) ; if ( null != audioManager ) { previousStreamVolume = audioManager . getStreamVolume ( AudioManager . STREAM_MUSIC ) ; int maxStreamVolume = audioManager . getStreamMaxVolume ( AudioManager . STREAM_MUSIC ) ; audioManager . setStreamVolume ( AudioManager . STREAM_MUSIC , maxStreamVolume , generateSetStreamVolumeFlags ( ) ) ; debug ( "Updated audio to maximum (" + maxStreamVolume + ")" ) ; } debug ( "[END] beforeHookedMethod of " + param . method . getName ( ) ) ; } } ) ; }
Whenever Waze wants to output audio, it takes audio focus.
Whenever Waze wants to output audio it takes audio focus .