List of usage examples for android.telecom TelecomManager silenceRinger
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void silenceRinger()
From source file:com.mobileglobe.android.customdialer.common.compat.telecom.TelecomManagerCompat.java
/** * Silences the ringer if a ringing call exists. Noop if {@link TelecomManager#silenceRinger()} * is unavailable./*w w w . j av a2s . co m*/ * * @param telecomManager the TelecomManager to use to silence the ringer. */ public static void silenceRinger(@Nullable TelecomManager telecomManager) { if (telecomManager != null && (CompatUtils.isMarshmallowCompatible() || CompatUtils.isMethodAvailable(TELECOM_MANAGER_CLASS, "silenceRinger"))) { telecomManager.silenceRinger(); } }