Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50974d30 authored by gfan's avatar gfan
Browse files

Fix unexpected exception from MediaHTTPService

Make CreateHTTPServiceInCurrentJavaContext() to call
the correct MediaHTTPService class constructor

Bug: 29321867
Test: manual ndk sample test
Change-Id: I23e1182668f2bb081edaf868c36499ba76e87feb
parent 8be94e99
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -42,11 +42,11 @@ sp<IMediaHTTPService> CreateHTTPServiceInCurrentJavaContext() {
            env, env->FindClass("android/media/MediaHTTPService"));
    CHECK(clazz.get() != NULL);

    jmethodID constructID = env->GetMethodID(clazz.get(), "<init>", "()V");
    jmethodID constructID = env->GetMethodID(clazz.get(), "<init>", "(Ljava/util/List;)V");
    CHECK(constructID != NULL);

    ScopedLocalRef<jobject> httpServiceObj(
            env, env->NewObject(clazz.get(), constructID));
            env, env->NewObject(clazz.get(), constructID, NULL));

    sp<IMediaHTTPService> httpService;
    if (httpServiceObj.get() != NULL) {