Commit ee76efb
Dianne Hackborn
Fix issue #6584942 IllegalStateException: Failure saving state...
...active SuggestFragment{419494f0} has cleared index: -1
There were issues when the same fragment was removed and then
added again before completely finishing the remove (such as due
to a running animation).
Two fixes:
- Now when you call FragmentTransaction.replace() and are replacing
a fragment with the same fragment, this becomes a no-op, to avoid
visual artifacts in the transition and bad states.
- When we are moving the fragment state up and it is currently
animating away to the INITIALIZED state, we could end up making
the fragment inactive as part of the cleanup. In this case it
shouldn't be made inactive; we just need to initialize it but
keep it active since we are going to continue to use it.
Bug: 6584942
Change-Id: I8bfd73f2d8ef8f67b541b3e2525dfa5db6c3bfa51 parent 51df04b commit ee76efb
File tree
3 files changed
+56
-38
lines changed- core/java/android/app
3 files changed
+56
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
506 | 511 | | |
507 | 512 | | |
508 | 513 | | |
509 | | - | |
510 | | - | |
511 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
512 | 519 | | |
513 | 520 | | |
514 | 521 | | |
| |||
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
571 | | - | |
572 | | - | |
573 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
574 | 593 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | 594 | | |
584 | 595 | | |
585 | 596 | | |
586 | | - | |
587 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
588 | 601 | | |
589 | 602 | | |
590 | 603 | | |
| |||
644 | 657 | | |
645 | 658 | | |
646 | 659 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
651 | 666 | | |
652 | 667 | | |
653 | 668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
1506 | | - | |
| 1506 | + | |
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | | - | |
| 733 | + | |
| 734 | + | |
734 | 735 | | |
735 | 736 | | |
736 | 737 | | |
| |||
757 | 758 | | |
758 | 759 | | |
759 | 760 | | |
760 | | - | |
| 761 | + | |
761 | 762 | | |
762 | 763 | | |
763 | 764 | | |
| |||
940 | 941 | | |
941 | 942 | | |
942 | 943 | | |
943 | | - | |
| 944 | + | |
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| |||
992 | 993 | | |
993 | 994 | | |
994 | 995 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
1000 | 1003 | | |
1001 | 1004 | | |
1002 | 1005 | | |
| |||
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
1010 | | - | |
| 1013 | + | |
1011 | 1014 | | |
1012 | 1015 | | |
1013 | 1016 | | |
| |||
1029 | 1032 | | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | | - | |
| 1035 | + | |
1033 | 1036 | | |
1034 | 1037 | | |
1035 | 1038 | | |
| |||
1122 | 1125 | | |
1123 | 1126 | | |
1124 | 1127 | | |
1125 | | - | |
| 1128 | + | |
1126 | 1129 | | |
1127 | 1130 | | |
1128 | 1131 | | |
| |||
1189 | 1192 | | |
1190 | 1193 | | |
1191 | 1194 | | |
1192 | | - | |
| 1195 | + | |
1193 | 1196 | | |
1194 | 1197 | | |
1195 | 1198 | | |
| |||
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
1207 | | - | |
| 1210 | + | |
1208 | 1211 | | |
1209 | 1212 | | |
1210 | 1213 | | |
| |||
0 commit comments