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

Commit 9ec92641 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Removed regionId from updateTapExcludeRegion request."

parents 88233e4c aa0d74e6
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ public class TaskEmbedder {
            return;
        }
        reportLocation(mHost.getScreenToTaskMatrix(), mHost.getPositionInWindow());
        applyTapExcludeRegion(mHost.getWindow(), hashCode(), mHost.getTapExcludeRegion());
        applyTapExcludeRegion(mHost.getWindow(), mHost.getTapExcludeRegion());
    }

    /**
@@ -458,13 +458,12 @@ public class TaskEmbedder {
     * {@link #updateLocationAndTapExcludeRegion()}. This method
     * is provided as an optimization when managing multiple TaskSurfaces within a view.
     *
     * @see IWindowSession#updateTapExcludeRegion(IWindow, int, Region)
     * @see IWindowSession#updateTapExcludeRegion(IWindow, Region)
     */
    private void applyTapExcludeRegion(IWindow window, int regionId,
            @Nullable Region tapExcludeRegion) {
    private void applyTapExcludeRegion(IWindow window, @Nullable Region tapExcludeRegion) {
        try {
            IWindowSession session = WindowManagerGlobal.getWindowSession();
            session.updateTapExcludeRegion(window, regionId, tapExcludeRegion);
            session.updateTapExcludeRegion(window, tapExcludeRegion);
        } catch (RemoteException e) {
            e.rethrowAsRuntimeException();
        }
@@ -486,7 +485,7 @@ public class TaskEmbedder {
            Log.w(TAG, "clearTapExcludeRegion: not attached to window!");
            return;
        }
        applyTapExcludeRegion(mHost.getWindow(), hashCode(), null);
        applyTapExcludeRegion(mHost.getWindow(), null);
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ interface IWindowSession {
     * will neither be dispatched to this window nor change the focus to this window. Passing an
     * invalid region will remove the area from the exclude region of this window.
     */
    void updateTapExcludeRegion(IWindow window, int regionId, in Region region);
    void updateTapExcludeRegion(IWindow window, in Region region);

    /**
     * Called when the client has changed the local insets state, and now the server should reflect
+1 −1
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ public class WindowlessWindowManager implements IWindowSession {
    }

    @Override
    public void updateTapExcludeRegion(android.view.IWindow window, int regionId,
    public void updateTapExcludeRegion(android.view.IWindow window,
            android.graphics.Region region) {
    }

+1 −1
Original line number Diff line number Diff line
@@ -1309,7 +1309,7 @@ final class AccessibilityController {
                        // If a window has tap exclude region, we need to account it.
                        final Region displayRegion = new Region(windowState.getDisplayFrameLw());
                        final Region tapExcludeRegion = new Region();
                        windowState.amendTapExcludeRegion(tapExcludeRegion);
                        windowState.getTapExcludeRegion(tapExcludeRegion);
                        displayRegion.op(tapExcludeRegion, displayRegion,
                                Region.Op.REVERSE_DIFFERENCE);
                        unaccountedSpace.op(displayRegion, unaccountedSpace,
+4 −1
Original line number Diff line number Diff line
@@ -2500,10 +2500,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
     * @param inOutRegion The region to be amended.
     */
    private void amendWindowTapExcludeRegion(Region inOutRegion) {
        final Region region = Region.obtain();
        for (int i = mTapExcludeProvidingWindows.size() - 1; i >= 0; i--) {
            final WindowState win = mTapExcludeProvidingWindows.valueAt(i);
            win.amendTapExcludeRegion(inOutRegion);
            win.getTapExcludeRegion(region);
            inOutRegion.op(region, Op.UNION);
        }
        region.recycle();
    }

    @Override
Loading