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

Commit 53d247ac authored by Daniel Hsieh's avatar Daniel Hsieh Committed by Android (Google) Code Review
Browse files

Merge "Support following typing foucs in window mode [2/n]."

parents 6ecdc389 8cdb9fed
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -67,4 +67,13 @@ import android.graphics.Rect;
     */
    void onAccessibilityActionPerformed(int displayId);

    /**
     * Called when the user is performing dragging gesture. It is started after the offset
     * between the down location and the move event location exceed
     * {@link ViewConfiguration#getScaledTouchSlop()}.
     *
     * @param displayId The logical display id.
     */
    void onDrag(int displayId);

}
+7 −0
Original line number Diff line number Diff line
@@ -224,6 +224,13 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
        }
    }

    @Override
    public void onDrag(int displayId) {
        if (mWindowMagnificationConnectionImpl != null) {
            mWindowMagnificationConnectionImpl.onDrag(displayId);
        }
    }

    @Override
    public void requestWindowMagnificationConnection(boolean connect) {
        if (connect) {
+10 −0
Original line number Diff line number Diff line
@@ -142,4 +142,14 @@ class WindowMagnificationConnectionImpl extends IWindowMagnificationConnection.S
            }
        }
    }

    void onDrag(int displayId) {
        if (mConnectionCallback != null) {
            try {
                mConnectionCallback.onDrag(displayId);
            } catch (RemoteException e) {
                Log.e(TAG, "Failed to inform taking control by a user", e);
            }
        }
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -964,6 +964,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
    @Override
    public boolean onDrag(float offsetX, float offsetY) {
        moveWindowMagnifier(offsetX, offsetY);
        mWindowMagnifierCallback.onDrag(mDisplayId);
        return true;
    }

+10 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.accessibility;

import android.graphics.Rect;
import android.view.ViewConfiguration;

/**
 * A callback to inform {@link com.android.server.accessibility.AccessibilityManagerService} about
@@ -53,4 +54,13 @@ interface WindowMagnifierCallback {
     * @param displayId The logical display id.
     */
    void onAccessibilityActionPerformed(int displayId);

    /**
     * Called when the user is performing dragging gesture. It is started after the offset
     * between the down location and the move event location exceed
     * {@link ViewConfiguration#getScaledTouchSlop()}.
     *
     * @param displayId The logical display id.
     */
    void onDrag(int displayId);
}
Loading