Skip to content

Commit

Permalink
Fix: is_new_stability for Android 12
Browse files Browse the repository at this point in the history
Only Android 12 version uses "Category" as the stability format for passing on the wire lines. Android 13 and 14 versions remain the same as before.
  • Loading branch information
tsailin-bit committed Mar 18, 2024
1 parent 3948270 commit 094ff28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rsbinder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ pub fn set_android_version(version: i32) {
pub fn is_new_stability() -> bool {
#[cfg(target_os = "android")]
match ANDROID_VERSION.get() {
Some(version) => *version >= 12,
None => true, // Support the latest version by default.
Some(version) => *version == 12,
None => false, // Support the latest version by default.
}
#[cfg(not(target_os = "android"))]
true
false
}

#[cfg(test)]
Expand Down

0 comments on commit 094ff28

Please sign in to comment.