1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 00:01:19 +00:00

Fixed crash in folder picker on pre-Kitkat devices (fixes #772)

This commit is contained in:
Felix Ableitner 2016-10-31 09:19:37 +09:00
parent ad0d4272c7
commit 1420ccc1be

View file

@ -104,7 +104,9 @@ public class FolderPickerActivity extends SyncthingActivity
roots.add(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES));
roots.add(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS));
roots.add(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
roots.add(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS));
}
// Add paths that might not be accessible to Syncthing.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);