Android 6.0新增自定義鈴聲
/// M: Get whether to show the 'More Ringtones' item
mHasMoreRingtonesItem = intent.getBooleanExtra(
RingtoneManager.EXTRA_RINGTONE_SHOW_MORE_RINGTONES, false);
啟動RingtonePickerActivity的時候把RingtoneManager.EXTRA_RINGTONE_SHOW_MORE_RINGTONES設定成true。在/packages/apps/Settings/src/com/android/settings/RingtonePreference.java檔案的onPrepareRingtonePickerIntent新增程式碼 //addringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_MORE_RINGTONES, true);
\80_c_m\alps\packages\apps\Settings\src\com\android\settings\DefaultRingtonePreference.java
\80_c_m\alps\packages\apps\Settings\src\com\mediatek\audioprofile\DefaultRingtonePreference.java
@Override
protected void onPrepareRingtonePickerIntent(Intent ringtonePickerIntent) {
super.onPrepareRingtonePickerIntent(ringtonePickerIntent);
/*
* Since this preference is for choosing the default ringtone, it
* doesn't make sense to show a 'Default' item.
*/
ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, false);
ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_MORE_RINGTONES, true);
}
在80_c_m\update\jinhuima\v117_hd720p_s006d_b1_1GB_16GB_2d2\packages\providers\MediaProvider\src\com\android\providers\media\RingtonePickerActivity.java
onCreate方法中新增
mHasMoreRingtonesItem = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_MORE_RINGTONES, true);