mt6735 L版本上music如何设置双卡铃声
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
打开情景模式的设置双卡铃声的feature:mtk_MULTISIM_RINGTONE_SUPPORT,Music中却不能设置双卡铃声。
希望能在Music添加菜单“Us as SIM1/SIM2 ringtone”
[SOLUTION]
首先要打ALPS01901475这个双卡铃声的patch,并且MTK_MULTISIM_RINGTONE_SUPPORT设为true。
1,string.xml,添加新的string ringtone_as_sim1_menu和ringtone_as_sim2_menu :
<string name="ringtone_as_sim1_menu">Use as SIM1 ringtone</string>
<string name="ringtone_as_sim2_menu">Use as SIM2 ringtone</string>
2,TrackBrowserActivity.java:
1),添加:
// start modify Music MultiSim
import android.telephony.TelephonyManager;
import android.telephony.SubscriptionManager;
import android.os.SystemProperties;
import android.telephony.SubInfoRecord;
import java.util.List;
// end modify Music MultiSim
2),menu根据插卡情况添加Us as SIM1 ringtone/Us as SIM2 ringtone,若没有插卡,则没有设置铃声选项 参考//start modify和//end modify之间的修改
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo
menuInfoIn) {
...
if (MusicFeatureOption.IS_SUPPORT_DRM) {
isDrm =
mTrackCursor.getInt(mTrackCursor.getColumnIndexOrThrow(MediaStore.Audio.Media.IS_DRM));
int drmMethod =
mTrackCursor.getInt(mTrackCursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DRM_METHO
D));
if (isVoiceCapable && canDispalyRingtone(isDrm, drmMethod)) {
//start modify Music MultiSim
final TelephonyManager mTeleManager =
(TelephonyManager)this.getSystEMService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0,
R.string.ringtone_as_sim1_menu);//ringtone_as_sim1_menu
menu.add(0, USE_AS_SIM2_RINGTONE, 0,
R.string.ringtone_as_sim2_menu);//ringtone_as_sim2_menu
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}else //end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
} else {
if (isVoiceCapable) {
//start modify Music MultiSim
final TelephonyManager mTeleManager = (TelephonyManager)
this.getSystemService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0,
R.string.ringtone_as_sim1_menu);//ringtone_as_sim1_menu
menu.add(0, USE_AS_SIM2_RINGTONE, 0,
R.string.ringtone_as_sim2_menu);//ringtone_as_sim2_menu
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}else //end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}
menu.add(0, DELETE_ITEM, 0, R.string.delete_item);
...
}
3),修改添加USE_AS_RINGTONE、USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE case的处理,参考
//start modify和//end modify之间的修改
public boolean onContextItemSelected(MenuItem item) {
....
switch (item.getItemId()) {
....
case USE_AS_RINGTONE:
// Set the system setting to make this the current ringtone
//start modify Music MultiSim
if (SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
MusicUtils.setRingtone(this, mSelectedId,subInfoList.get(0).subId);
}else
//end modify Music MultiSim
MusicUtils.setRingtone(this, mSelectedId);
return true;
//start modify Music MultiSim
case USE_AS_SIM1_RINGTONE:
// Set the system setting to make this the current ringtone1
long subId=SubscriptionManager.getSubIdUsingSlotId(0)[0];
MusicLogUtils.d(TAG, "onContextItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mSelectedId,subId);
return true;
case USE_AS_SIM2_RINGTONE:
// Set the system setting to make this the current ringtone2
subId=SubscriptionManager.getSubIdUsingSlotId(1)[0];
MusicLogUtils.d(TAG, "onContextItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mSelectedId,subId);
return true;
//end modify Music MultiSim
....
}
3. MediaPlaybackActivity.java
1). 引入文件
// start modify Music MultiSim
import android.telephony.TelephonyManager;
import android.telephony.SubscriptionManager;
import android.os.SystemProperties;
import android.telephony.SubInfoRecord;
import java.util.List;
// end modify Music MultiSim
2)menu根据插卡情况添加Us as SIM1 ringtone/Us as SIM2 ringtone,若没有插卡,则没有设置铃
声选项 参考//start modify和//end modify之间的修改
public boolean onCreateOptionsMenu(Menu menu) {
...
if (MusicUtils.isVoiceCapable(this)) {
//start modify Music MultiSim
final TelephonyManager mTeleManager =
(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_audio_profiles").equals("1") &&
SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0, R.string.ringtone_as_sim1_menu).setIcon(
R.drawable.ic_menu_set_as_ringtone);
menu.add(0, USE_AS_SIM2_RINGTONE, 0, R.string.ringtone_as_sim2_menu).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu_short).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}
}else
//end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu_short).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}
menu.add(0, DELETE_ITEM, 0, R.string.delete_item)
.setIcon(R.drawable.ic_menu_delete);
/// M: move to prepare option menu to disable menu when MusicFX is disable
...
return true;
}
return false;
}
3),修改添加USE_AS_RINGTONE、USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE case的处理,参考
//start modify和//end modify之间的修改
case USE_AS_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
//start modify Music MultiSim
if (SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
MusicUtils.setRingtone(this, mService.getAudioId(),subInfoList.get(0).subId);
}else
//end modify Music MultiSim
MusicUtils.setRingtone(this, mService.getAudioId());
}
return true;
}
//start modify Music MultiSim
case USE_AS_SIM1_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
long subId=SubscriptionManager.getSubIdUsingSlotId(0)[0];
MusicLogUtils.d(TAG, "onOptionsItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mService.getAudioId(),subId);
}
return true;
}
case USE_AS_SIM2_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
long subId=SubscriptionManager.getSubIdUsingSlotId(1)[0];
MusicLogUtils.d(TAG, "onOptionsItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mService.getAudioId(),subId);
}
return true;
}
//end modify Music MultiSim
4,MusicUtils.java:
public static final String SUFFIX_RINGER_URI = "_ringtone";
1), 引入文件
//startmodify Music MultiSim
import android.telephony.TelephonyManager;
import com.mediatek.audioprofile.AudioProfileManager;
import android.os.SystemProperties;
import android.telephony.SubscriptionManager;
//end modify Music MultiSim
2),添加USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE的定义,并修改CHILD_MENU_BASE:
public interface Defs {
....
/// M: add for drm
public final static int DRM_INFO = 15;
//start modify Music MultiSim
public final static int USE_AS_SIM1_RINGTONE = 16;
public final static int USE_AS_SIM2_RINGTONE = 17;
public final static int CHILD_MENU_BASE = 18; // this should be the last item
// public final static int CHILD_MENU_BASE = 16; // this should be the last item
//end modify Music MultiSim
3)修改setRingtone(),参数中增加slotId
static void setRingtone(Context context, long id, int slotId /* modify Music MultiSim
*/) {
ContentResolver resolver = context.getContentResolver();
// Set the flag in the database to mark this as a ringtone
Uri ringUri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
id);
try {
ContentValues values = new ContentValues(2);
values.put(MediaStore.Audio.Media.IS_RINGTONE, "1");
values.put(MediaStore.Audio.Media.IS_ALARM, "1");
resolver.update(ringUri, values, null, null);
} catch (UnsupportedOperationException ex) {
// most likely the card just got unmounted
MusicLogUtils.e(TAG, "couldn't set ringtone flag for id " + id);
return;
}
String[] cols = new String[] {
MediaStore.Audio.Media._ID,
MediaStore.Audio.Media.DATA,
MediaStore.Audio.Media.TITLE
};
/// M: use selectionArgs replace set query value in where @{
String where = MediaStore.Audio.Media._ID + "=?";
String[] whereArgs = new String[]{String.valueOf(id)};
Cursor cursor = query(context, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
cols, where , whereArgs, null);
/// @}
try {
if (cursor != null && cursor.getCount() == 1) {
// Set the system setting to make this the current ringtone
cursor.moveToFirst();
//start modify Music MultiSim
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
AudioProfileManager mProfileManager = (AudioProfileManager)
context.getSystemService(Context.AUDIO_PROFILE_SERVICE);
String mActiveProfileKey = mProfileManager.getActiveProfileKey();
final TelephonyManager mTeleManager = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
if(slotId == -1){
Settings.System.putString(resolver, Settings.System.RINGTONE, ringUri.toString());
MusicLogUtils.d(TAG, "setRingtone:" + "slotId is null" + ", ringUri= "+ringUri);
}else {
MusicLogUtils.d(TAG, "setRingtone: " + "slotId = " + slotId + ", ringUri= "+ringUri);
mProfileManager.setRingtoneUri(mActiveProfileKey, AudioProfileManager.TYPE_RINGTONE,
slotId, ringUri);
}
}else
//end modify Music MultiSim
Settings.System.putString(resolver, Settings.System.RINGTONE, ringUri.toString());
String message = context.getString(R.string.ringtone_set, cursor.getString(2));
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
} finally {
if (cursor != null) {
cursor.close();
}
}
}
4)原来的setRingtone(Context context, long id)改成调用 setRingtone(Context context, long
id, int slotID),但是slotId为-1:
static void setRingtone(Context context, long id) {
setRingtone(context, id,-1);
}
打开情景模式的设置双卡铃声的feature:mtk_MULTISIM_RINGTONE_SUPPORT,Music中却不能设置双卡铃声。
希望能在Music添加菜单“Us as SIM1/SIM2 ringtone”
[SOLUTION]
首先要打ALPS01901475这个双卡铃声的patch,并且MTK_MULTISIM_RINGTONE_SUPPORT设为true。
1,string.xml,添加新的string ringtone_as_sim1_menu和ringtone_as_sim2_menu :
<string name="ringtone_as_sim1_menu">Use as SIM1 ringtone</string>
<string name="ringtone_as_sim2_menu">Use as SIM2 ringtone</string>
2,TrackBrowserActivity.java:
1),添加:
// start modify Music MultiSim
import android.telephony.TelephonyManager;
import android.telephony.SubscriptionManager;
import android.os.SystemProperties;
import android.telephony.SubInfoRecord;
import java.util.List;
// end modify Music MultiSim
2),menu根据插卡情况添加Us as SIM1 ringtone/Us as SIM2 ringtone,若没有插卡,则没有设置铃声选项 参考//start modify和//end modify之间的修改
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo
menuInfoIn) {
...
if (MusicFeatureOption.IS_SUPPORT_DRM) {
isDrm =
mTrackCursor.getInt(mTrackCursor.getColumnIndexOrThrow(MediaStore.Audio.Media.IS_DRM));
int drmMethod =
mTrackCursor.getInt(mTrackCursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DRM_METHO
D));
if (isVoiceCapable && canDispalyRingtone(isDrm, drmMethod)) {
//start modify Music MultiSim
final TelephonyManager mTeleManager =
(TelephonyManager)this.getSystEMService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0,
R.string.ringtone_as_sim1_menu);//ringtone_as_sim1_menu
menu.add(0, USE_AS_SIM2_RINGTONE, 0,
R.string.ringtone_as_sim2_menu);//ringtone_as_sim2_menu
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}else //end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
} else {
if (isVoiceCapable) {
//start modify Music MultiSim
final TelephonyManager mTeleManager = (TelephonyManager)
this.getSystemService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0,
R.string.ringtone_as_sim1_menu);//ringtone_as_sim1_menu
menu.add(0, USE_AS_SIM2_RINGTONE, 0,
R.string.ringtone_as_sim2_menu);//ringtone_as_sim2_menu
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}else //end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu);
}
}
menu.add(0, DELETE_ITEM, 0, R.string.delete_item);
...
}
3),修改添加USE_AS_RINGTONE、USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE case的处理,参考
//start modify和//end modify之间的修改
public boolean onContextItemSelected(MenuItem item) {
....
switch (item.getItemId()) {
....
case USE_AS_RINGTONE:
// Set the system setting to make this the current ringtone
//start modify Music MultiSim
if (SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
MusicUtils.setRingtone(this, mSelectedId,subInfoList.get(0).subId);
}else
//end modify Music MultiSim
MusicUtils.setRingtone(this, mSelectedId);
return true;
//start modify Music MultiSim
case USE_AS_SIM1_RINGTONE:
// Set the system setting to make this the current ringtone1
long subId=SubscriptionManager.getSubIdUsingSlotId(0)[0];
MusicLogUtils.d(TAG, "onContextItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mSelectedId,subId);
return true;
case USE_AS_SIM2_RINGTONE:
// Set the system setting to make this the current ringtone2
subId=SubscriptionManager.getSubIdUsingSlotId(1)[0];
MusicLogUtils.d(TAG, "onContextItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mSelectedId,subId);
return true;
//end modify Music MultiSim
....
}
3. MediaPlaybackActivity.java
1). 引入文件
// start modify Music MultiSim
import android.telephony.TelephonyManager;
import android.telephony.SubscriptionManager;
import android.os.SystemProperties;
import android.telephony.SubInfoRecord;
import java.util.List;
// end modify Music MultiSim
2)menu根据插卡情况添加Us as SIM1 ringtone/Us as SIM2 ringtone,若没有插卡,则没有设置铃
声选项 参考//start modify和//end modify之间的修改
public boolean onCreateOptionsMenu(Menu menu) {
...
if (MusicUtils.isVoiceCapable(this)) {
//start modify Music MultiSim
final TelephonyManager mTeleManager =
(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
int simNum = SubscriptionManager.getActiveSubInfoCount();
MusicLogUtils.d(TAG, "simNum:" + simNum);
if(SystemProperties.get("ro.mtk_audio_profiles").equals("1") &&
SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
if(simNum==2){
menu.add(0, USE_AS_SIM1_RINGTONE, 0, R.string.ringtone_as_sim1_menu).setIcon(
R.drawable.ic_menu_set_as_ringtone);
menu.add(0, USE_AS_SIM2_RINGTONE, 0, R.string.ringtone_as_sim2_menu).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}else if(simNum==1){
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu_short).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}
}else
//end modify Music MultiSim
menu.add(0, USE_AS_RINGTONE, 0, R.string.ringtone_menu_short).setIcon(
R.drawable.ic_menu_set_as_ringtone);
}
menu.add(0, DELETE_ITEM, 0, R.string.delete_item)
.setIcon(R.drawable.ic_menu_delete);
/// M: move to prepare option menu to disable menu when MusicFX is disable
...
return true;
}
return false;
}
3),修改添加USE_AS_RINGTONE、USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE case的处理,参考
//start modify和//end modify之间的修改
case USE_AS_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
//start modify Music MultiSim
if (SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
List<SubInfoRecord> subInfoList = SubscriptionManager.getActiveSubInfoList();
MusicUtils.setRingtone(this, mService.getAudioId(),subInfoList.get(0).subId);
}else
//end modify Music MultiSim
MusicUtils.setRingtone(this, mService.getAudioId());
}
return true;
}
//start modify Music MultiSim
case USE_AS_SIM1_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
long subId=SubscriptionManager.getSubIdUsingSlotId(0)[0];
MusicLogUtils.d(TAG, "onOptionsItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mService.getAudioId(),subId);
}
return true;
}
case USE_AS_SIM2_RINGTONE: {
// Set the system setting to make this the current ringtone
if (mService != null) {
long subId=SubscriptionManager.getSubIdUsingSlotId(1)[0];
MusicLogUtils.d(TAG, "onOptionsItemSelected subId= " + subId);
MusicUtils.setRingtone(this, mService.getAudioId(),subId);
}
return true;
}
//end modify Music MultiSim
4,MusicUtils.java:
public static final String SUFFIX_RINGER_URI = "_ringtone";
1), 引入文件
//startmodify Music MultiSim
import android.telephony.TelephonyManager;
import com.mediatek.audioprofile.AudioProfileManager;
import android.os.SystemProperties;
import android.telephony.SubscriptionManager;
//end modify Music MultiSim
2),添加USE_AS_SIM1_RINGTONE/USE_AS_SIM2_RINGTONE的定义,并修改CHILD_MENU_BASE:
public interface Defs {
....
/// M: add for drm
public final static int DRM_INFO = 15;
//start modify Music MultiSim
public final static int USE_AS_SIM1_RINGTONE = 16;
public final static int USE_AS_SIM2_RINGTONE = 17;
public final static int CHILD_MENU_BASE = 18; // this should be the last item
// public final static int CHILD_MENU_BASE = 16; // this should be the last item
//end modify Music MultiSim
3)修改setRingtone(),参数中增加slotId
static void setRingtone(Context context, long id, int slotId /* modify Music MultiSim
*/) {
ContentResolver resolver = context.getContentResolver();
// Set the flag in the database to mark this as a ringtone
Uri ringUri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
id);
try {
ContentValues values = new ContentValues(2);
values.put(MediaStore.Audio.Media.IS_RINGTONE, "1");
values.put(MediaStore.Audio.Media.IS_ALARM, "1");
resolver.update(ringUri, values, null, null);
} catch (UnsupportedOperationException ex) {
// most likely the card just got unmounted
MusicLogUtils.e(TAG, "couldn't set ringtone flag for id " + id);
return;
}
String[] cols = new String[] {
MediaStore.Audio.Media._ID,
MediaStore.Audio.Media.DATA,
MediaStore.Audio.Media.TITLE
};
/// M: use selectionArgs replace set query value in where @{
String where = MediaStore.Audio.Media._ID + "=?";
String[] whereArgs = new String[]{String.valueOf(id)};
Cursor cursor = query(context, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
cols, where , whereArgs, null);
/// @}
try {
if (cursor != null && cursor.getCount() == 1) {
// Set the system setting to make this the current ringtone
cursor.moveToFirst();
//start modify Music MultiSim
if(SystemProperties.get("ro.mtk_multisim_ringtone").equals("1")){
AudioProfileManager mProfileManager = (AudioProfileManager)
context.getSystemService(Context.AUDIO_PROFILE_SERVICE);
String mActiveProfileKey = mProfileManager.getActiveProfileKey();
final TelephonyManager mTeleManager = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
if(slotId == -1){
Settings.System.putString(resolver, Settings.System.RINGTONE, ringUri.toString());
MusicLogUtils.d(TAG, "setRingtone:" + "slotId is null" + ", ringUri= "+ringUri);
}else {
MusicLogUtils.d(TAG, "setRingtone: " + "slotId = " + slotId + ", ringUri= "+ringUri);
mProfileManager.setRingtoneUri(mActiveProfileKey, AudioProfileManager.TYPE_RINGTONE,
slotId, ringUri);
}
}else
//end modify Music MultiSim
Settings.System.putString(resolver, Settings.System.RINGTONE, ringUri.toString());
String message = context.getString(R.string.ringtone_set, cursor.getString(2));
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
} finally {
if (cursor != null) {
cursor.close();
}
}
}
4)原来的setRingtone(Context context, long id)改成调用 setRingtone(Context context, long
id, int slotID),但是slotId为-1:
static void setRingtone(Context context, long id) {
setRingtone(context, id,-1);
}
:lol:lol