MCPcopy Create free account
hub / github.com/M66B/FairEmail / isInstalled

Method isInstalled

app/src/main/java/eu/faircode/email/Helper.java:718–727  ·  view source on GitHub ↗
(Context context, String pkg)

Source from the content-addressed store, hash-verified

716 }
717
718 static boolean isInstalled(Context context, String pkg) {
719 try {
720 PackageManager pm = context.getPackageManager();
721 pm.getPackageInfo(pkg, 0);
722 return true;
723 } catch (Throwable ex) {
724 Log.i(ex);
725 return false;
726 }
727 }
728
729 static boolean isComponentEnabled(Context context, Class<?> clazz) {
730 PackageManager pm = context.getPackageManager();

Callers 1

viewMethod · 0.95

Calls 1

iMethod · 0.95

Tested by

no test coverage detected