NOT_ARRAY
NOT_ARRAY
ArcherMind Inc. Proprietary – For Internal Use Only
CONFIDENTIAL Date
Page 16 of 33
NOT_ARRAY
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的默认铃声
NOT_ARRAY
ArcherMind Inc. Proprietary – For Internal Use Only
CONFIDENTIAL Date
Page 17 of 33
开关机铃声比较特殊;
开关机是否有铃声是由 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.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