[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] Fixes #505: Custom bridges Send to Email feature does not include Subject or Body message for some devices
commit ef8a8f1dc7d0d0182f6ab22d5411f0bc5af875f1
Author: sisbell <shane.isbell@xxxxxxxxx>
Date: Sun Aug 1 14:59:33 2021 -0700
Fixes #505: Custom bridges Send to Email feature does not include Subject or Body message for some devices
---
.../android/ui/onboarding/CustomBridgesActivity.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
index 9b668413..91f50235 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
@@ -102,9 +102,14 @@ public class CustomBridgesActivity extends AppCompatActivity implements TextWatc
}
});
findViewById(R.id.btEmail).setOnClickListener(v -> {
- Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + EMAIL_TOR_BRIDGES));
- emailIntent.putExtra(Intent.EXTRA_SUBJECT, "get transport");
- emailIntent.putExtra(Intent.EXTRA_TEXT, "get transport");
+ String requestText = "get transport";
+ String emailUrl = String.format("mailto: %s?subject=%s&body=%s" ,
+ Uri.encode(EMAIL_TOR_BRIDGES),
+ Uri.encode(requestText),
+ Uri.encode(requestText));
+ Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(emailUrl));
+ emailIntent.putExtra(Intent.EXTRA_SUBJECT, requestText);
+ emailIntent.putExtra(Intent.EXTRA_TEXT, requestText);
startActivity(Intent.createChooser(emailIntent, getString(R.string.send_email)));
});
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits