summaryrefslogtreecommitdiff
path: root/core/java/android/view/InputQueue.java
Commit message (Collapse)AuthorAgeFilesLines
* Change close guard logged messagesIoannis Ilkos2021-12-211-1/+1
| | | | | | | | | Unless we are looking at stack traces (e.g. from strict mode) it's not possible to identify which type of object is not being closed (most methods are 'close' or 'release). Change the logged text to clarify. Change-Id: Ib90eac716f43c2c2caf8d8c6fb64a7bd90562da9 Test: manual
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-1/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+1
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-1/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I5be7335b23a92b8ac80d2fd890198273b66ad644
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | For packages: android.view.textservice android.view.textclassifier.logging android.view.textclassifier android.view.inputmethod android.view.autofill android.view.accessibility android.view This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I4147b038ed7adf0311ee9918b44766f82a057eaf
* Fix import statement in view|transition|animation packages.Aurimas Liutikas2016-10-121-3/+3
| | | | | | | This change also remove trailing whitespace. Test: code still compiles Change-Id: I7eff4546320d67d2bae58d31bad0625ea0791b8f
* am 23b7e0a3: am d8facb67: am d569e21d: am 48de490c: am 486544f7: Merge ↵Narayan Kamath2014-01-161-11/+11
|\ | | | | | | | | | | | | "AArch64: Use long for pointers in view/input classes" * commit '23b7e0a32bee5234ef65fccfef1596659a08b630': AArch64: Use long for pointers in view/input classes
| * AArch64: Use long for pointers in view/input classesAshok Bhat2014-01-091-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For storing pointers, long is used in view/input classes, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Change-Id: Iafda9f4653c023bcba95b873637d935d0b569f5d Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* | Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
|/ | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Rewrite input handling for native applicationsMichael Wright2013-04-221-10/+120
| | | | | Bug: 8473020 Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
* Refactor InputQueue as InputEventReceiver.Jeff Brown2011-12-011-124/+0
| | | | | | | | | | | | | This change simplifies the code associated with receiving input events from input channels and makes it more robust. It also does a better job of ensuring that input events are properly recycled (sometimes we dropped them on the floor). This change also adds a sequence number to all events, which is handy for determining whether we are looking at the same event or a new one, particularly when events are recycled. Change-Id: I4ebd88f73b5f77f3e150778cd550e7f91956aac2
* Ensure input events are processed in-order in the application.Jeff Brown2011-12-011-10/+3
| | | | | | | | | | | | | | As it turns out, it used to be possible for there to be multiple input events simultaneously in flight in an application. Although it worked, it made it hard to reason about what was going on. The problem was somewhat exacerbated by the introduction of a queue of "InputEventMessage" objects as part of an earlier latency optimization. This change restores order from chaos and greatly simplifies the invariants related to input event dispatch within the application. Change-Id: I6de5fe61c1fe2ac3dd33edf770d949044df8a019
* Tell system server whether the app handled input events.Jeff Brown2010-11-081-6/+10
| | | | | | | | | | Refactored ViewRoot, NativeActivity and related classes to tell the dispatcher whether an input event was actually handled by the application. This will be used to move more of the global default key processing into the system server instead of the application. Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
* Fix issue #3001362: API REVIEW: android.view.InputQueue.CallbackDianne Hackborn2010-10-061-0/+13
| | | | Change-Id: Ibc12a7326a13c318205774e226ed1f62a5cf11eb
* Optimize VelocityTracker to run in linear time.Jeff Brown2010-08-091-1/+1
| | | | | | | | | | | | Uses a linked list for efficient pointer addition and removal. When possible, makes use of the fact that pointer ids are usually in sorted order to avoid quadratic time lookups when adding new data. Fixed an incorrect assumption that the pointer count would always change when old pointers were removed. Also fixed a bug in InputQueue FinishedCallback recycling. Change-Id: Ie048d3bb022d39cf4185e2fe43923a861d94c4f3
* Enhanced VelocityTracker for > 5 pointers and fixed bugs.Jeff Brown2010-07-301-6/+42
| | | | | | | | | | | | | Improved PointerLocation tool to use VelocityTracker more efficiently and correctly when multiple pointers are down. Fixed a bug in TouchInputMapper where it was not correctly copying the id to index map in the last touch data. This could cause strange behavior on secondary pointer up events. Also added finished callback pooling in InputQueue. Change-Id: Ia85e52ac2fb7350960ea1d7edfbe81a1b3e8267b
* Add support for new input sources.Jeff Brown2010-07-151-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Added several new coordinate values to MotionEvents to capture touch major/minor area, tool major/minor area and orientation. Renamed NDK input constants per convention. Added InputDevice class in Java which will eventually provide useful information about available input devices. Added APIs for manufacturing new MotionEvent objects with multiple pointers and all necessary coordinate data. Fixed a bug in the input dispatcher where it could get stuck with a pointer down forever. Fixed a bug in the WindowManager where the input window list could end up containing stale removed windows. Fixed a bug in the WindowManager where the input channel was being removed only after the final animation transition had taken place which caused spurious WINDOW DIED log messages to be printed. Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
* Remove InputConsumer, replacing with InputQueue.Dianne Hackborn2010-06-231-3/+21
| | | | Change-Id: Ib06907278457aaee842b123adc072840ca3602d8
* Native input dispatch rewrite work in progress.Jeff Brown2010-06-131-0/+126
The old dispatch mechanism has been left in place and continues to be used by default for now. To enable native input dispatch, edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy. Includes part of the new input event NDK API. Some details TBD. To wire up input dispatch, as the ViewRoot adds a window to the window session it receives an InputChannel object as an output argument. The InputChannel encapsulates the file descriptors for a shared memory region and two pipe end-points. The ViewRoot then provides the InputChannel to the InputQueue. Behind the scenes, InputQueue simply attaches handlers to the native PollLoop object that underlies the MessageQueue. This way MessageQueue doesn't need to know anything about input dispatch per-se, it just exposes (in native code) a PollLoop that other components can use to monitor file descriptor state changes. There can be zero or more targets for any given input event. Each input target is specified by its input channel and some parameters including flags, an X/Y coordinate offset, and the dispatch timeout. An input target can request either synchronous dispatch (for foreground apps) or asynchronous dispatch (fire-and-forget for wallpapers and "outside" targets). Currently, finding the appropriate input targets for an event requires a call back into the WindowManagerServer from native code. In the future this will be refactored to avoid most of these callbacks except as required to handle pending focus transitions. End-to-end event dispatch mostly works! To do: event injection, rate limiting, ANRs, testing, optimization, etc. Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25