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

Commit 6154b090 authored by Andrei Stingaceanu's avatar Andrei Stingaceanu
Browse files

Text processing - stop showing an empty toast.

If the text processing app returns empty or null text don't show the toast.

Bug: 20326103
Change-Id: Ib8534b851d2046fe7c17f674f170f9630e4a364d
parent ca02bc7c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1460,10 +1460,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            if (isTextEditable()) {
                replaceSelectionWithText(result);
            } else {
                if (result.length() > 0) {
                    Toast.makeText(getContext(), String.valueOf(result), Toast.LENGTH_LONG).show();
                }
            }
        }
    }

    private void setTypefaceFromAttrs(String familyName, int typefaceIndex, int styleIndex) {
        Typeface tf = null;