Skip to content

Commit

Permalink
fix(android): unescape escaped underscore in package name (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Aug 16, 2022
1 parent d7c641e commit 6d8cc7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/android-package-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": "patch"
---

Fix calling android functions when package name contained escaped underscore.
2 changes: 1 addition & 1 deletion src/platform_impl/android/ndk_glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ macro_rules! android_binding {
object: JObject,
) {
let domain = stringify!($domain).replace("_", "/");
let package = format!("{}/{}", domain, stringify!($package));
let package = format!("{}/{}", domain, stringify!($package).replace("_1","_"));
PACKAGE.get_or_init(move || package);
create(env, class, object, $setup, $main)
}
Expand Down

0 comments on commit 6d8cc7e

Please sign in to comment.