• AlexF's avatar
    tdf#88389 - android document browser: external storage access · 1dfb68de
    AlexF yazdı
    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/20738Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
    Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
    1dfb68de
Adı
Son kayıt (commit)
Son güncelleme
..
Bootstrap Loading commit data...
default-document Loading commit data...
source Loading commit data...
.gitignore Loading commit data...
CustomTarget_lo_android.mk Loading commit data...
Makefile Loading commit data...
Module_android.mk Loading commit data...
README Loading commit data...
mobile-config.py Loading commit data...