AppHelper { public static int getSignaturesHashCode(Context context) { int hashCode = 0; try { Signature[] signs = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).signatures; if (signs != null && signs.length > 0) { hashCode = signs[0].hashCode(); } } catch (NameNotFoundException e) { Dbg.printStackTrace(e); } return hashCode; } private  AppHelper(); static void debugPrintSignatures(Context context); static int getSignaturesHashCode(Context context); static String getAppLabel(Context context); static String getAppVersion(Context context); static int getAppVersionCode(Context context); static int getApkAppVersionCode(Context context, String apkFullPath); static PackageInfo getPackageInfo(Context context); static String getPackageNameFromApk(Context context, String fileName); static long getApkBuildDate(Context context); static boolean isAppInstalledToSDCard(Context context); static void removeApplication(Context context, String pkgName); static void installApplication(Context context, File file); static boolean isPackageExisted(Context context, String targetPackage);  }
@Test public void testGetSignaturesHashCode() throws Exception { int hash = AppHelper.getSignaturesHashCode(getTargetContext()); assertEquals(0, hash); }