Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b103a155 authored by Matt Casey's avatar Matt Casey Committed by Automerger Merge Worker
Browse files

Merge "Remove spans from edited text when copying back to clipboard" into...

Merge "Remove spans from edited text when copying back to clipboard" into tm-dev am: fc51b366 am: 251463ca

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18602605



Change-Id: I935540ba28d35e564bb4aff8d570ceb8b5dbb7dc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3759ddbc 251463ca
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.text.Editable;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
@@ -93,7 +94,9 @@ public class EditTextActivity extends Activity
    }

    private void saveToClipboard() {
        ClipData clip = ClipData.newPlainText("text", mEditText.getText());
        Editable editedText = mEditText.getText();
        editedText.clearSpans();
        ClipData clip = ClipData.newPlainText("text", editedText);
        PersistableBundle extras = new PersistableBundle();
        extras.putBoolean(ClipDescription.EXTRA_IS_SENSITIVE, mSensitive);
        clip.getDescription().setExtras(extras);