Closed doridori closed 7 years ago
https://github.com/doridori/Pilot/blob/master/android/lib/app/src/main/java/com/kodroid/pilot/lib/android/PilotLifecycleManager.java#L103 should delete specific listeners rather than all. If the same stack instance is used across Activity instances e.g. after a config change, and the lifecycle methods interleave like the below:
NewActivity.onCreate()
OldActivity.onStop()
OldActivity.onDestroy
PilotLifeCycleManager.removeAllListeners()
then the NewActivity has its listener removed. remove should only remove the listeners that lifecycleManager added.
NewActivity
remove
lifecycleManager
https://github.com/doridori/Pilot/blob/master/android/lib/app/src/main/java/com/kodroid/pilot/lib/android/PilotLifecycleManager.java#L103 should delete specific listeners rather than all. If the same stack instance is used across Activity instances e.g. after a config change, and the lifecycle methods interleave like the below:
NewActivity.onCreate()
OldActivity.onStop()
OldActivity.onDestroy
PilotLifeCycleManager.removeAllListeners()
then the
NewActivity
has its listener removed.remove
should only remove the listeners thatlifecycleManager
added.