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

Commit d6b56221 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: dff157c4

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



Change-Id: Iabc857288179ff0d3fb99c7a6e29e6b0e33361b8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 18506881 dff157c4
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);