app/internal/wm: [Android] make GioView delegate methods public

GioActivity is final to avoid the brittle base class problem. However,
to permit replacement of GioActivity the GioView delegate methods must
be public.

While here fix a function signature, rename lowMemory to onLowMemory and make it
static. Also move view specific setup to GioView, simplifying the host
activity further.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-05-19 15:06:12 +02:00
parent a7be7cc22b
commit 9ad492e93b
3 changed files with 15 additions and 23 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ func Java_org_gioui_GioView_onSurfaceChanged(env *C.JNIEnv, class C.jclass, hand
}
//export Java_org_gioui_GioView_onLowMemory
func Java_org_gioui_GioView_onLowMemory() {
func Java_org_gioui_GioView_onLowMemory(env *C.JNIEnv, class C.jclass) {
runtime.GC()
debug.FreeOSMemory()
}