1 /** 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 17 package android.gui; 18 19 /** @hide */ 20 parcelable FocusRequest { 21 /** 22 * Input channel token used to identify the window that should gain focus. 23 */ 24 IBinder token; 25 @utf8InCpp String windowName; 26 /** 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; 34 @utf8InCpp String focusedWindowName; 35 /** 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; 41 /** 42 * Display id associated with this request. 43 */ 44 int displayId; 45 } 46