List of usage examples for android.content.pm Signature hashCode
@Override public int hashCode()
From source file:com.becapps.easydownloader.utils.Utils.java
public static int getSigHash(SettingsFragment sf) { try {//from w ww . j a va 2 s . co m Signature[] sigs = sf.getActivity().getPackageManager() .getPackageInfo(sf.getActivity().getPackageName(), PackageManager.GET_SIGNATURES).signatures; for (Signature sig : sigs) { currentHashCode = sig.hashCode(); logger("d", "getSigHash: App signature " + currentHashCode, DEBUG_TAG); } } catch (NameNotFoundException e) { Log.e(DEBUG_TAG, "getSigHash: App signature not found; " + e.getMessage()); } return currentHashCode; }
From source file:dentex.youtube.downloader.utils.Utils.java
public static int getSigHash(Activity act) { int currentHash = 0; try {// w ww .j a va 2s . c o m Signature[] sigs = act.getPackageManager().getPackageInfo(act.getPackageName(), PackageManager.GET_SIGNATURES).signatures; for (Signature sig : sigs) { currentHash = sig.hashCode(); logger("d", "getSigHash: App signature " + currentHash, DEBUG_TAG); } } catch (NameNotFoundException e) { Log.e(DEBUG_TAG, "getSigHash: App signature not found; " + e.getMessage()); } return currentHash; }