Refactoring

This commit is contained in:
M66B 2015-11-03 10:42:55 +01:00
parent c1e8c20c3b
commit cf378dbb33
1 changed files with 2 additions and 3 deletions

View File

@ -56,13 +56,12 @@ public class Util {
}
public static boolean isPackageInstalled(String packageName, Context context) {
PackageManager pm = context.getPackageManager();
try {
PackageInfo info = pm.getPackageInfo(packageName, 0);
context.getPackageManager().getPackageInfo(packageName, 0);
return true;
} catch (PackageManager.NameNotFoundException ignored) {
return false;
}
return true;
}
public static void toast(final String text, final int length, final Context context) {