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

Commit f9868961 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Fix crash in InputManagerService

We are currently storing a local variable into permanent storage, which
causes jni abort, unsurprisingly. Make this a global ref instead.

Bug: 120255803
Test: eng build boots properly
Change-Id: Ie572d7cfdb6799af99c10aa8ade96c0fbc4eab2b
parent 46502d77
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1750,7 +1750,7 @@ int register_android_server_InputManager(JNIEnv* env) {

    jclass clazz;
    FIND_CLASS(clazz, "com/android/server/input/InputManagerService");
    gServiceClassInfo.clazz = clazz;
    gServiceClassInfo.clazz = reinterpret_cast<jclass>(env->NewGlobalRef(clazz));

    GET_METHOD_ID(gServiceClassInfo.notifyConfigurationChanged, clazz,
            "notifyConfigurationChanged", "(J)V");