Lines Matching refs:context
51 public static boolean setDefaultDialerApplication(Context context, String packageName) { in setDefaultDialerApplication() argument
52 return setDefaultDialerApplication(context, packageName, ActivityManager.getCurrentUser()); in setDefaultDialerApplication()
65 public static boolean setDefaultDialerApplication(Context context, String packageName, in setDefaultDialerApplication() argument
68 String oldPackageName = Settings.Secure.getStringForUser(context.getContentResolver(), in setDefaultDialerApplication()
77 List<String> packageNames = getInstalledDialerApplications(context); in setDefaultDialerApplication()
81 Settings.Secure.putStringForUser(context.getContentResolver(), in setDefaultDialerApplication()
101 public static String getDefaultDialerApplication(Context context) { in getDefaultDialerApplication() argument
102 return getDefaultDialerApplication(context, context.getUserId()); in getDefaultDialerApplication()
118 public static String getDefaultDialerApplication(Context context, int user) { in getDefaultDialerApplication() argument
119 String defaultPackageName = Settings.Secure.getStringForUser(context.getContentResolver(), in getDefaultDialerApplication()
122 final List<String> packageNames = getInstalledDialerApplications(context, user); in getDefaultDialerApplication()
130 String systemDialerPackageName = getTelecomManager(context).getSystemDialerPackage(); in getDefaultDialerApplication()
155 public static List<String> getInstalledDialerApplications(Context context, int userId) { in getInstalledDialerApplications() argument
156 PackageManager packageManager = context.getPackageManager(); in getInstalledDialerApplications()
177 return filterByIntent(context, packageNames, dialIntentWithTelScheme, userId); in getInstalledDialerApplications()
180 public static List<String> getInstalledDialerApplications(Context context) { in getInstalledDialerApplications() argument
181 return getInstalledDialerApplications(context, Process.myUserHandle().getIdentifier()); in getInstalledDialerApplications()
196 public static boolean isDefaultOrSystemDialer(Context context, String packageName) { in isDefaultOrSystemDialer() argument
200 final TelecomManager tm = getTelecomManager(context); in isDefaultOrSystemDialer()
214 private static List<String> filterByIntent(Context context, List<String> packageNames, in filterByIntent() argument
221 final List<ResolveInfo> resolveInfoList = context.getPackageManager() in filterByIntent()
236 private static TelecomManager getTelecomManager(Context context) { in getTelecomManager() argument
237 return (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); in getTelecomManager()