public class DefaultDialerManager extends Object
Constructor and Description |
---|
DefaultDialerManager() |
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultDialerApplication(Context context)
Returns the installed dialer application for the current user that will be used to receive
incoming calls, and is allowed to make emergency calls.
|
static String |
getDefaultDialerApplication(Context context,
int user)
Returns the installed dialer application for the specified user that will be used to receive
incoming calls, and is allowed to make emergency calls.
|
static List<String> |
getInstalledDialerApplications(Context context) |
static List<String> |
getInstalledDialerApplications(Context context,
int userId)
Returns a list of installed and available dialer applications.
|
static boolean |
isDefaultOrSystemDialer(Context context,
String packageName)
Determines if the package name belongs to the user-selected default dialer or the preloaded
system dialer, and thus should be allowed to perform certain privileged operations.
|
static boolean |
setDefaultDialerApplication(Context context,
String packageName)
Sets the specified package name as the default dialer application for the current user.
|
static boolean |
setDefaultDialerApplication(Context context,
String packageName,
int user)
Sets the specified package name as the default dialer application for the specified user.
|
public static boolean setDefaultDialerApplication(Context context, String packageName)
true
if the default dialer application was successfully changed,
false
otherwise.public static boolean setDefaultDialerApplication(Context context, String packageName, int user)
true
if the default dialer application was successfully changed,
false
otherwise.public static String getDefaultDialerApplication(Context context)
public static String getDefaultDialerApplication(Context context, int user)
public static List<String> getInstalledDialerApplications(Context context, int userId)
public static List<String> getInstalledDialerApplications(Context context)
public static boolean isDefaultOrSystemDialer(Context context, String packageName)
context
- A valid context.packageName
- of the package to check for.true
if the provided package name corresponds to the user-selected default
dialer or the preloaded system dialer, false
otherwise.