doridori / Pilot

An android.* decoupled application stack for Android
Apache License 2.0
116 stars 9 forks source link

C-43: PilotLifecycleManager should delete specific Listeners #43

Closed doridori closed 7 years ago

doridori commented 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:

then the NewActivity has its listener removed. remove should only remove the listeners that lifecycleManager added.