mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-18 03:45:33 -04:00
Asserted manager to be non-null
This commit is contained in:
parent
6935fa6141
commit
dc58e64ea3
@ -56,6 +56,12 @@ object KiwixModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@KiwixScope
|
@KiwixScope
|
||||||
fun providesWiFiP2pManager(context: Context): WifiP2pManager =
|
fun providesWiFiP2pManager(context: Context): WifiP2pManager {
|
||||||
context.getSystemService(Context.WIFI_P2P_SERVICE) as WifiP2pManager
|
val manager: WifiP2pManager? by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
context.getSystemService(
|
||||||
|
Context.WIFI_P2P_SERVICE
|
||||||
|
) as WifiP2pManager
|
||||||
|
}
|
||||||
|
return manager!!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user