Example usage for android.telecom TelecomManager getSimCallManager

List of usage examples for android.telecom TelecomManager getSimCallManager

Introduction

In this page you can find the example usage for android.telecom TelecomManager getSimCallManager.

Prototype

public PhoneAccountHandle getSimCallManager() 

Source Link

Document

Returns the current SIM call manager.

Usage

From source file:com.mobileglobe.android.customdialer.common.compat.telecom.TelecomManagerCompat.java

/**
 * Returns the current SIM call manager. Apps must be prepared for this method to return null,
 * indicating that there currently exists no registered SIM call manager.
 *
 * @param telecomManager the {@link TelecomManager} to use to fetch the SIM call manager.
 * @return The phone account handle of the current sim call manager.
 *///w w  w. ja  v a 2 s.  c om
@Nullable
public static PhoneAccountHandle getSimCallManager(TelecomManager telecomManager) {
    if (telecomManager != null && (CompatUtils.isMarshmallowCompatible()
            || CompatUtils.isMethodAvailable(TELECOM_MANAGER_CLASS, "getSimCallManager"))) {
        return telecomManager.getSimCallManager();
    }
    return null;
}