Merge "Cast copied text to string before sending share intent" into tm-dev

This commit is contained in:
Miranda Kephart
2022-04-07 13:25:12 +00:00
committed by Android (Google) Code Review

View File

@@ -95,7 +95,7 @@ public class EditTextActivity extends Activity
private void share() {
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, mEditText.getText());
sendIntent.putExtra(Intent.EXTRA_TEXT, mEditText.getText().toString());
sendIntent.setType("text/plain");
Intent shareIntent = Intent.createChooser(sendIntent, null);