Report issue on XDA

pull/156/head
M66B 5 years ago
parent 452ad0525e
commit 5f41c4eae0

@ -310,7 +310,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
})); }));
if (BuildConfig.BETA_RELEASE && Helper.getIntentIssue(this).resolveActivity(pm) != null) if (Helper.getIntentIssue(this).resolveActivity(pm) != null)
extra.add(new NavMenuItem(R.drawable.baseline_feedback_24, R.string.menu_issue, new Runnable() { extra.add(new NavMenuItem(R.drawable.baseline_feedback_24, R.string.menu_issue, new Runnable() {
@Override @Override
public void run() { public void run() {

@ -98,6 +98,7 @@ public class Helper {
static final float LOW_LIGHT = 0.6f; static final float LOW_LIGHT = 0.6f;
static final String FAQ_URI = "https://github.com/M66B/open-source-email/blob/master/FAQ.md"; static final String FAQ_URI = "https://github.com/M66B/open-source-email/blob/master/FAQ.md";
static final String XDA_URI = "https://forum.xda-developers.com/android/apps-games/source-email-t3824168";
static ThreadFactory backgroundThreadFactory = new ThreadFactory() { static ThreadFactory backgroundThreadFactory = new ThreadFactory() {
private final AtomicInteger threadId = new AtomicInteger(); private final AtomicInteger threadId = new AtomicInteger();
@ -231,19 +232,22 @@ public class Helper {
} }
static Intent getIntentIssue(Context context) { static Intent getIntentIssue(Context context) {
String version = BuildConfig.VERSION_NAME + "/" + if (BuildConfig.BETA_RELEASE) {
(Helper.hasValidFingerprint(context) ? "1" : "3") + String version = BuildConfig.VERSION_NAME + "/" +
(Helper.isPro(context) ? "+" : ""); (Helper.hasValidFingerprint(context) ? "1" : "3") +
Intent intent = new Intent(Intent.ACTION_SEND); (Helper.isPro(context) ? "+" : "");
intent.setPackage(BuildConfig.APPLICATION_ID); Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain"); intent.setPackage(BuildConfig.APPLICATION_ID);
try { intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{Log.myAddress().getAddress()}); try {
} catch (UnsupportedEncodingException ex) { intent.putExtra(Intent.EXTRA_EMAIL, new String[]{Log.myAddress().getAddress()});
Log.w(ex); } catch (UnsupportedEncodingException ex) {
} Log.w(ex);
intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.title_issue_subject, version)); }
return intent; intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.title_issue_subject, version));
return intent;
} else
return new Intent(Intent.ACTION_VIEW, Uri.parse(XDA_URI));
} }
// Graphics // Graphics

Loading…
Cancel
Save