Fix crash in NetworkServiceManager.
- Fixed a crash in NetworkServiceManager, which is listening to the activities' lifecycle of the whole app. The issue is that it was expecting a call to onActivityCreated where the Bundle was never null and that is a problem because the Bundle can most of the times be null during normal behavior. The Bundle isn't null only when the app is recovering from a forced process dead, which happens when there is another app open which requires resources and the systems kills apps that are not being used at that moment.
This commit is contained in:
parent
239fac9ad7
commit
20571d49a3
1 changed files with 2 additions and 7 deletions
|
@ -33,7 +33,7 @@ class NetworkServiceManager(nodes: List<String>) :
|
|||
}
|
||||
}
|
||||
|
||||
override fun onActivityCreated(activity: Activity, bundle: Bundle) {}
|
||||
override fun onActivityCreated(activity: Activity, bundle: Bundle?) {}
|
||||
override fun onActivityStarted(activity: Activity) {}
|
||||
override fun onActivityResumed(activity: Activity?) {
|
||||
mHandler.removeCallbacks(mDisconnectRunnable)
|
||||
|
@ -51,12 +51,7 @@ class NetworkServiceManager(nodes: List<String>) :
|
|||
}
|
||||
|
||||
override fun onActivityStopped(activity: Activity) {}
|
||||
override fun onActivitySaveInstanceState(
|
||||
activity: Activity,
|
||||
bundle: Bundle
|
||||
) {
|
||||
}
|
||||
|
||||
override fun onActivitySaveInstanceState(activity: Activity, bundle: Bundle) {}
|
||||
override fun onActivityDestroyed(activity: Activity) {}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue