Skip to content

Commit

Permalink
fix(android): compile error on new arch
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha0010 committed May 23, 2023
1 parent b596a14 commit bb3e957
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion android/src/main/java/com/alpha0010/fs/FileAccessModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FileAccessModule internal constructor(context: ReactApplicationContext) :
return NAME
}

override fun getConstants(): MutableMap<String, String?> {
override fun getTypedExportedConstants(): MutableMap<String, String?> {
val sdCardDir = try {
// Search via env may not be reliable. Recent Android versions
// discourage/restrict full access to public locations.
Expand Down
4 changes: 4 additions & 0 deletions android/src/oldarch/FileAccessSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import com.facebook.react.bridge.ReadableMap
abstract class FileAccessSpec internal constructor(context: ReactApplicationContext) :
ReactContextBaseJavaModule(context) {

protected abstract fun getTypedExportedConstants(): MutableMap<String, String?>

override fun getConstants() = getTypedExportedConstants()

abstract fun addListener(eventType: String)
abstract fun removeListeners(count: Double)
abstract fun appendFile(path: String, data: String, encoding: String, promise: Promise)
Expand Down

0 comments on commit bb3e957

Please sign in to comment.