mirror of
https://github.com/go-i2p/gomobile-java.git
synced 2025-07-13 03:53:12 -04:00
app: remove incorrect call to AInputQueue_detachLooper
Native activity callback onInputQueueCreated does not attach a looper to the input queue within android.c. Various examples of first detaching looper on the web are based around use of native_app_glue_code which does attach a looper before passing on to user callback. Calling detachLooper pre-5.0 results in a crash. I didn't track down exact source for this but code that likely made it's way into 5.0 given the time frame can be seen to show a recast of and iter over size() of a container. This possibly explains the lack of crashing for 5.0+ instead of potentially referencing a null pointer pre-5.0. Fixes golang/go#13741 Change-Id: Ie04de9f34436a95c456a56b34f1ca7e6adc00b09 Reviewed-on: https://go-review.googlesource.com/20145 Reviewed-by: Nigel Tao <nigeltao@golang.org>
This commit is contained in:

committed by
Nigel Tao

parent
45143d8b25
commit
39fb9d6163
@ -157,7 +157,6 @@ func onNativeWindowDestroyed(activity *C.ANativeActivity, window *C.ANativeWindo
|
|||||||
|
|
||||||
//export onInputQueueCreated
|
//export onInputQueueCreated
|
||||||
func onInputQueueCreated(activity *C.ANativeActivity, q *C.AInputQueue) {
|
func onInputQueueCreated(activity *C.ANativeActivity, q *C.AInputQueue) {
|
||||||
C.AInputQueue_detachLooper(q)
|
|
||||||
inputQueue <- q
|
inputQueue <- q
|
||||||
<-inputQueueDone
|
<-inputQueueDone
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user