Android 8.1 音量条增加通话音量

Android 8.1 音量条增加通话音量

最近接到项目需求,需要在音量进度条中增加一项通话音量,具体修改参照如下:

/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java

        if (mRows.isEmpty()) {
            addRow(AudioManager.STREAM_MUSIC,
                    R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true);
            if (!AudioSystem.isSingleVolume(mContext)) {
                addRow(AudioManager.STREAM_RING,
                        R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);
                addRow(AudioManager.STREAM_ALARM,
                        R.drawable.ic_volume_alarm, R.drawable.ic_volume_alarm_mute, false);
                addRow(AudioManager.STREAM_VOICE_CALL,
-                        R.drawable.ic_volume_voice, R.drawable.ic_volume_voice, false);
+                        R.drawable.ic_volume_voice, R.drawable.ic_volume_voice, true);

重新编译验证,修改生效,音量进度条中已增加通话音量一项

你可能感兴趣的:(Android,android)