Siarhei Vishniakou | 7062295 | 2020-07-30 11:17:23 -0500 | [diff] [blame] | 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.os; |
| 18 | |
| 19 | |
| 20 | /** @hide */ |
| 21 | interface IInputConstants |
| 22 | { |
Peter Collingbourne | b04b9b8 | 2021-02-08 12:09:47 -0800 | [diff] [blame] | 23 | // 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 Vishniakou | 2508b87 | 2020-12-03 16:33:53 -1000 | [diff] [blame] | 27 | |
| 28 | // Compatibility changes. |
| 29 | /** |
| 30 | * TODO(b/157929241): remove this before closing the bug. This is needed temporarily |
| 31 | * to identify apps that are using this flag. |
| 32 | */ |
| 33 | const long BLOCK_FLAG_SLIPPERY = 157929241; |
Siarhei Vishniakou | fc434ac | 2021-01-13 10:28:00 -1000 | [diff] [blame] | 34 | |
| 35 | // Indicate invalid battery capacity |
| 36 | const int INVALID_BATTERY_CAPACITY = -1; |
| 37 | |
| 38 | /** |
| 39 | * Every input event has an id. This constant value is used when a valid input event id is not |
| 40 | * available. |
| 41 | */ |
| 42 | const int INVALID_INPUT_EVENT_ID = 0; |
Siarhei Vishniakou | 5d552c4 | 2021-05-21 05:02:22 +0000 | [diff] [blame^] | 43 | |
| 44 | /** |
| 45 | * The injected event was originally sent from InputDispatcher. Most likely, the journey of the |
| 46 | * event looked as follows: |
| 47 | * InputDispatcherPolicyInterface::filterInputEvent -> InputFilter.java::onInputEvent -> |
| 48 | * InputFilter.java::sendInputEvent -> InputDispatcher::injectInputEvent, without being modified |
| 49 | * along the way. |
| 50 | */ |
| 51 | const int POLICY_FLAG_INPUTFILTER_TRUSTED = 0x10000; |
| 52 | |
| 53 | /** |
| 54 | * The input event was injected from accessibility |
| 55 | */ |
| 56 | const int POLICY_FLAG_INJECTED_FROM_ACCESSIBILITY = 0x20000; |
Siarhei Vishniakou | 7062295 | 2020-07-30 11:17:23 -0500 | [diff] [blame] | 57 | } |