diff --git a/native/cocos/platform/java/jni/JniHelper.cpp b/native/cocos/platform/java/jni/JniHelper.cpp index 339c591282e..a4a39778059 100644 --- a/native/cocos/platform/java/jni/JniHelper.cpp +++ b/native/cocos/platform/java/jni/JniHelper.cpp @@ -204,7 +204,7 @@ jobject JniHelper::getContext() { jobject JniHelper::getActivity() { // TODO(cjh): In normal mode, sContext is Activity itself, but in surface-less mode, we need to // returns nullptr. - return sContext; + return sActivity; } void JniHelper::setActivity(jobject activity) {