my jni code :
android::spandroid::SurfaceComposerClient sc = new android::SurfaceComposerClient();
is failed .
i don't know why ??
look up the android source , i wirte the test code like this :
//test code
sp<ISurfaceComposer> sm(ComposerService::getComposerService());
if (sm != 0) {
sp<ISurfaceComposerClient> conn = sm->createConnection();
if (conn != 0) {
LOG("init success ... ");
return 1;
}
LOG("conn == 0");
return -1;
}
the run result is : conn == 0 .
my question is why createConnection is failed ?
is authority ? is thread ?
i use the code in apk with JNI .