From b9d90368bccd1d857dd47a847c66dae41edd194b Mon Sep 17 00:00:00 2001 From: Garfield Tan Date: Thu, 6 Jul 2017 19:02:14 -0700 Subject: [PATCH] Fix a bug that exposes non-thread-safe access for reading dir. --- .../sambadocumentsprovider/nativefacade/SambaFacadeClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/google/android/sambadocumentsprovider/nativefacade/SambaFacadeClient.java b/app/src/main/java/com/google/android/sambadocumentsprovider/nativefacade/SambaFacadeClient.java index 28d4aef..04985a6 100644 --- a/app/src/main/java/com/google/android/sambadocumentsprovider/nativefacade/SambaFacadeClient.java +++ b/app/src/main/java/com/google/android/sambadocumentsprovider/nativefacade/SambaFacadeClient.java @@ -84,7 +84,7 @@ class SambaFacadeClient extends BaseClient implements SmbFacade { try (final MessageValues messageValues = MessageValues.obtain()) { final Message msg = obtainMessage(READ_DIR, messageValues, uri); enqueue(msg); - return messageValues.getObj(); + return new SambaDirClient(mHandler.getLooper(), messageValues.getObj()); } }