tom91136 / Akatsuki

Android states and arguments made easy with annotations
Apache License 2.0
138 stars 15 forks source link

Crash when @Retained is used without @Arg, but Intent has extras #19

Open Alexander-- opened 8 years ago

Alexander-- commented 8 years ago
  1. Create Activity with retained instance variable, annotated with @Retained
  2. Do not annotate anything with @Arg
  3. Start the Activity with Intent, that has extras Bundle

Result: Akatsuki.restore will receive null for instance state and try to find retainer for Arg. This will fail. The app will crash.

Expected result: persisting instance state should not conflict with argument handling; calling restore should not crash the app.

tom91136 commented 8 years ago

Sorry for late reply, I'm was having exams. I'm aware of this issue , there has been an ongoing discussion about exactly this in #15. I'm in the middle of rewriting this library and that will hopefully fix this for good.