不带自动接听

This commit is contained in:
chenbin
2021-05-06 17:28:15 +08:00
parent de8bf0b61c
commit 3b28584e4c
3 changed files with 28 additions and 13 deletions

View File

@@ -336,14 +336,18 @@ public class SipEngine implements BluetelInterface {
*
* @throws Exception
*/
public void PlaydefaultCallMediaPlayer(Context context) {
public Ringtone PlaydefaultCallMediaPlayer(Context context) {
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
Ringtone r = RingtoneManager.getRingtone(context, notification);
r.play();
return r;
}
public void StopdefaultCallMediaPlayer(Context context) {
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
Ringtone r = RingtoneManager.getRingtone(context, notification);
r.stop();
public void StopdefaultCallMediaPlayer(Ringtone r) {
// Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
// Ringtone r = RingtoneManager.getRingtone(context, notification);
// r.stop();
if(r != null) {
r.stop();
}
}
}