Fix a bug that exposes non-thread-safe access for reading dir.

This commit is contained in:
Garfield Tan 2017-07-06 19:02:14 -07:00
parent a35d17f4e7
commit b9d90368bc

View file

@ -84,7 +84,7 @@ class SambaFacadeClient extends BaseClient implements SmbFacade {
try (final MessageValues<SmbDir> messageValues = MessageValues.obtain()) {
final Message msg = obtainMessage(READ_DIR, messageValues, uri);
enqueue(msg);
return messageValues.getObj();
return new SambaDirClient(mHandler.getLooper(), messageValues.getObj());
}
}