MTK平台修改音量默认值需要改动的位置

1,修改frameworks/base/media/java/android/media/AudioManager.java中的DEFAULT_STREAM_VOLUME数组

     * @hide Default volume index values for audio streams

     * M: modify the default stream volume @{

     */

    public static final int[] DEFAULT_STREAM_VOLUME = new int[] {

        4,  // STREAM_VOICE_CALL

        15,  // STREAM_SYSTEM

        12,  // STREAM_RING

        12,// STREAM_MUSIC

        12,  // STREAM_ALARM

        12,  // STREAM_NOTIFICATION

        7,  // STREAM_BLUETOOTH_SCO

        15,  // STREAM_SYSTEM_ENFORCED

        11,// STREAM_DTMF

        11,  // STREAM_TTS

        12,  // STREAM_FM

        12  // STREAM_MATV

    };



2,修改mediatek/frameworks/base/media/audio/java/com/mediatek/audioprofile/AudioProfileManager.java中

getDefaultState方法中的


                /** Default values of ringer volume for different audio profiles. */

                final int DEFAULT_RINGER_VOLUME_GENERAL =12;

                final int DEFAULT_RINGER_VOLUME_SILENT =0;

                final int DEFAULT_RINGER_VOLUME_MEETING =0;

                final int DEFAULT_RINGER_VOLUME_OUTDOOR =15;

                /** Default values of notification volume for different audio profiles. */

                final int DEFAULT_NOTIFICATION_VOLUME_GENERAL = 12;

                final int DEFAULT_NOTIFICATION_VOLUME_SILENT = 0;

                final int DEFAULT_NOTIFICATION_VOLUME_MEETING = 0;

                final int DEFAULT_NOTIFICATION_VOLUME_OUTDOOR = 15;

                /** Default values of alarm volume for different audio profiles. */

                final int DEFAULT_ALARM_VOLUME_GENERAL =12;

                final int DEFAULT_ALARM_VOLUME_SILENT =0;

                final int DEFAULT_ALARM_VOLUME_MEETING =0;

                final int DEFAULT_ALARM_VOLUME_OUTDOOR =15;


你可能感兴趣的:(Android,系统开发)