@kobe-brants/react-native-keep-awake 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,33 +1,17 @@
|
|
|
1
1
|
package com.keepawake
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.
|
|
3
|
+
import com.facebook.react.ReactPackage
|
|
4
4
|
import com.facebook.react.bridge.NativeModule
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.
|
|
7
|
-
import
|
|
8
|
-
import java.util.HashMap
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
import java.util.Collections
|
|
9
8
|
|
|
10
|
-
class KeepAwakePackage :
|
|
11
|
-
override fun
|
|
12
|
-
return
|
|
13
|
-
KeepAwakeModule(reactContext)
|
|
14
|
-
} else {
|
|
15
|
-
null
|
|
16
|
-
}
|
|
9
|
+
class KeepAwakePackage : ReactPackage {
|
|
10
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
11
|
+
return listOf(KeepAwakeModule(reactContext))
|
|
17
12
|
}
|
|
18
13
|
|
|
19
|
-
override fun
|
|
20
|
-
return
|
|
21
|
-
val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
|
|
22
|
-
moduleInfos[KeepAwakeModule.NAME] = ReactModuleInfo(
|
|
23
|
-
KeepAwakeModule.NAME,
|
|
24
|
-
KeepAwakeModule.NAME,
|
|
25
|
-
false, // canOverrideExistingModule
|
|
26
|
-
false, // needsEagerInit
|
|
27
|
-
false, // isCxxModule
|
|
28
|
-
true // isTurboModule
|
|
29
|
-
)
|
|
30
|
-
moduleInfos
|
|
31
|
-
}
|
|
14
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
15
|
+
return emptyList()
|
|
32
16
|
}
|
|
33
17
|
}
|