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

Commit 957d40fd authored by Patrick Williams's avatar Patrick Williams
Browse files

Remove update_host_input_transfer_token flag

Bug: 427092430
Flag: EXEMPT removing com.android.window.flags.update_host_input_transfer_token
Test: presubmits
Change-Id: I8ff37ecb4565745b6ffe7c74fd9a06a399c4d6ca
parent abf8df45
Loading
Loading
Loading
Loading
+0 −11
Original line number Original line Diff line number Diff line
@@ -126,14 +126,3 @@ flag {
        purpose: PURPOSE_BUGFIX
        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 Original line Diff line number Diff line
@@ -920,18 +920,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
            IBinder clientToken, @Nullable InputTransferToken hostInputTransferToken, int flags,
            IBinder clientToken, @Nullable InputTransferToken hostInputTransferToken, int flags,
            int privateFlags, int inputFeatures, int type, IBinder windowToken,
            int privateFlags, int inputFeatures, int type, IBinder windowToken,
            InputTransferToken inputTransferToken, String inputHandleName) {
            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();
        final long identity = Binder.clearCallingIdentity();
        try {
        try {
            return mService.grantInputChannel(this, mUid, mPid, displayId, surface, clientToken,
            return mService.grantInputChannel(this, mUid, mPid, displayId, surface, clientToken,
+3 −5
Original line number Original line Diff line number Diff line
@@ -9596,12 +9596,10 @@ public class WindowManagerService extends IWindowManager.Stub
            name = win.toString();
            name = win.toString();
            applicationHandle = win.getApplicationHandle();
            applicationHandle = win.getApplicationHandle();
            win.setIsFocusable((flags & FLAG_NOT_FOCUSABLE) == 0);
            win.setIsFocusable((flags & FLAG_NOT_FOCUSABLE) == 0);
            if (Flags.updateHostInputTransferToken()) {
            WindowState hostWindowState = hostInputTransferToken != null
            WindowState hostWindowState = hostInputTransferToken != null
                    ? mInputToWindowMap.get(hostInputTransferToken.getToken()) : null;
                    ? mInputToWindowMap.get(hostInputTransferToken.getToken()) : null;
            win.updateHost(hostWindowState);
            win.updateHost(hostWindowState);
        }
        }
        }


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