List of usage examples for android.telecom TelecomManager getAdnUriForPhoneAccount
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle)
From source file:com.mobileglobe.android.customdialer.common.compat.telecom.TelecomManagerCompat.java
/** * Get the URI for running an adn query. * * @param telecomManager the {@link TelecomManager} used for method calls, if possible. * @param accountHandle The handle for the account to derive an adn query URI for or * {@code null} to return a URI which will use the default account. * @return The URI (with the content:// scheme) specific to the specified {@link PhoneAccount} * for the the content retrieve.// w w w. j av a2 s . c o m */ public static Uri getAdnUriForPhoneAccount(@Nullable TelecomManager telecomManager, PhoneAccountHandle accountHandle) { if (telecomManager != null && (CompatUtils.isMarshmallowCompatible() || CompatUtils .isMethodAvailable(TELECOM_MANAGER_CLASS, "getAdnUriForPhoneAccount", PhoneAccountHandle.class))) { return telecomManager.getAdnUriForPhoneAccount(accountHandle); } return Uri.parse("content://icc/adn"); }