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

Commit caed51bc authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Insertion handles fades out after being positionned"

parents 4dcd82be 3784a7f6
Loading
Loading
Loading
Loading
+18 −16
Original line number Diff line number Diff line
@@ -117,12 +117,12 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.ViewConfiguration;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
@@ -3424,7 +3424,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        return mHint;
    }

    private boolean isMultilineInputType(int type) {
    private static boolean isMultilineInputType(int type) {
        return (type & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) ==
            (EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
    }
@@ -3500,7 +3500,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        return mTransformation instanceof PasswordTransformationMethod;
    }

    private boolean isPasswordInputType(int inputType) {
    private static boolean isPasswordInputType(int inputType) {
        final int variation =
                inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
        return variation
@@ -3511,7 +3511,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                == (EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_VARIATION_PASSWORD);
    }

    private boolean isVisiblePasswordInputType(int inputType) {
    private static boolean isVisiblePasswordInputType(int inputType) {
        final int variation =
                inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
        return variation
@@ -5084,6 +5084,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     * @hide
     * @param offsetRequired
     */
    @Override
    protected int getFadeHeight(boolean offsetRequired) {
        return mLayout != null ? mLayout.getHeight() : 0;
    }
@@ -9200,16 +9201,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     * Paste actions, depending on what this View supports.
     *
     * A custom implementation can add new entries in the default menu in its
     * {@link ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The default actions
     * can also be removed from the menu using {@link Menu#removeItem(int)} and passing
     * {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy} or
     * {@link android.R.id#paste} ids as parameters.
     * {@link android.view.ActionMode.Callback#onPrepareActionMode(ActionMode, Menu)} method. The
     * default actions can also be removed from the menu using {@link Menu#removeItem(int)} and
     * passing {@link android.R.id#selectAll}, {@link android.R.id#cut}, {@link android.R.id#copy}
     * or {@link android.R.id#paste} ids as parameters.
     *
     * Returning false from {@link ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will
     * prevent the action mode from being started.
     * Returning false from 
     * {@link android.view.ActionMode.Callback#onCreateActionMode(ActionMode, Menu)} will prevent
     * the action mode from being started.
     *
     * Action click events should be handled by the custom implementation of
     * {@link ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
     * {@link android.view.ActionMode.Callback#onActionItemClicked(ActionMode, MenuItem)}.
     *
     * Note that text selection mode is not started when a TextView receives focus and the
     * {@link android.R.attr#selectAllOnFocus} flag has been set. The content is highlighted in
@@ -9765,9 +9767,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                        mLastParentX = mTempCoords[0];
                        mLastParentY = mTempCoords[1];
                    }
                }

                    onHandleMoved();
                }

                if (isPositionVisible()) {
                    mContainer.update(mContainerPositionX, mContainerPositionY,
@@ -10210,7 +10212,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

                    mPreviousTapPositionX = x;
                    mPreviousTapPositionY = y;

                    break;

                case MotionEvent.ACTION_POINTER_DOWN:
@@ -10526,6 +10527,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                mTextDir = TextDirectionHeuristics.RTL;
                break;
        }

    }

    /**