代码位置:frameworks/base/services/core/java/com/android/server/audio/AudioService.java
@@ -712,6 +712,9 @@ public class AudioService extends IAudioService.Stub
}
}
+ // force music max volume
+ AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC];
+
int maxAlarmVolume = SystemProperties.getInt("ro.config.alarm_vol_steps", -1);
if (maxAlarmVolume != -1) {
MAX_STREAM_VOLUME[AudioSystem.STREAM_ALARM] = maxAlarmVolume;