blob: 8812d34a7210ec8e86fc4993a0f365294b6e2f7c [file] [log] [blame]
Vishnu Naire798b472020-07-23 13:52:21 -07001/**
2 * Copyright (c) 2020, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android;
18
19/** @hide */
20parcelable FocusRequest {
21 /**
22 * Input channel token used to identify the window that should gain focus.
23 */
24 IBinder token;
Vishnu Nair9ad01462021-01-15 12:55:14 -080025 @utf8InCpp String windowName;
Vishnu Naire798b472020-07-23 13:52:21 -070026 /**
27 * The token that the caller expects currently to be focused. If the
28 * specified token does not match the currently focused window, this request will be dropped.
29 * If the specified focused token matches the currently focused window, the call will succeed.
30 * Set this to "null" if this call should succeed no matter what the currently focused token
31 * is.
32 */
33 @nullable IBinder focusedToken;
Vishnu Nair9ad01462021-01-15 12:55:14 -080034 @utf8InCpp String focusedWindowName;
Vishnu Naire798b472020-07-23 13:52:21 -070035 /**
36 * SYSTEM_TIME_MONOTONIC timestamp in nanos set by the client (wm) when requesting the focus
37 * change. This determines which request gets precedence if there is a focus change request
38 * from another source such as pointer down.
39 */
40 long timestamp;
Vishnu Nair958da932020-08-21 17:12:37 -070041 /**
42 * Display id associated with this request.
43 */
44 int displayId;
Vishnu Naire798b472020-07-23 13:52:21 -070045}