History log of /frameworks/base/core/jni/android_view_InputEventSender.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d6058f44f47b2379200bc69aecbcf34fe2b3f873 04-Jan-2018 Siarhei Vishniakou <svv@google.com> Do not return pointer to freed memory

Since the code was changed to use std::string instead of String8, it is
no longer safe to pass a raw pointer to internal memory of the string
object, since std::string creates a copy even if the data itself is not
being modified.
Instead, return std::string to the calling function and let the function
access the pointer when necessary.

Bug: 71541263
Test: boot up asan build on pixel 2 xl, then interact with google
calendar and chrome. Observe no crashes with the patch.

Change-Id: I6af2d23985d0553dd0707ad985f7f1e7b2240611
/frameworks/base/core/jni/android_view_InputEventSender.cpp
8e960d700c5e3bfe812affdb22252aac2d009f91 23-Nov-2017 Siarhei Vishniakou <svv@google.com> Prefer std::string over String8

String8 is obsolete, only use std::string in the
input libraries now.

Bug: 64258224
Test: make, boot device, interact with UI
Change-Id: I0e610f8290438ab1e21e466288e3217015b49699
/frameworks/base/core/jni/android_view_InputEventSender.cpp
7def2eea97600812f73ccf62a8433c069ef4da46 02-Aug-2017 Tarandeep Singh <tarandeep@google.com> Merge "Fix keyboard focus in VR" into oc-dr1-dev
am: 986995d481

Change-Id: Ide81e21c24c6efd66c03c997dcaefbd0a3efd7b8
e1cfcf4c4d15417bc912d36d487b4454c19b30fa 11-Jul-2017 Tarandeep Singh <tarandeep@google.com> Fix keyboard focus in VR

Consider this VirtualDisplay (VD) scenario:
HostActivity creates a VD which holds SettingsActivity. When EditText
on SettingsActivity is tapped, it gains focus.
On eventual taps, it loses focus i.e. the Window in VD loses focus and
the host activity in primary display gets the focus instead. This
happens because WM's TaskTapPointerEventListener.onPointerEvent()
is called on the default display only.

Root cause:
1. Tap detector isn't registered for non-default display.
2. Tap detector has no info on which displayId touch was received.
3. InputFlinger doesn't deliver InputMonitor events for
non-default displays (fixed in a separate CL)

Fixing above results in onPointerEvent(MotionEvent) to deliver the
Touch events successfully to VD. We restrict these changes to physical
multi-displays and VR VirtualDisplays (which uses virtual touch device).
[VrManagerService calls WMInternal.setVr2dDisplayId(int)]

In future, displayId should be part of InputEvent. Bug: 64258305

Bug: 62033391
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I3626f4de5aa9bcf905da9abd39f3ab1baefc4c48
/frameworks/base/core/jni/android_view_InputEventSender.cpp
2279b2534272282a5b5152723235da397e49195c 19-Jul-2017 Steven Moreland <smoreland@google.com> frameworks/base: use proper nativehelper headers

libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
/frameworks/base/core/jni/android_view_InputEventSender.cpp
b57dd722f1dc0663417da37d3a82f8283ad3c982 24-Sep-2015 Elliott Hughes <enh@google.com> resolved conflicts for a884d81e to stage-aosp-master

Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
/frameworks/base/core/jni/android_view_InputEventSender.cpp
5bd69e6e6164c59a0423edd0d5243fc8c07e6af3 14-May-2015 Michael Wright <michaelwr@google.com> Revert "Revert "Add new MotionEvent actions for button press and release.""

This reverts commit 96238051621ba2dc8a1c20fa48a00ec6ec4735d6.
/frameworks/base/core/jni/android_view_InputEventSender.cpp
96238051621ba2dc8a1c20fa48a00ec6ec4735d6 14-May-2015 Michael Wright <michaelwr@google.com> Revert "Add new MotionEvent actions for button press and release."

This reverts commit ec0ce51b733f10c620cb9447b074f022d042e31d.
/frameworks/base/core/jni/android_view_InputEventSender.cpp
ec0ce51b733f10c620cb9447b074f022d042e31d 08-May-2015 Michael Wright <michaelwr@google.com> Add new MotionEvent actions for button press and release.

Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: I5b75e5c5e692171c1c117ee687dd185a0d9dd15c
/frameworks/base/core/jni/android_view_InputEventSender.cpp
46c82b4cd241a447834ed2f5a6be16777b7a990b 30-Nov-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Adjust format strings to work on both 32-bit and 64-bit builds

Adjust format strings to not produce Clang warnings in both 32-bit and
64-bit builds

Change-Id: I76c29d8d5d0fb4b5e9d9518077652370ffe9e871
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/frameworks/base/core/jni/android_view_InputEventSender.cpp
ed6b9dff563c5e22f040ff37e12c0d771e0478ae 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Consistency in core/jni

Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
/frameworks/base/core/jni/android_view_InputEventSender.cpp
987f79f60bb1f0a4bcd3ef22e57301c743f0b94f 19-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Replace LOG_FATAL_IF in core/jni

Do not use LOG_FATAL_IF in JNI setup. This is one-time on startup
and important enough to always check.

Add a header with common helper definitions. Move to inlined functions
instead of macros to clean up the code.

Change-Id: Ib12d0eed61b110c45d748e80ec36c563e9dec7e5
/frameworks/base/core/jni/android_view_InputEventSender.cpp
0f0b4919667f418b249c497f5ad3e83fdf4437e5 12-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in core/jni

Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
/frameworks/base/core/jni/android_view_InputEventSender.cpp
a931d5218cfee89c7629ffa6cde324fa966449f9 08-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long for pointers in view/input classes

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>
/frameworks/base/core/jni/android_view_InputEventSender.cpp
9d3b1a424c5c61e24e9659d15fb353026a00d925 02-Jul-2013 Jeff Brown <jeffbrown@google.com> Move input library code to frameworks/native.

No longer compile libandroidfw as a static library on the device
since it already exists as a shared library. Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.

Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
/frameworks/base/core/jni/android_view_InputEventSender.cpp
a4ca8ea0ad14c509d1ced46482e83c1b8a518982 03-Apr-2013 Jeff Brown <jeffbrown@google.com> Fix reference cycle in InputEventReceiver and Sender.

If the receiver or sender was not properly disposed, then
the underlying input channel might be leaked because the
native peer was holding a strong reference to the object.

Switched to using a weak reference.

Also updated Binder to use a new helper created for this purpose.

Change-Id: I19680bf96d0548777bff02aa1d91874d1e8e41da
/frameworks/base/core/jni/android_view_InputEventSender.cpp
10f9b0997e0bde39fa153060db022a3982b78399 01-Apr-2013 Michael Wright <michaelwr@google.com> Start input event sequence numbers at 1

Change-Id: Ia69574cb25bfced8bbeefbc23350706bacdfee12
/frameworks/base/core/jni/android_view_InputEventSender.cpp
44e13ef1a1aee36b4ce667670345de8ce4e6bb7b 27-Mar-2013 Jeff Brown <jeffbrown@google.com> Disable some noisy error logs.

Disabled some error logs that occur when an input channel is
closed remotely by its peer. These can happen during normal
course of operations because the act of removing windows or
finishing IME sessions is asynchronous so both peers may react
to the change independently at different times.

The coordination with the input dispatcher is designed to
avoid logging these errors. However it's not possible to achieve
the same coordination with the IME so we might as well silence
the errors since they don't tell us anything useful.

If something truly bad happens then one of two things will occur:

1. The system will realize that the process crashed because
of a DeadObjectException or other error, so it will take
measures to clean up.

2. If the error was spurious and non-fatal (how?) then at worst
an ANR may occur because the consumer stopped reading from
the input channel. However this has never been observed
and I doubt it's even possible.

Change-Id: I11a05d6d75e63e91be003971a544069b3a0d77f4
/frameworks/base/core/jni/android_view_InputEventSender.cpp
c28867a1d67121ce5963de135e3ae2b1dbd9a33d 26-Mar-2013 Jeff Brown <jeffbrown@google.com> Use input transport for communications between app and IME.

The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder. This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
/frameworks/base/core/jni/android_view_InputEventSender.cpp