summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2017-01-26 14:14:34 -0800
committerAdam Powell <adamp@google.com>2017-01-27 00:52:26 +0000
commitab209a63a286ffb0ee57e884986839fa25d583ca (patch)
tree83947721ebcc9042fae9af8840b7ca90c560bebb /tools/aapt2/diff/Diff.cpp
parent9e77aefe9ce2c3caa8c0daebf21c86088e10b951 (diff)
Lifecycle guarantees for target fragments
Ported from frameworks/support change id I824eb312fbdfd6b548fe94aa2cd5b03afbaa97c7 When a target fragment was set using Fragment#setTargetFragment, all bets were off, especially when restoring from instance state. Order of lifecyle initialization was undefined meaning that two bugs could occur, both of which manifested as the target fragment was not initialized by the time the referring fragment's onCreate ran. One could happen if the target fragment is on the back stack, the other could happen if the target fragment was ordered unfortunately in FragmentManager implementation details. (!) Fix both by guaranteeing that any target fragment gets pushed forward to at least the CREATED state before we dispatch any lifecycle events for the referring fragment. Add some sanity checks that try to keep developers from setting target fragments across different FragmentManagers or from creating target cycles, both of which are bad ideas. Bug: 33653458 Test: CTS FragmentLifecycleTest Change-Id: If624d4665d29e205d37b9b384322e64d6d6d3615
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions