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

Commit 0ab4b41c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove update_host_input_transfer_token flag" into main

parents cb4e1cbe 957d40fd
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -126,14 +126,3 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "update_host_input_transfer_token"
    namespace: "window_surfaces"
    description: "Update host InpuTransferToken on view attach"
    is_fixed_read_only: true
    bug: "392965431"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
+0 −12
Original line number Diff line number Diff line
@@ -925,18 +925,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
            IBinder clientToken, @Nullable InputTransferToken hostInputTransferToken, int flags,
            int privateFlags, int inputFeatures, int type, IBinder windowToken,
            InputTransferToken inputTransferToken, String inputHandleName) {
        if (!Flags.updateHostInputTransferToken()) {
            // This is not a valid security check, callers can pass in a bogus token. If the
            // token is not known to wm, then input APIs is request focus or transferTouchGesture
            // will fail. Removing this check allows SCVH to be created before associating with a
            // host window.
            if (hostInputTransferToken == null && !mCanAddInternalSystemWindow) {
                // Callers without INTERNAL_SYSTEM_WINDOW permission cannot grant input channel to
                // embedded windows without providing a host window input token
                throw new SecurityException("Requires INTERNAL_SYSTEM_WINDOW permission");
            }
        }

        final long identity = Binder.clearCallingIdentity();
        try {
            return mService.grantInputChannel(this, mUid, mPid, displayId, surface, clientToken,
+3 −5
Original line number Diff line number Diff line
@@ -9593,12 +9593,10 @@ public class WindowManagerService extends IWindowManager.Stub
            name = win.toString();
            applicationHandle = win.getApplicationHandle();
            win.setIsFocusable((flags & FLAG_NOT_FOCUSABLE) == 0);
            if (Flags.updateHostInputTransferToken()) {
            WindowState hostWindowState = hostInputTransferToken != null
                    ? mInputToWindowMap.get(hostInputTransferToken.getToken()) : null;
            win.updateHost(hostWindowState);
        }
        }

        updateInputChannel(channelToken, win.mOwnerUid, win.mOwnerPid, displayId, surface, name,
                applicationHandle, flags, privateFlags, inputFeatures, win.mWindowType, region,