Skip to content

Commit bb3e957

Browse files
committed
fix(android): compile error on new arch
1 parent b596a14 commit bb3e957

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

android/src/main/java/com/alpha0010/fs/FileAccessModule.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FileAccessModule internal constructor(context: ReactApplicationContext) :
3535
return NAME
3636
}
3737

38-
override fun getConstants(): MutableMap<String, String?> {
38+
override fun getTypedExportedConstants(): MutableMap<String, String?> {
3939
val sdCardDir = try {
4040
// Search via env may not be reliable. Recent Android versions
4141
// discourage/restrict full access to public locations.

android/src/oldarch/FileAccessSpec.kt

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import com.facebook.react.bridge.ReadableMap
88
abstract class FileAccessSpec internal constructor(context: ReactApplicationContext) :
99
ReactContextBaseJavaModule(context) {
1010

11+
protected abstract fun getTypedExportedConstants(): MutableMap<String, String?>
12+
13+
override fun getConstants() = getTypedExportedConstants()
14+
1115
abstract fun addListener(eventType: String)
1216
abstract fun removeListeners(count: Double)
1317
abstract fun appendFile(path: String, data: String, encoding: String, promise: Promise)

0 commit comments

Comments
 (0)