ANDROID Audio音效的设置和控制(4)

2020-04-18 02:32

AsciiString

NOT_ARRAY

AsciiString,300

1

Settings

default file for the ringtone of voice call

\

ro_def_ringer_stream_uri_meeting

ro.def.ringer_stream_uri_meeting

AsciiString

NOT_ARRAY

AsciiString,300

1

Settings

default file for the ringtone of voice call

\

ro_def_ringer_stream_uri_outdoor

ro.def.ringer_stream_uri_outdoor

ArcherMind Inc. Proprietary – For Internal Use Only

CONFIDENTIAL Date

Page 16 of 33

AsciiString

NOT_ARRAY

AsciiString,300

1

Settings

default file for the ringtone of voice call

\

packages/apps/Settings/src/com/android/settings/audioprofile/InitAudioProfileReceiver.java中使用以上的设置

/**

* Persist the values of All the profiles for their default status */

void initProfiles() {

profile.setRingtoneUri(mContext, AudioProfile.TYPE_RINGTONE, parsePath(res.getString(res.getIdentifier(\ + profileName, \, packageName)), SOUND_TYPE_RINGTONES));

}

? gin_wimdata_ng/wprocedures

下的isdm_sys_properties.plf

例如isdm_sys_properties.plf中以下定义定义了Alarm的默认铃声

ro_config_alarm_alert

AsciiString

ro.config.alarm_alert

NOT_ARRAY

AsciiString,104

ArcherMind Inc. Proprietary – For Internal Use Only

CONFIDENTIAL Date

Page 17 of 33

1

\

SystemProperty

This item will be set into ro.config.alarm_alert of build.prop. \

开关机铃声比较特殊;

开关机是否有铃声是由 ro.config.key_switch_on_off控制〃如果这个值为0〃没有铃声;设为1有铃声;此默认值在perso中的isdm_sys_properties.plf进行设置

开关机默认铃声由 ro.config.switch_on和ro.config.switch_off控制〃这两个值在perso中的isdm_sys_properties.plf进行设置

2.4 拨号界面专属拨号按键音设置

同一行中〃使用逐渐升调的按键音。即: a)1、2、3保持升调 b)4、5、6保持升调 c)7、8、9保持升调 d)×、0、#保持升调

同一列中〃保持同一音调的按键音。即: a)1、4、7、×保持同一音调 b)2、5、8、0保持同一音调

ArcherMind Inc. Proprietary – For Internal Use Only

CONFIDENTIAL Date

Page 18 of 33

c)3、6、9、#保持同一音调

位置:,packages\\apps\\Contacts\\src\\com\\android\\contacts\\TwelveKeyDialer.java

private static final HashMap mKeyToneMap = new HashMap(); static {

mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_1)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_2)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_3)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_4)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_5)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_6)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_7)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_8)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_9)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_0)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_S)); mKeyToneMap.put(\, new Integer(ToneGenerator.TONE_DTMF_P)); }

protected void setFormattedDigits(String data) {

mHandler.sendMessage(mHandler.obtainMessage(PLAY_TONE_FISRTENTER, data)); 。。。。。

char c = event.getMatch(PiscoDialerKeyListener.CHARACTERS); if (c != 0 && mDigits != null && !mDigits.isFocused()) { playTone4Key(String.valueOf(c)); }

。。。。。 }

private Handler mHandler = new Handler() { public void handleMessage(Message msg){ switch (msg.what) {

case New_TONE_GENERATOR : newToneGenerator(); break;

case PLAY_TONE_FISRTENTER : String data = (String)msg.obj; playTone4Key(data); break; 。。。 } }

private void playTone4Key(String key) { Integer tone = mKeyToneMap.get(key); if (tone != null) { playTone(tone); } }

public boolean onKey(View view, int keyCode, KeyEvent event) {

ArcherMind Inc. Proprietary – For Internal Use Only

CONFIDENTIAL Date

Page 19 of 33

char c = event.getMatch(PiscoDialerKeyListener.CHARACTERS);

if (KeyEvent.ACTION_DOWN == event.getAction() && 0 == event.getRepeatCount()) { playTone4Key(String.valueOf(c)); }

//onKey is only used to play key tones, so return false // in order to let other listeners consume the event. return false; }

2.5 添加音频效果的设置项

(1)首先在设置界面添加这两个选项 代码 位置:

ArcherMind Inc. Proprietary – For Internal Use Only

CONFIDENTIAL Date

Page 20 of 33


ANDROID Audio音效的设置和控制(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:二外法语讲义—词汇语法篇-1

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: