From 2bedeee96caf59952be078506a4c8f632678cc86 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 23 Mar 2023 19:07:31 +0800 Subject: [PATCH] android: a note on protect socket usage --- leaf/src/mobile/callback.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/leaf/src/mobile/callback.rs b/leaf/src/mobile/callback.rs index 0832098..12bc544 100644 --- a/leaf/src/mobile/callback.rs +++ b/leaf/src/mobile/callback.rs @@ -1,5 +1,11 @@ /// Example: /// +/// Note: the protect method could be identified as unused code on the Android +/// side and stripped by ProGuard, you may need to add a keep rule to let +/// ProGuard knows we need the code, e.g.: +/// +/// -keep class com.leaf.and.aleaf.** { *; } +/// /// // Sets a callback method to protect sockets. /// // /// // Expects a method with the given name and signature `(I)Z`.