Skip to content

Commit 7a462ef

Browse files
authored
Ensure examples compile on latest version of AOSP (#2414)
This is part of #2398.
1 parent c16c07a commit 7a462ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/android/interoperability/java/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ use jni::JNIEnv;
2222
/// HelloWorld::hello method implementation.
2323
#[no_mangle]
2424
pub extern "system" fn Java_HelloWorld_hello(
25-
env: JNIEnv,
25+
mut env: JNIEnv,
2626
_class: JClass,
2727
name: JString,
2828
) -> jstring {
29-
let input: String = env.get_string(name).unwrap().into();
29+
let input: String = env.get_string(&name).unwrap().into();
3030
let greeting = format!("Hello, {input}!");
3131
let output = env.new_string(greeting).unwrap();
32-
output.into_inner()
32+
output.into_raw()
3333
}

src/android/logging/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
logger::init(
2323
logger::Config::default()
2424
.with_tag_on_device("rust")
25-
.with_min_level(log::Level::Trace),
25+
.with_max_level(log::LevelFilter::Trace),
2626
);
2727
debug!("Starting program.");
2828
info!("Things are going fine.");

0 commit comments

Comments
 (0)