diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index c22f9f7cf72..3676caf80b1 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -215,11 +215,11 @@ public class AudioService extends IAudioService.Stub //SPTEK ++ VOLUME_CONTROL protected static final boolean DEBUG_SKBB = true; - protected static final boolean DEBUG_TEST = false; + protected static final boolean DEBUG_TEST = true; - protected static final boolean DEBUG_LAST_VOLUME = false; + protected static final boolean DEBUG_LAST_VOLUME = true; - protected static final boolean DEBUG_CTS = false; + protected static final boolean DEBUG_CTS = true; //SPTEK -- VOLUME_CONTROL /** How long to delay before persisting a change in volume/ringer mode. */ @@ -1950,7 +1950,7 @@ public class AudioService extends IAudioService.Stub setStreamVolume(streamType,getStreamMaxVolume(streamType),AudioManager.FLAG_SHOW_UI,callingPackage); sendBroadcastShowToast(SKBB_TOAST_IE_PATH_THROUGH); }else{ - direction=0; + //direction=0; setStreamVolume(streamType,getStreamMaxVolume(streamType),AudioManager.FLAG_SHOW_UI,callingPackage); sendBroadcastShowToast(SKBB_TOAST_IE_PATH_THROUGH); } @@ -2024,9 +2024,11 @@ public class AudioService extends IAudioService.Stub streamType = getActiveStreamType(streamType); // fixed for cts volume test //SPTEK -- VOLUME_CONTROL + if (DEBUG_DEVICES) Log.d(TAG,"###adjustStreamVolume direction = " + direction); ensureValidDirection(direction); ensureValidStreamType(streamType); + if (DEBUG_DEVICES) Log.d(TAG,"###adjustStreamVolume direction = " + direction); boolean isMuteAdjust = isMuteAdjust(direction); if (isMuteAdjust && !isStreamAffectedByMute(streamType)) { @@ -2069,10 +2071,12 @@ public class AudioService extends IAudioService.Stub + "(device & AudioSystem.DEVICE_OUT_ALL_A2DP): " + (device & AudioSystem.DEVICE_OUT_ALL_A2DP)); if( mIsDDS && streamType == AudioSystem.STREAM_MUSIC && ((flags & AudioManager.FLAG_FROM_KEY)!=0) && ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) == 0)){ if(direction==0) return; - direction = AudioManager.ADJUST_RAISE; + //direction = AudioManager.ADJUST_RAISE; sendBroadcastShowToast(SKBB_TOAST_IE_PATH_THROUGH); + if (DEBUG_DEVICES) Log.d(TAG,"adjustStreamVolume11111 direction = " + direction); + } - if (DEBUG_DEVICES) Log.d(TAG,"adjustStreamVolume direction = " + direction); + if (DEBUG_DEVICES) Log.d(TAG,"###adjustStreamVolume direction = " + direction); //SPTEK -- VOLUME_CONTROL //SPTEK ++ VOLUME_CONTROL : add log