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

Commit dd00e734 authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

NDK: ANativeActivity: Fix documentation for 'clazz' member.

As discussed on the android-ndk forum, it turns out that the
member named 'clazz' is really a global reference to the NativeActivity
instance. As such, it's really a handle to a VM object, not a VM class.

Ideally, we would rename it to 'activity', but this cannot be done
without breaking NDK source compatibility.

Change-Id: I82ca1549b35346a3eacf9e84c4c836387fc883a6
parent c4c13f97
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -60,7 +60,14 @@ typedef struct ANativeActivity {
    JNIEnv* env;

    /**
     * The NativeActivity Java class.
     * The NativeActivity object handle.
     *
     * IMPORTANT NOTE: This member is mis-named. It should really be named
     * 'activity' instead of 'clazz', since it's a reference to the
     * NativeActivity instance created by the system for you.
     *
     * We unfortunately cannot change this without breaking NDK
     * source-compatibility.
     */
    jobject clazz;