0

I have created a zero size file aaa.txt on the root folder of the UNENCRYPTED removable SD card. The file aaa.txt has correct size 0 bytes when I list all entries in the root folder with DocumentFile#listFiles().

If I encrypt removable SD card from "Settings" -> "Lock screen and security option" -> "Encrypt SD card" and call DocumentFile#listFiles() again, I get size 8192 bytes!

As I suppose DocumentFile API should show me the same size for both encrypted and unencrypted cases. Device model Samsung Galaxy S7 with Android 7.0.

Community
  • 1
  • 1
isabsent
  • 3,683
  • 3
  • 25
  • 46
  • "As I suppose DocumentFile API should show me the same size for both encrypted and unencrypted cases" -- I would not make that assumption. `DocumentFile` itself is not really your problem; the storage provider for the removable storage is reporting 8192 bytes. As to why it is doing that, ask Samsung. – CommonsWare Aug 18 '17 at 11:30
  • Thanks, Mark! Alredy done http://developer.samsung.com/forum/thread/documentfile-api-is-broken-on-encrypted-removable-sd-card-on-samsung-galaxy-s7/201/318140?boardName=SDK&startId=zzzzz~ – isabsent Aug 18 '17 at 11:58

0 Answers0