android7.1音量加减修改默认控制的音量流

android版本:7.1
平台:rk399

+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -3604,7 +3604,7 @@ public class AudioService extends IAudioService.Stub {
return AudioSystem.STREAM_VOICE_CALL;
}
} else if (suggestedStreamType == AudioManager.USE_DEFAULT_STREAM_TYPE) {
- if (isAfMusicActiveRecently(StreamOverride.sDelayMs)) {
+ /*if (isAfMusicActiveRecently(StreamOverride.sDelayMs)) {
if (DEBUG_VOL)
Log.v(TAG, "getActiveStreamType: Forcing STREAM_MUSIC stream active");
return AudioSystem.STREAM_MUSIC;
@@ -3612,7 +3612,8 @@ public class AudioService extends IAudioService.Stub {
if (DEBUG_VOL)
Log.v(TAG, "getActiveStreamType: Forcing STREAM_RING b/c default");
return AudioSystem.STREAM_RING;
- }
+ }*/
+ return AudioSystem.STREAM_MUSIC;
} else if (isAfMusicActiveRecently(0)) {
if (DEBUG_VOL)
Log.v(TAG, "getActiveStreamType: Forcing STREAM_MUSIC stream active");
@@ -3647,8 +3648,8 @@ public class AudioService extends IAudioService.Stub {
return AudioSystem.STREAM_MUSIC;
} else {
if (DEBUG_VOL) Log.v(TAG,
- "getActiveStreamType: using STREAM_NOTIFICATION as default");
- return AudioSystem.STREAM_NOTIFICATION;
+ "getActiveStreamType: using STREAM_MUSIC as default");
+ return AudioSystem.STREAM_MUSIC;
}
}
break;

发表回复

CAPTCHAis initialing...