cgeo / cgeo

c:geo - The powerful Android geocaching app.
www.cgeo.org
Apache License 2.0
1.39k stars 566 forks source link

In 'NewMap', 'onStop' may lead 'historyLayer' to be always set to null in 'onSaveInstanceState' #8965

Closed AICT20 closed 1 year ago

AICT20 commented 4 years ago

Description From Android documents, 'onStop' will be executed before 'onSaveInstanceState' in/after Adnroid API 28. In Activity 'NewMap', 'onSaveInstanceState' saves the field 'historyLayer' while 'onStop' sets it to null, so 'historyLayer' is always saved to null in/after API 28

Expected behavior/state after performing these steps: Maybe both side should be adapted(before API28 and in/after API 28), as from my own test, 'onStop' is still executed after 'onSaveInstanceState' on devices before API 28.

eddiemuc commented 1 year ago

Unclear whether this is a problem leading to wrong behaviour in c:geo, thus closing for now. Please reopen if still relevant?