-
Notifications
You must be signed in to change notification settings - Fork 66
android: disable network interface monitoring on ANDROID_API >= 30 #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
246e712
to
5c62cf9
Compare
Not necessarily related to this change but.... api/cloud/oc_cloud.c when OC_NETWORK_MONITOR is not defined, the code in oc_cloud.c calls some undefined functions...(ex: oc_remove_network_interface_event_callback) and they end up as UNDEFINED in the .so library and loadLibrary() fails to load libiotivity-lite-jni.so. This is because the implementation is conditional in ipadapter.c based on OC_NETWORK_MONITOR. potential fix: |
Yeah, the ifdefs are wrong, seems like |
931a8ca
to
7cef58b
Compare
@Danielius1922 Hi, I tested latest change. Looks like only 1 more undefined symbol remaining, so when launching android app ...dlopen failed: cannot locate symbol "oc_resource_set_access_in_RFOTM" referenced by... Also ran nm on the .so librar 8000 y and that seems to be the only undefined symbol in iotivity lib |
The current implementation of network interface changes notifications is based on binding to a NETLINK socket and using select to monitor changes. However, from ANDROID_API=30 the binding to a NETLINK socket is restricted and the bind call will fail, which ultimately causes the device to abort during initialization. This commit simply disables the feature when ANDROID_API>=30 is detected. For ANDROID_API>=30 this feature needs to be reimplemented using a non-restricted API.
7cef58b
to
24f8985
Compare
@baabel Should be all good now! |
Kudos, SonarCloud Quality Gate passed! |
thanks. lgtm, android app launches. |
Great, I've fired up the Conformance tests, if they all pass I'll merge the fixes to master (they usually take from 3 to 4 hours...) |
No description provided.