/** * Returns whether vibration is set for voicemail notification in Phone settings. * * @param telephonyManager The telephony manager instance to use for method calls. * @param accountHandle The handle for the {@link android.telecom.PhoneAccount} for which to * retrieve the voicemail vibration setting. * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise. */ public static boolean isVoicemailVibrationEnabled(TelephonyManager telephonyManager, PhoneAccountHandle accountHandle) { if (!CompatUtils.isNCompatible()) { return true; } return TelephonyManagerSdkCompat .isVoicemailVibrationEnabled(telephonyManager, accountHandle); } }
/** * Returns the URI for the per-account voicemail ringtone set in Phone settings. * * @param telephonyManager The telephony manager instance to use for method calls. * @param accountHandle The handle for the {@link android.telecom.PhoneAccount} for which to * retrieve the voicemail ringtone. * @return The URI for the ringtone to play when receiving a voicemail from a specific * PhoneAccount. */ @Nullable public static Uri getVoicemailRingtoneUri(TelephonyManager telephonyManager, PhoneAccountHandle accountHandle) { if (!CompatUtils.isNCompatible()) { return null; } return TelephonyManagerSdkCompat .getVoicemailRingtoneUri(telephonyManager, accountHandle); }