native service, EGL, native test client

This commit is contained in:
2025-12-28 20:30:55 +01:00
parent de82e50bd5
commit 19400fd2b2
27 changed files with 13683 additions and 23 deletions

View File

@@ -0,0 +1,16 @@
#include <jni.h>
#include <android/binder_ibinder_jni.h>
#include <aidl/com/omixlab/mosis/IMosisService.h>
#include "logger.h"
using namespace aidl::com::omixlab::mosis;
std::shared_ptr<IMosisService> g_service;
extern "C"
JNIEXPORT void JNICALL
Java_com_omixlab_mosis_MainActivity_serviceConnected(JNIEnv *env, jobject thiz, jobject binder) {
AIBinder* pBinder = AIBinder_fromJavaBinder(env, binder);
const ndk::SpAIBinder spBinder(pBinder);
g_service = IMosisService::fromBinder(spBinder);
Logger::Log("Service Connected");
}