Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0de423c

Browse files
committed
fix JNI method
1 parent ed9c7ed commit 0de423c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,10 @@ public Bitmap getBitmap() {
845845
public void notifyLowMemoryWarning() {
846846
ensureRunningOnMainThread();
847847
ensureAttachedToNative();
848-
nativeNotifyLowMemoryWarning();
848+
nativeNotifyLowMemoryWarning(nativePlatformViewId);
849849
}
850850

851-
private native void nativeNotifyLowMemoryWarning();
851+
private native void nativeNotifyLowMemoryWarning(long nativePlatformViewId);
852852

853853
private void ensureRunningOnMainThread() {
854854
if (Looper.myLooper() != mainLooper) {

shell/platform/android/platform_view_android_jni_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ bool RegisterApi(JNIEnv* env) {
514514
},
515515
{
516516
.name = "nativeNotifyLowMemoryWarning",
517-
.signature = "()V",
517+
.signature = "(J)V",
518518
.fnPtr = reinterpret_cast<void*>(&NotifyLowMemoryWarning),
519519
},
520520

0 commit comments

Comments
 (0)