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

Commit 072b50c6 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

SuggestionEnabled flag enforced in ActionPopup

Also removed the Nothing to paste string (and its references)

Change-Id: Iaed952075e9e72dcb962ca52341615bc57cb4047
parent e963ebdb
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -16,6 +16,11 @@

package android.widget;

import com.android.internal.util.FastMath;
import com.android.internal.widget.EditableInputConnection;

import org.xmlpull.v1.XmlPullParserException;

import android.R;
import android.content.ClipData;
import android.content.ClipData.Item;
@@ -134,11 +139,6 @@ import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.widget.RemoteViews.RemoteView;

import com.android.internal.util.FastMath;
import com.android.internal.widget.EditableInputConnection;

import org.xmlpull.v1.XmlPullParserException;

import java.io.IOException;
import java.lang.ref.WeakReference;
import java.text.BreakIterator;
@@ -9693,6 +9693,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        @Override
        public void show() {
            mPasteTextView.setVisibility(canPaste() ? View.VISIBLE : View.GONE);
            mReplaceTextView.setVisibility(mSuggestionsEnabled ? View.VISIBLE : View.GONE);

            if (!canPaste() && !mSuggestionsEnabled) return;

            super.show();
        }

+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@
        android:textAppearance="?android:attr/textAppearanceMediumInverse"
        android:textColor="@android:color/dim_foreground_dark_inverse_disabled"
        android:background="@android:drawable/text_edit_paste_window"
        android:text="@android:string/pasteDisabled"
        android:layout_marginBottom="12dip"
    />

+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@
        android:textAppearance="?android:attr/textAppearanceMediumInverse"
        android:textColor="@android:color/dim_foreground_dark_inverse_disabled"
        android:background="@android:drawable/text_edit_side_paste_window"
        android:text="@android:string/pasteDisabled"
        android:layout_marginBottom="12dip"
    />

+0 −3
Original line number Diff line number Diff line
@@ -2403,9 +2403,6 @@
    <!-- Item on EditText context menu. This action is used to paste from the clipboard into the eidt field -->
    <string name="paste">Paste</string>

    <!-- Text displayed in a popup dialog in TextEdit when the clipboard is empty. 'paste' is used otherwise. [CHAR LIMIT=20] -->
    <string name="pasteDisabled">Nothing to paste</string>

    <!-- Item on EditText context menu. This action is used to replace the current word by other suggested words, suggested by the IME or the spell checker -->
    <string name="replace">Replace</string>