List of usage examples for android.app Activity checkCallingOrSelfPermission
@Override public int checkCallingOrSelfPermission(String permission)
From source file:com.gamethrive.TrackGooglePurchase.java
static boolean CanTrack(Activity activity) { if (iapEnabled == -99) iapEnabled = activity.checkCallingOrSelfPermission("com.android.vending.BILLING"); try {/* ww w . j a v a2 s. c o m*/ if (iapEnabled == PackageManager.PERMISSION_GRANTED) IInAppBillingServiceClass = Class.forName("com.android.vending.billing.IInAppBillingService"); } catch (Throwable t) { iapEnabled = 0; return false; } return (iapEnabled == PackageManager.PERMISSION_GRANTED); }