Skip to content

what is the possible reason of " Unable to initialize SurfaceComposerClient " ? #26

Description

@workzj

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions