You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Check if savedInstanceState bundle contains MapView keys #2816
To make the MapView class a bit more robust, we should check if the bundle from onCreate contains any MapView keys before trying to load them. This will prevent the app from crashing as in #2801 and will result in ignoring saved state in case that the end developer has not called the onSaveInstanceState method.
yeah, but you can't cover all the use cases. If the end developer doesn't override onsaveinstancestate we should just ignore the whole block by checking if bundle contains certain keys.
Activity
ljbade commentedon Oct 27, 2015
The bundle functions do allow a default value for missing keys. I am going to look at this.
tobrun commentedon Oct 28, 2015
yeah, but you can't cover all the use cases. If the end developer doesn't override onsaveinstancestate we should just ignore the whole block by checking if bundle contains certain keys.
ljbade commentedon Oct 28, 2015
@tobrun True. I am thinking we stash a magic key/value and check we get the same value back.
tobrun commentedon Feb 17, 2016
I'm adding:
to be able to check this in onCreate:
[android] #2816 - make save instance state robuster + cleanup some ol…