blob: 5ce10a4a50d7940956f63a7ee445889ef2c148d9 [file] [log] [blame]
Siarhei Vishniakou70622952020-07-30 11:17:23 -05001/**
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.os;
18
19
20/** @hide */
21interface IInputConstants
22{
Peter Collingbourneb04b9b82021-02-08 12:09:47 -080023 // This should be multiplied by the value of the system property ro.hw_timeout_multiplier before
24 // use. A pre-multiplied constant is available in Java in
25 // android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS.
26 const int UNMULTIPLIED_DEFAULT_DISPATCHING_TIMEOUT_MILLIS = 5000; // 5 seconds
Siarhei Vishniakou2508b872020-12-03 16:33:53 -100027
Siarhei Vishniakoufc434ac2021-01-13 10:28:00 -100028 // Indicate invalid battery capacity
29 const int INVALID_BATTERY_CAPACITY = -1;
30
31 /**
32 * Every input event has an id. This constant value is used when a valid input event id is not
33 * available.
34 */
35 const int INVALID_INPUT_EVENT_ID = 0;
Siarhei Vishniakou5d552c42021-05-21 05:02:22 +000036
37 /**
Siarhei Vishniakouf00a4ec2021-06-16 03:55:32 +000038 * The input event was injected from accessibility. Used in policyFlags for input event
39 * injection.
Siarhei Vishniakou5d552c42021-05-21 05:02:22 +000040 */
41 const int POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY = 0x20000;
Siarhei Vishniakouf00a4ec2021-06-16 03:55:32 +000042
43 /**
44 * The input event was generated or modified by accessibility service.
45 * Shared by both KeyEvent and MotionEvent flags, so this value should not overlap with either
46 * set of flags, including in input/Input.h and in android/input.h.
47 */
48 const int INPUT_EVENT_FLAG_IS_ACCESSIBILITY_EVENT = 0x800;
Prabir Pradhande788502021-12-22 00:26:07 -080049
Christine Franks46d8a1e2022-01-05 16:11:48 -080050 /* The default pointer acceleration value. */
51 const int DEFAULT_POINTER_ACCELERATION = 3;
Siarhei Vishniakou70622952020-07-30 11:17:23 -050052}