Use Application#registerLifecycleEvents() instead of a Fragment for Beam.
Fragments don't work as desired if called after life-cycle events
such as onDestory() or onSaveInstanceState().
The new approach doesn't work after onDestroy() either, but we can more
easily detect this now. For pre-JB apps, we will log an error, and for
JB and onwards we will throw.
Update documentation to make these rules clear, and to encourage
the use of a single Activity per API call, and to make the call
in onCreate().
Bug: 5199662
Bug: 5994691
Bug: 6034901
Bug: 6125297
Change-Id: Ib0dde6abfa44cd56c7ddc13ba0ad0e83bbe30058
4 files changed