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

Commit 807c3a82 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Unhide View#dispatch{Start,Finish}TemporaryDetach()" into nyc-dev

parents df9b9078 24df931e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -42274,6 +42274,7 @@ package android.view {
    method public boolean dispatchDragEvent(android.view.DragEvent);
    method protected void dispatchDraw(android.graphics.Canvas);
    method public void dispatchDrawableHotspotChanged(float, float);
    method public void dispatchFinishTemporaryDetach();
    method protected boolean dispatchGenericFocusedEvent(android.view.MotionEvent);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method protected boolean dispatchGenericPointerEvent(android.view.MotionEvent);
@@ -42293,6 +42294,7 @@ package android.view {
    method protected void dispatchSetActivated(boolean);
    method protected void dispatchSetPressed(boolean);
    method protected void dispatchSetSelected(boolean);
    method public void dispatchStartTemporaryDetach();
    method public void dispatchSystemUiVisibilityChanged(int);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
@@ -42505,6 +42507,7 @@ package android.view {
    method public boolean isSelected();
    method public boolean isShown();
    method public boolean isSoundEffectsEnabled();
    method public final boolean isTemporarilyDetached();
    method public boolean isTextAlignmentResolved();
    method public boolean isTextDirectionResolved();
    method public boolean isVerticalFadingEdgeEnabled();
+3 −0
Original line number Diff line number Diff line
@@ -45014,6 +45014,7 @@ package android.view {
    method public boolean dispatchDragEvent(android.view.DragEvent);
    method protected void dispatchDraw(android.graphics.Canvas);
    method public void dispatchDrawableHotspotChanged(float, float);
    method public void dispatchFinishTemporaryDetach();
    method protected boolean dispatchGenericFocusedEvent(android.view.MotionEvent);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method protected boolean dispatchGenericPointerEvent(android.view.MotionEvent);
@@ -45033,6 +45034,7 @@ package android.view {
    method protected void dispatchSetActivated(boolean);
    method protected void dispatchSetPressed(boolean);
    method protected void dispatchSetSelected(boolean);
    method public void dispatchStartTemporaryDetach();
    method public void dispatchSystemUiVisibilityChanged(int);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
@@ -45245,6 +45247,7 @@ package android.view {
    method public boolean isSelected();
    method public boolean isShown();
    method public boolean isSoundEffectsEnabled();
    method public final boolean isTemporarilyDetached();
    method public boolean isTextAlignmentResolved();
    method public boolean isTextDirectionResolved();
    method public boolean isVerticalFadingEdgeEnabled();
+3 −0
Original line number Diff line number Diff line
@@ -42348,6 +42348,7 @@ package android.view {
    method public boolean dispatchDragEvent(android.view.DragEvent);
    method protected void dispatchDraw(android.graphics.Canvas);
    method public void dispatchDrawableHotspotChanged(float, float);
    method public void dispatchFinishTemporaryDetach();
    method protected boolean dispatchGenericFocusedEvent(android.view.MotionEvent);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method protected boolean dispatchGenericPointerEvent(android.view.MotionEvent);
@@ -42367,6 +42368,7 @@ package android.view {
    method protected void dispatchSetActivated(boolean);
    method protected void dispatchSetPressed(boolean);
    method protected void dispatchSetSelected(boolean);
    method public void dispatchStartTemporaryDetach();
    method public void dispatchSystemUiVisibilityChanged(int);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
@@ -42579,6 +42581,7 @@ package android.view {
    method public boolean isSelected();
    method public boolean isShown();
    method public boolean isSoundEffectsEnabled();
    method public final boolean isTemporarilyDetached();
    method public boolean isTextAlignmentResolved();
    method public boolean isTextDirectionResolved();
    method public boolean isVerticalFadingEdgeEnabled();
+26 −2
Original line number Diff line number Diff line
@@ -2434,6 +2434,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *           11111111                PFLAG3_POINTER_ICON_MASK
     *          1                        PFLAG3_OVERLAPPING_RENDERING_FORCED_VALUE
     *         1                         PFLAG3_HAS_OVERLAPPING_RENDERING_FORCED
     *        1                          PFLAG3_TEMPORARY_DETACH
     * |-------|-------|-------|-------|
     */
@@ -2667,6 +2668,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    private static final int PFLAG3_HAS_OVERLAPPING_RENDERING_FORCED = 0x1000000;
    /**
     * Flag indicating that the view is temporarily detached from the parent view.
     *
     * @see #onStartTemporaryDetach()
     * @see #onFinishTemporaryDetach()
     */
    static final int PFLAG3_TEMPORARY_DETACH = 0x2000000;
    /* End of masks for mPrivateFlags3 */
    /**
@@ -9736,9 +9745,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    /**
     * @hide
     * @return {@code true} when the View is in the state between {@link #onStartTemporaryDetach()}
     * and {@link #onFinishTemporaryDetach()}.
     */
    public final boolean isTemporarilyDetached() {
        return (mPrivateFlags3 & PFLAG3_TEMPORARY_DETACH) != 0;
    }
    /**
     * Dispatch {@link #onStartTemporaryDetach()} to this View and its direct children if this is
     * a container View.
     */
    @CallSuper
    public void dispatchStartTemporaryDetach() {
        mPrivateFlags3 |= PFLAG3_TEMPORARY_DETACH;
        onStartTemporaryDetach();
    }
@@ -9754,10 +9774,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    /**
     * @hide
     * Dispatch {@link #onFinishTemporaryDetach()} to this View and its direct children if this is
     * a container View.
     */
    @CallSuper
    public void dispatchFinishTemporaryDetach() {
        onFinishTemporaryDetach();
        mPrivateFlags3 &= ~PFLAG3_TEMPORARY_DETACH;
    }
    /**
@@ -15188,6 +15211,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    protected void onDetachedFromWindowInternal() {
        mPrivateFlags &= ~PFLAG_CANCEL_NEXT_UP_EVENT;
        mPrivateFlags3 &= ~PFLAG3_IS_LAID_OUT;
        mPrivateFlags3 &= ~PFLAG3_TEMPORARY_DETACH;
        removeUnsetPressCallback();
        removeLongPressCallback();
+1 −1
Original line number Diff line number Diff line
@@ -1116,7 +1116,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
    protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
        super.onFocusChanged(focused, direction, previouslyFocusedRect);

        if (mTemporaryDetach) {
        if (isTemporarilyDetached()) {
            // If we are temporarily in the detach state, then do nothing.
            return;
        }
Loading