xbmc/xbmc — pull request #2278 by theuni (2013-02-22 06:18:48+00:00)
Title: droid: remove the stateful life-cycle manager

This fixes random black-screens, fixes, and crashes when starting XBMC as a
launcher.

Simply properly react to messages from appglue. This ends up being much cleaner and
more straightforward.

There were many problems with the old life-cycle code:
- It based all decisions on gain/loss of focus, which is incorrect, as that
pertains to input rather than windowing.
- Due to the above, there were many race conditions.
- The startup/teardown were convoluted. Now we start at startup and exit at exit :)
- It was a mix of examples, a stateful one where the app keeps track of status,
and a stateless one mainly handle by appglue. Since we really only care about
a handful of events (startup/exit/newwindow/destroywindow mainly), stateless
is the way to go for us.