(Context context, String reference)
| 1466 | } |
| 1467 | |
| 1468 | static Intent getIntentIssue(Context context, String reference) { |
| 1469 | if (ActivityBilling.isPro(context) && false) { |
| 1470 | String version = getAnnotatedVersion(context); |
| 1471 | Intent intent = new Intent(Intent.ACTION_SEND); |
| 1472 | //intent.setPackage(BuildConfig.APPLICATION_ID); |
| 1473 | intent.setType("text/plain"); |
| 1474 | |
| 1475 | try { |
| 1476 | intent.putExtra(Intent.EXTRA_EMAIL, new String[]{Log.myAddress().getAddress()}); |
| 1477 | } catch (UnsupportedEncodingException ex) { |
| 1478 | Log.w(ex); |
| 1479 | } |
| 1480 | |
| 1481 | intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.title_issue_subject, version)); |
| 1482 | |
| 1483 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); |
| 1484 | String language = prefs.getString("language", null); |
| 1485 | boolean reporting = prefs.getBoolean("crash_reports", false); |
| 1486 | String uuid = prefs.getString("uuid", null); |
| 1487 | Locale slocale = Resources.getSystem().getConfiguration().locale; |
| 1488 | |
| 1489 | String html = "<br><br>"; |
| 1490 | |
| 1491 | html += "<p style=\"font-size:small;\">"; |
| 1492 | html += "Android: " + Build.VERSION.RELEASE + " (SDK " + Build.VERSION.SDK_INT + ")<br>"; |
| 1493 | html += "Device: " + Build.MANUFACTURER + " " + Build.MODEL + " " + Build.DEVICE + "<br>"; |
| 1494 | html += "Locale: " + Html.escapeHtml(slocale.toString()) + "<br>"; |
| 1495 | if (language != null) |
| 1496 | html += "Language: " + Html.escapeHtml(language) + "<br>"; |
| 1497 | if ((reporting || Log.isTestRelease()) && uuid != null) |
| 1498 | html += "UUID: " + Html.escapeHtml(uuid) + "<br>"; |
| 1499 | html += "</p>"; |
| 1500 | |
| 1501 | intent.putExtra(Intent.EXTRA_TEXT, HtmlHelper.getText(context, html)); |
| 1502 | intent.putExtra(Intent.EXTRA_HTML_TEXT, html); |
| 1503 | |
| 1504 | return intent; |
| 1505 | } else { |
| 1506 | if (Helper.hasValidFingerprint(context)) |
| 1507 | return new Intent(Intent.ACTION_VIEW, getSupportUri(context, reference)); |
| 1508 | else |
| 1509 | return new Intent(Intent.ACTION_VIEW, Uri.parse(FAQ_BASE_URI + "#faq147")); |
| 1510 | } |
| 1511 | } |
| 1512 | |
| 1513 | static Intent getIntentRate(Context context) { |
| 1514 | return new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + BuildConfig.APPLICATION_ID)); |
no test coverage detected