From 7c10c620aeacd3f6776390f318e2a7edebcdd313 Mon Sep 17 00:00:00 2001 From: Vishal Nehra Date: Wed, 15 Jun 2022 04:14:02 +0530 Subject: [PATCH 1/2] Fix jni function name --- file_operations/src/main/c/rootoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_operations/src/main/c/rootoperations.c b/file_operations/src/main/c/rootoperations.c index df3f7621cb..2fcf855db8 100644 --- a/file_operations/src/main/c/rootoperations.c +++ b/file_operations/src/main/c/rootoperations.c @@ -5,7 +5,7 @@ #include #include -JNIEXPORT jboolean JNICALL Java_com_amaze_filemanager_file_1operations_filesystem_root_NativeOperations_isDirectory( +JNIEXPORT jboolean JNICALL Java_com_amaze_filemanager_fileoperations_filesystem_root_NativeOperations_isDirectory( JNIEnv * env, jobject thiz, jstring path From aa80dc76f9cfdd3fce0a022c5b65156e6c676e12 Mon Sep 17 00:00:00 2001 From: Vishal Nehra Date: Wed, 15 Jun 2022 20:12:39 +0530 Subject: [PATCH 2/2] Get logger instance at startup --- .../java/com/amaze/filemanager/application/AppConfig.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/amaze/filemanager/application/AppConfig.java b/app/src/main/java/com/amaze/filemanager/application/AppConfig.java index fcbe3aaf93..09a33595f9 100644 --- a/app/src/main/java/com/amaze/filemanager/application/AppConfig.java +++ b/app/src/main/java/com/amaze/filemanager/application/AppConfig.java @@ -68,7 +68,7 @@ reportSenderFactoryClasses = AcraReportSenderFactory.class) public class AppConfig extends GlideApplication { - private static final Logger LOG = LoggerFactory.getLogger(AppConfig.class); + private Logger log = null; private UtilitiesProvider utilsProvider; private RequestQueue requestQueue; @@ -107,6 +107,7 @@ public void onCreate() { // disabling file exposure method check for api n+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build()); + log = LoggerFactory.getLogger(AppConfig.class); } @Override @@ -256,7 +257,9 @@ protected void initACRA() { .build(); ACRA.init(this, acraConfig); } catch (final ACRAConfigurationException ace) { - LOG.warn("failed to initialize ACRA", ace); + if (log != null) { + log.warn("failed to initialize ACRA", ace); + } ErrorActivity.reportError( this, ace,