From 39d59c73538bbcbd8c0c1303e5a80c7772c5f436 Mon Sep 17 00:00:00 2001 From: Matt Casey Date: Thu, 2 Jun 2022 20:14:26 +0000 Subject: [PATCH] Remove share button from clipboard edit activity Redundant with clipboard overlay. Updated layout constraints a bit to adjust for this. Bug: 227756946 Test: Manual inspection. Change-Id: Ie114a66a97fade4c691eedb5a4395bfa619e3397 --- .../layout/clipboard_edit_text_activity.xml | 26 ++++--------------- .../clipboardoverlay/EditTextActivity.java | 12 --------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/packages/SystemUI/res/layout/clipboard_edit_text_activity.xml b/packages/SystemUI/res/layout/clipboard_edit_text_activity.xml index 3d784898f56da..cb7f40f6d87d1 100644 --- a/packages/SystemUI/res/layout/clipboard_edit_text_activity.xml +++ b/packages/SystemUI/res/layout/clipboard_edit_text_activity.xml @@ -28,32 +28,16 @@ app:layout_constraintStart_toStartOf="@id/done_button" app:layout_constraintTop_toBottomOf="@id/done_button" /> - - + > saveToClipboard()); - findViewById(R.id.share).setOnClickListener((v) -> share()); mEditText = findViewById(R.id.edit_text); mAttribution = findViewById(R.id.attribution); mClipboardManager = requireNonNull(getSystemService(ClipboardManager.class)); @@ -106,16 +104,6 @@ public class EditTextActivity extends Activity finish(); } - private void share() { - Intent sendIntent = new Intent(); - sendIntent.setAction(Intent.ACTION_SEND); - sendIntent.putExtra(Intent.EXTRA_TEXT, mEditText.getText().toString()); - sendIntent.setType("text/plain"); - - Intent shareIntent = Intent.createChooser(sendIntent, null); - startActivity(shareIntent); - } - private void hideIme() { InputMethodManager imm = getSystemService(InputMethodManager.class); imm.hideSoftInputFromWindow(mEditText.getWindowToken(), 0);