summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAlexF <alexfongg@gmail.com>2015-12-16 22:53:08 +0800
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-02 19:25:41 +0000
commit1dfb68debb01dcc0aa5902f41bc17c7a97e47b26 (patch)
tree6e1237eaeb08179b4cfb29c54d4c8eb71341d736 /vcl
parentbb01d7bc50e59eb30c0826a000ede52b93074f75 (diff)
tdf#88389 - android document browser: external storage access
Background: External SD cards are only partially supported by the Android system, with a great deal of fragmentation on implementation across manufacturers and android versions. There is no official support for OTG devices. This commit adds: 1) External SD card support 2) OTG device support Caveats: 1) Not tested on Android 6. Emulator crashes when opening files on Android 6, using an unmodified build of the master branch. 2) OTG support currently works only if there is write access to the OTG directory. The user must be aware of exact OTG directory path or be able to navigate to it as well. 3) External SD card provider currently lacks file filtering. Approach: ----- Added new document providers. External SD cards: There are 2 different document providers external sd cards, one for Android 4.4 and above, and the other for older versions. 1) New Android 4.4 and above require usage of the DocumentFile wrapper class to access files in external storage. Actual file paths are no longer obtainable. As such, the underlying file will be cloned in a cache, allowing us to get an actual file path and use LOK. Some differences exist between 4.4 & 5+. The document provider handles each case separately. 2) Legacy Android 4.3 and below do not support the DocumentFile wrapper. File object can be used in these versions, allowing actual file paths to be obtained. The document provider guesses the root directory of the SD card. If the guessing fails, the user is to navigate to this directory himself. OTG: The OTG document provider resembles the legacy external SD card document provider, requiring the user to locate the directory himself. The document provider does not guess the root directory of the OTG device as the location varies with manufacturer implementation. ----- Supplementary Notes: Attempting to use the internal app cache as the file cache like in the ownCloud document provider did not work. Using the external app cache works fine though. It could be because initializing LOK wipes the internal app cache. Would be good to test the ownCloud document provider to confirm if it works. Change-Id: Ie727cca265107bc49ca7e7b57130470f7fc52e06 Reviewed-on: https://gerrit.libreoffice.org/20738 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
0 files changed, 0 insertions, 0 deletions