Merge "Code cleanup: removed remaining P2P functions in JNI" into main