Skip to content

Commit a291e37

Browse files
authored
Merge pull request #128 from rust-mobile/ndk-stable
Upgrade to stable `ndk 0.8` and `ndk-sys 0.5` releases
2 parents 3d5e479 + 2ecaab9 commit a291e37

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

android-activity/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ log = "0.4"
3333
jni-sys = "0.3"
3434
cesu8 = "1"
3535
jni = "0.21"
36-
ndk-sys = "0.5.0-beta.0"
37-
ndk = "0.8.0-beta.0"
36+
ndk-sys = "0.5.0"
37+
ndk = "0.8.0"
3838
ndk-context = "0.1"
3939
android-properties = "0.2"
4040
num_enum = "0.7"

android-activity/src/native_activity/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ extern "C" fn ANativeActivity_onCreate(
909909
// code to look up non-standard Java classes.
910910
android_main(app);
911911
})
912-
.unwrap_or_else(|panic| log_panic(panic));
912+
.unwrap_or_else(log_panic);
913913

914914
// Let JVM know that our Activity can be destroyed before detaching from the JVM
915915
//

android-activity/src/native_activity/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,14 +494,13 @@ impl<'a> InputIteratorInner<'a> {
494494
return false;
495495
};
496496

497-
// Note: we basically ignore errors from get_event() currently. Looking
498-
// at the source code for Android's InputQueue, the only error that
499-
// can be returned here is 'WOULD_BLOCK', which we want to just treat as
500-
// meaning the queue is empty.
497+
// Note: we basically ignore errors from event() currently. Looking at the source code for
498+
// Android's InputQueue, the only error that can be returned here is 'WOULD_BLOCK', which we
499+
// want to just treat as meaning the queue is empty.
501500
//
502501
// ref: https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/jni/android_view_InputQueue.cpp
503502
//
504-
if let Ok(Some(ndk_event)) = queue.get_event() {
503+
if let Ok(Some(ndk_event)) = queue.event() {
505504
log::trace!("queue: got event: {ndk_event:?}");
506505

507506
if let Some(ndk_event) = queue.pre_dispatch(ndk_event) {

0 commit comments

Comments
 (0)