N
N
Nyashkoshkko2014-02-19 20:23:40
linux
Nyashkoshkko, 2014-02-19 20:23:40

What is the way to call functions from top java abstraction to linux kernel in android?

At the top level, Android has a class for interacting with input devices android.view.InputDevice .
It is necessary to trace the entire path of the function call from it to the Linux kernel level device of the form /dev/input/device.
As far as I understand, the InputDevice class calls InputManager , which calls the InputManagerService service through the header file , which again calls InputDevice . And it says:

// Called by native code.
    private InputDevice(int id, int generation, int controllerNumber, String name, int vendorId,
            int productId, String descriptor, boolean isExternal, int sources, int keyboardType,
            KeyCharacterMap keyCharacterMap, boolean hasVibrator, boolean hasButtonUnderPad) {

Do I understand correctly that some Linux-level service (i.e. not Java) creates instances of java classes by some mechanism with such a tricky call?
If so, where in the source exactly does this happen?
If I'm wrong, what is the correct way to call functions from the top level to the bottom?
The answer is needed for a small study as part of writing an article on Habr.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bimeg, 2014-02-19
@Nyashkoshkko

https://android.googlesource.com/platform/framework...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question