(Context context)
| 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) { |
no test coverage detected