Import Java/JNI `Looper` into NDK `ForeignLooper`?
Is there a way to take a JObject that represents an android.os.Looper that was obtained via JNI and turn that into a ForeignLooper? I feel like this should be possible, but I don't know if it actually is and I've failed in my attempts so far.
I vaguely remember there being an API for this (or recently added) but that doesn't seem to be the case: https://developer.android.com/ndk/reference/group/looper.
@rib are you aware of any such API, besides communicating a Looper via TLS? Or are these entirely different concepts? The Java and C++ implementation seem to have different functionality and don't call into each other:
https://cs.android.com/android/platform/superproject/+/refs/heads/master:system/core/libutils/Looper.cpp https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/os/Looper.java
In which case I don't think there's anything that can be done here.