MCPcopy Create free account
hub / github.com/M66B/NetGuard / isPurchasedAny

Method isPurchasedAny

app/src/main/java/eu/faircode/netguard/IAB.java:199–214  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

197 }
198
199 public static boolean isPurchasedAny(Context context) {
200 try {
201 if (Util.isDebuggable(context)) {
202 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
203 return !(prefs.getBoolean("debug_iab", false));
204 }
205
206 SharedPreferences prefs = context.getSharedPreferences("IAB", Context.MODE_PRIVATE);
207 for (String key : prefs.getAll().keySet())
208 if (prefs.getBoolean(key, false))
209 return true;
210 return false;
211 } catch (SecurityException ignored) {
212 return false;
213 }
214 }
215
216 public static String getResult(int responseCode) {
217 switch (responseCode) {

Callers 2

onResumeMethod · 0.95
onCreateOptionsMenuMethod · 0.95

Calls 1

isDebuggableMethod · 0.95

Tested by

no test coverage detected