Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
prevents a crash on older devices
Browse files Browse the repository at this point in the history
  • Loading branch information
y20k committed Dec 16, 2019
1 parent a067457 commit c43457f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/y20k/escapepod/PodcastPlayerActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ class PodcastPlayerActivity: AppCompatActivity(), CoroutineScope,
var fileObserver: FileObserver? = null
// check if valid folder
if (folder != null && folder.isDirectory) {
// create the observer
fileObserver = object: FileObserver(folder, CREATE) {
// create the observer - Note: constructor is deprecated, but the one that it replaces is API 29+
fileObserver = object: FileObserver(folder.path, CREATE) {
override fun onEvent(event: Int, path: String?) {
// a file file was created in the collection folder
tryToOfferOpmlImport()
Expand Down

0 comments on commit c43457f

Please sign in to comment.