Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is a java version of a class from libbinder. Having Java and native versions of classes is a common pattern for things meant to be used from both.

https://cs.android.com/android/platform/superproject/main/+/...





No, it is not. It is the Java class which has native methods that call into the C++ version, as someone said above. But it is still primarily a Java class.

dbus-java exists, does that magically turn dbus into being primarily implemented in Java?

No, of course not, that'd be absurd. Same thing with Parcel & Binder. Java bindings existing does not change the simple fact that binder itself does not have any Java in it. It's regularly used in processes with zero Java at all, this isn't a hypothetical it's a basic reality. That's why binder is used for HALs and similar low-level systems.


> dbus-java exists, does that magically turn dbus into being primarily implemented in Java?

it does if the only other implementation is basically the JNI native methods of dbus-java. This is what libbinder_ndk looks like from the outside. If there's a newer libbinder that does not look like a Java mess , I have not yet seen it.

Not negating that it may exist; the libbinder you quoted above looks similar to openbinder but I have never used it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: