Add permission WRITE_EXTERNAL_STORAGE when needed.

API 19+ doesn't need this permission to write to getExternalFilesDir(null).
Merge branch 'hotfix/NullPointer-in-addCustomProviders-#6579' into develop
Merge branch 'develop'