Fragment grab bag!
* Fragment#isStateSaved: report whether a given fragment has been
through state save within its given FragmentManager. This will
additionally echo the state of its child FragmentManager, indicating
whether it is safe to perform transactions without losing state.
* Fragment#setArguments can now be called at any time before a
fragment's state is saved, not just before an internal index is
assigned. This fixes an issue with assigning arguments during
fragment inflation in some code paths.
* FragmentTransaction#postOnCommit: Add a Runnable to a
FragmentTransaction that will be executed once the operations in the
transaction have been fully executed. Transaction optimization may
mean that other transaction ops could run before this is executed,
or that specific operations from this transaction were optimized
out. (e.g. a fragment in this transaction was added, but then
removed in a subsequent transaction before pending operations were
executed.) This may not be used for transactions added to the back
stack, as we cannot persist the runnable for later to guarantee
running it when the transaction is reversed.
Test: CTS
Change-Id: I4eb90588135e30f287c6487aa62ebda231f3dad3
7 files changed