all: replace ALooper_pollAll with ALooper_pollOnce
ALooper_pollAll is no longer available as of Android SDK 34. Fixes golang/go#67496 Change-Id: I1f781ef70d569df50d3059ce355a2f7d1edb435a Reviewed-on: https://go-review.googlesource.com/c/mobile/+/586595 Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Auto-Submit: Hajime Hoshi <hajimehoshi@gmail.com>
This commit is contained in:
Родитель
a1a533f289
Коммит
fa72addaaa
|
@ -365,7 +365,7 @@ func runInputQueue(vm, jniEnv, ctx uintptr) error {
|
|||
|
||||
var q *C.AInputQueue
|
||||
for {
|
||||
if C.ALooper_pollAll(-1, nil, nil, nil) == C.ALOOPER_POLL_WAKE {
|
||||
if C.ALooper_pollOnce(-1, nil, nil, nil) == C.ALOOPER_POLL_WAKE {
|
||||
select {
|
||||
default:
|
||||
case p := <-pending:
|
||||
|
|
|
@ -61,7 +61,7 @@ int GoAndroid_readQueue(int n, int32_t* types, int64_t* timestamps, float* vecto
|
|||
// Try n times read from the event queue.
|
||||
// If anytime timeout occurs, don't retry to read and immediately return.
|
||||
// Consume the event queue entirely between polls.
|
||||
while (i < n && (id = ALooper_pollAll(GO_ANDROID_READ_TIMEOUT_MS, NULL, &events, NULL)) >= 0) {
|
||||
while (i < n && (id = ALooper_pollOnce(GO_ANDROID_READ_TIMEOUT_MS, NULL, &events, NULL)) >= 0) {
|
||||
if (id != GO_ANDROID_SENSOR_LOOPER_ID) {
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче