|
@@ -15,6 +15,7 @@ abstract class CopyFileActivity : KdanBaseActivity() {
|
|
|
|
|
|
abstract fun getKdanPdfReaderFolder(): File
|
|
|
abstract fun provideReaderActivityIntent(filePath: String?): Intent
|
|
|
+ open fun hasPermissionToAccessExternalStorage(): Boolean = true
|
|
|
|
|
|
companion object {
|
|
|
const val KEY_FILE_ABSOLUTE_PATH = "file_absolute_path"
|
|
@@ -58,6 +59,7 @@ abstract class CopyFileActivity : KdanBaseActivity() {
|
|
|
}
|
|
|
|
|
|
private fun showFileCannotOpenDialog(title: String) {
|
|
|
+ if (!hasPermissionToAccessExternalStorage()) return
|
|
|
val fileCannotOpenDialog = FileCannotOpenDialogFragment()
|
|
|
fileCannotOpenDialog.arguments = Bundle().also {
|
|
|
it.putString(FileCannotOpenDialogFragment.KEY_DIALOG_TITLE, title)
|