/** * Start ringing announce for a given contact. It will also focus audio for us. * * @param remoteContact the contact to ring for. May resolve the contact ringtone if any. */ public synchronized void startRing(String remoteContact) { saveAudioState(); if (!ringer.isRinging()) { ringer.ring(remoteContact, service.getPrefs().getRingtone()); } else { Log.d(THIS_FILE, "Already ringing ...."); } }
public void setSpeakerphoneOn(boolean on) throws SameThreadException { if (service != null && restartAudioWhenRoutingChange && !ringer.isRinging()) { service.setNoSnd(); userWantSpeaker = on; service.setSnd(); } else { userWantSpeaker = on; audioManager.setSpeakerphoneOn(on); } broadcastMediaChanged(); }
public void setBluetoothOn(boolean on) throws SameThreadException { Log.d(THIS_FILE, "Set BT " + on); if (service != null && restartAudioWhenRoutingChange && !ringer.isRinging()) { service.setNoSnd(); userWantBluetooth = on; service.setSnd(); } else { userWantBluetooth = on; bluetoothWrapper.setBluetoothOn(on); } broadcastMediaChanged(); }
/** * Stop all ringing. <br> * Warning, this will not unfocus audio. */ public synchronized void stopRing() { LogUtils.e("ringring", "stop"); if (ringer.isRinging()) { ringer.stopRing(); } }