Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 4594f8a

Browse files
committed
Remove unused code
1 parent 907554a commit 4594f8a

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

ScopedStorage/app/src/main/java/com/samples/storage/mediastore/AddDocumentViewModel.kt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -284,31 +284,6 @@ class AddDocumentViewModel(
284284
}
285285
}
286286

287-
/**
288-
* Get file details on Api 21
289-
*
290-
* It uses the classic java.io APIs but can't get the added time as there's not a reliable way
291-
* to do so until Api 26
292-
*/
293-
private suspend fun getFileDetailsIoApi21(path: String): FileEntry? {
294-
return withContext(Dispatchers.IO) {
295-
val file = File(path)
296-
297-
if (!file.exists()) {
298-
return@withContext null
299-
}
300-
301-
return@withContext FileEntry(
302-
filename = file.name,
303-
size = file.length(),
304-
mimeType = URLConnection.guessContentTypeFromName(file.name),
305-
// There are no reliable ways to get the added time on Api 26
306-
addedAt = -1,
307-
path = path
308-
)
309-
}
310-
}
311-
312287
/**
313288
* Get file details on Api 21
314289
*

0 commit comments

Comments
 (0)