| | | |
Offset 1, 10 lines modified | Offset 1, 48 lines modified |
| |
1 | package·androidx.fragment.app; | 1 | package·androidx.fragment.app; |
| |
| 2 | import·java.util.concurrent.CountedCompleter; |
| 3 | import·java.lang.reflect.Array; |
| 4 | import·java.util.Spliterator; |
| 5 | import·java.util.NoSuchElementException; |
| 6 | import·jdk.internal.vm.annotation.Contended; |
| 7 | import·java.util.concurrent.locks.ReentrantLock; |
| 8 | import·java.util.concurrent.Helpers; |
| 9 | import·java.util.concurrent.locks.LockSupport; |
| 10 | import·java.util.function.ToIntFunction; |
| 11 | import·java.util.function.ToLongFunction; |
| 12 | import·java.util.function.ToDoubleFunction; |
| 13 | import·java.util.function.IntBinaryOperator; |
| 14 | import·java.util.function.ToIntBiFunction; |
| 15 | import·java.util.function.LongBinaryOperator; |
| 16 | import·java.util.function.ToLongBiFunction; |
| 17 | import·java.util.function.DoubleBinaryOperator; |
| 18 | import·java.util.function.ToDoubleBiFunction; |
| 19 | import·java.util.concurrent.atomic.AtomicReference; |
| 20 | import·java.util.function.Consumer; |
| 21 | import·java.util.concurrent.ForkJoinPool; |
| 22 | import·java.util.Arrays; |
| 23 | import·java.util.concurrent.ThreadLocalRandom; |
| 24 | import·java.util.Enumeration; |
| 25 | import·java.util.function.Function; |
| 26 | import·java.util.function.Predicate; |
| 27 | import·java.util.function.BiFunction; |
| 28 | import·java.util.function.BiConsumer; |
| 29 | import·java.io.ObjectInputStream; |
| 30 | import·java.io.IOException; |
| 31 | import·java.io.ObjectOutputStream; |
| 32 | import·java.util.Map; |
| 33 | import·java.lang.reflect.Type; |
| 34 | import·java.lang.reflect.ParameterizedType; |
| 35 | import·jdk.internal.misc.Unsafe; |
| 36 | import·java.io.ObjectStreamField; |
| 37 | import·java.io.Serializable; |
| 38 | import·java.util.concurrent.ConcurrentMap; |
| 39 | import·java.util.AbstractMap; |
2 | import·androidx.lifecycle.Lifecycle$State; | 40 | import·androidx.lifecycle.Lifecycle$State; |
3 | import·java.io.Writer; | 41 | import·java.io.Writer; |
4 | import·android.os.Parcelable; | 42 | import·android.os.Parcelable; |
5 | import·android.view.animation.Animation; | 43 | import·android.view.animation.Animation; |
6 | import·androidx.lifecycle.ViewModelStore; | 44 | import·androidx.lifecycle.ViewModelStore; |
7 | import·android.view.LayoutInflater$Factory2; | 45 | import·android.view.LayoutInflater$Factory2; |
8 | import·java.util.List; | 46 | import·java.util.List; |
Offset 33, 40 lines modified | Offset 71, 38 lines modified |
33 | import·android.animation.Animator$AnimatorListener; | 71 | import·android.animation.Animator$AnimatorListener; |
34 | import·android.view.ViewGroup; | 72 | import·android.view.ViewGroup; |
35 | import·java.util.Set; | 73 | import·java.util.Set; |
36 | import·androidx.core.os.CancellationSignal; | 74 | import·androidx.core.os.CancellationSignal; |
37 | import·java.util.HashSet; | 75 | import·java.util.HashSet; |
38 | import·java.util.Iterator; | 76 | import·java.util.Iterator; |
39 | import·androidx.collection.ArraySet; | 77 | import·androidx.collection.ArraySet; |
40 | import·java.util.Collections; | |
41 | import·java.util.HashMap; | |
42 | import·androidx.activity.result.ActivityResultLauncher; | 78 | import·androidx.activity.result.ActivityResultLauncher; |
43 | import·androidx.activity.OnBackPressedDispatcher; | 79 | import·androidx.activity.OnBackPressedDispatcher; |
44 | import·androidx.activity.OnBackPressedCallback; | 80 | import·androidx.activity.OnBackPressedCallback; |
45 | import·java.util.concurrent.CopyOnWriteArrayList; | 81 | import·java.util.concurrent.CopyOnWriteArrayList; |
46 | import·java.util.ArrayDeque; | 82 | import·java.util.ArrayDeque; |
47 | import·java.util.Map; | 83 | import·java.util.concurrent.ConcurrentHashMap; |
48 | import·java.util.concurrent.atomic.AtomicInteger; | 84 | import·java.util.concurrent.atomic.AtomicInteger; |
49 | import·java.util.ArrayList; | 85 | import·java.util.ArrayList; |
| |
50 | public·abstract·class·FragmentManager | 86 | public·abstract·class·FragmentManager |
51 | { | 87 | { |
52 | ····private·static·boolean·DEBUG·=·false; | 88 | ····private·static·boolean·DEBUG·=·false; |
53 | ····static·boolean·USE_STATE_MANAGER·=·true; | 89 | ····static·boolean·USE_STATE_MANAGER·=·false; |
54 | ····ArrayList·mBackStack; | 90 | ····ArrayList·mBackStack; |
55 | ····private·ArrayList·mBackStackChangeListeners; | 91 | ····private·ArrayList·mBackStackChangeListeners; |
56 | ····private·final·AtomicInteger·mBackStackIndex; | 92 | ····private·final·AtomicInteger·mBackStackIndex; |
57 | ····private·FragmentContainer·mContainer; | 93 | ····private·FragmentContainer·mContainer; |
58 | ····private·ArrayList·mCreatedMenus; | 94 | ····private·ArrayList·mCreatedMenus; |
59 | ····int·mCurState; | 95 | ····int·mCurState; |
60 | ····private·SpecialEffectsControllerFactory·mDefaultSpecialEffectsControllerFactory; | 96 | ····private·SpecialEffectsControllerFactory·mDefaultSpecialEffectsControllerFactory; |
61 | ····private·boolean·mDestroyed; | 97 | ····private·boolean·mDestroyed; |
62 | ····private·Runnable·mExecCommit; | 98 | ····private·Runnable·mExecCommit; |
63 | ····private·boolean·mExecutingActions; | 99 | ····private·boolean·mExecutingActions; |
64 | ····private·Map·mExitAnimationCancellationSignals; | 100 | ····private·ConcurrentHashMap·mExitAnimationCancellationSignals; |
65 | ····private·FragmentFactory·mFragmentFactory; | 101 | ····private·FragmentFactory·mFragmentFactory; |
66 | ····private·final·FragmentStore·mFragmentStore; | 102 | ····private·final·FragmentStore·mFragmentStore; |
67 | ····private·final·FragmentTransition$Callback·mFragmentTransitionCallback; | 103 | ····private·final·FragmentTransition$Callback·mFragmentTransitionCallback; |
68 | ····private·boolean·mHavePendingDeferredStart; | 104 | ····private·boolean·mHavePendingDeferredStart; |
69 | ····private·FragmentHostCallback·mHost; | 105 | ····private·FragmentHostCallback·mHost; |
70 | ····private·FragmentFactory·mHostFragmentFactory; | 106 | ····private·FragmentFactory·mHostFragmentFactory; |
71 | ····ArrayDeque·mLaunchedFragments; | 107 | ····ArrayDeque·mLaunchedFragments; |
Offset 78, 16 lines modified | Offset 114, 16 lines modified |
78 | ····private·final·OnBackPressedCallback·mOnBackPressedCallback; | 114 | ····private·final·OnBackPressedCallback·mOnBackPressedCallback; |
79 | ····private·OnBackPressedDispatcher·mOnBackPressedDispatcher; | 115 | ····private·OnBackPressedDispatcher·mOnBackPressedDispatcher; |
80 | ····private·Fragment·mParent; | 116 | ····private·Fragment·mParent; |
81 | ····private·final·ArrayList·mPendingActions; | 117 | ····private·final·ArrayList·mPendingActions; |
82 | ····private·ArrayList·mPostponedTransactions; | 118 | ····private·ArrayList·mPostponedTransactions; |
83 | ····Fragment·mPrimaryNav; | 119 | ····Fragment·mPrimaryNav; |
84 | ····private·ActivityResultLauncher·mRequestPermissions; | 120 | ····private·ActivityResultLauncher·mRequestPermissions; |
85 | ····private·final·Map·mResultListeners; | 121 | ····private·final·ConcurrentHashMap·mResultListeners; |
86 | ····private·final·Map·mResults; | 122 | ····private·final·ConcurrentHashMap·mResults; |
87 | ····private·SpecialEffectsControllerFactory·mSpecialEffectsControllerFactory; | 123 | ····private·SpecialEffectsControllerFactory·mSpecialEffectsControllerFactory; |
88 | ····private·ActivityResultLauncher·mStartActivityForResult; | 124 | ····private·ActivityResultLauncher·mStartActivityForResult; |
89 | ····private·ActivityResultLauncher·mStartIntentSenderForResult; | 125 | ····private·ActivityResultLauncher·mStartIntentSenderForResult; |
90 | ····private·boolean·mStateSaved; | 126 | ····private·boolean·mStateSaved; |
91 | ····private·boolean·mStopped; | 127 | ····private·boolean·mStopped; |
92 | ····private·ArrayList·mTmpAddedFragments; | 128 | ····private·ArrayList·mTmpAddedFragments; |
93 | ····private·ArrayList·mTmpIsPop; | 129 | ····private·ArrayList·mTmpIsPop; |
Offset 95, 17 lines modified | Offset 131, 17 lines modified |
95 | ···· | 131 | ···· |
96 | ····public·FragmentManager()·{ | 132 | ····public·FragmentManager()·{ |
97 | ········this.mPendingActions·=·new·ArrayList(); | 133 | ········this.mPendingActions·=·new·ArrayList(); |
98 | ········this.mFragmentStore·=·new·FragmentStore(); | 134 | ········this.mFragmentStore·=·new·FragmentStore(); |
99 | ········this.mLayoutInflaterFactory·=·new·FragmentLayoutInflaterFactory(this); | 135 | ········this.mLayoutInflaterFactory·=·new·FragmentLayoutInflaterFactory(this); |
100 | ········this.mOnBackPressedCallback·=·(OnBackPressedCallback)new·FragmentManager$1(this,·false); | 136 | ········this.mOnBackPressedCallback·=·(OnBackPressedCallback)new·FragmentManager$1(this,·false); |
101 | ········this.mBackStackIndex·=·new·AtomicInteger(); | 137 | ········this.mBackStackIndex·=·new·AtomicInteger(); |
102 | ········this.mResults·=·Collections.synchronizedMap(new·HashMap<Object,·Object>()); | |
103 | ········this.mResultListeners·=·Collections.synchronizedMap(new·HashMap<Object,·Object>()); | |
104 | ········this.mExitAnimationCancellationSignals·=·Collections.synchronizedMap(new·HashMap<Object,·Object>()); | 138 | ········this.mResults·=·new·ConcurrentHashMap(); |
| 139 | ········this.mResultListeners·=·new·ConcurrentHashMap(); |
| 140 | ········this.mExitAnimationCancellationSignals·=·new·ConcurrentHashMap(); |
105 | ········this.mFragmentTransitionCallback·=·(FragmentTransition$Callback)new·FragmentManager$2(this); | 141 | ········this.mFragmentTransitionCallback·=·(FragmentTransition$Callback)new·FragmentManager$2(this); |
106 | ········this.mLifecycleCallbacksDispatcher·=·new·FragmentLifecycleCallbacksDispatcher(this); | 142 | ········this.mLifecycleCallbacksDispatcher·=·new·FragmentLifecycleCallbacksDispatcher(this); |
107 | ········this.mOnAttachListeners·=·new·CopyOnWriteArrayList(); | 143 | ········this.mOnAttachListeners·=·new·CopyOnWriteArrayList(); |
108 | ········this.mCurState·=·-1; | 144 | ········this.mCurState·=·-1; |
109 | ········this.mFragmentFactory·=·null; | 145 | ········this.mFragmentFactory·=·null; |
110 | ········this.mHostFragmentFactory·=·(FragmentFactory)new·FragmentManager$3(this); | 146 | ········this.mHostFragmentFactory·=·(FragmentFactory)new·FragmentManager$3(this); |
111 | ········this.mSpecialEffectsControllerFactory·=·null; | 147 | ········this.mSpecialEffectsControllerFactory·=·null; |
Offset 262, 15 lines modified | Offset 298, 15 lines modified |
262 | ············this.mExecutingActions·=·mExecutingActions; | 298 | ············this.mExecutingActions·=·mExecutingActions; |
263 | ············this.mFragmentStore.dispatchStateChange(use_STATE_MANAGER); | 299 | ············this.mFragmentStore.dispatchStateChange(use_STATE_MANAGER); |
264 | ············this.moveToState(use_STATE_MANAGER,·false); | 300 | ············this.moveToState(use_STATE_MANAGER,·false); |
265 | ············use_STATE_MANAGER·=·(FragmentManager.USE_STATE_MANAGER·?·1·:·0); | 301 | ············use_STATE_MANAGER·=·(FragmentManager.USE_STATE_MANAGER·?·1·:·0); |
266 | ············if·(use_STATE_MANAGER·!=·0)·{ | 302 | ············if·(use_STATE_MANAGER·!=·0)·{ |
267 | ················final·Iterator<SpecialEffectsController>·iterator·=·this.collectAllSpecialEffectsController().iterator(); | 303 | ················final·Iterator<SpecialEffectsController>·iterator·=·this.collectAllSpecialEffectsController().iterator(); |
268 | ················while·(iterator.hasNext())·{ | 304 | ················while·(iterator.hasNext())·{ |
269 | ····················((SpecialEffectsController)iterator.next()).forceCompleteAllOperations(); | 305 | ····················((SpecialEffectsController)iterator.next()).executePendingOperations(); |
270 | ················} | 306 | ················} |
271 | ············} | 307 | ············} |
272 | ············this.mExecutingActions·=·false; | 308 | ············this.mExecutingActions·=·false; |
273 | ············this.execPendingActions(mExecutingActions); | 309 | ············this.execPendingActions(mExecutingActions); |
274 | ········} | 310 | ········} |
275 | ········finally·{ | 311 | ········finally·{ |
276 | ············this.mExecutingActions·=·false; | 312 | ············this.mExecutingActions·=·false; |
Offset 284, 15 lines modified | Offset 320, 15 lines modified |
284 | ········} | 320 | ········} |
285 | ····} | 321 | ····} |
286 | ···· | 322 | ···· |
287 | ····private·void·endAnimatingAwayFragments()·{ | 323 | ····private·void·endAnimatingAwayFragments()·{ |
288 | ········if·(FragmentManager.USE_STATE_MANAGER)·{ | 324 | ········if·(FragmentManager.USE_STATE_MANAGER)·{ |
289 | ············final·Iterator<SpecialEffectsController>·iterator·=·this.collectAllSpecialEffectsController().iterator(); | 325 | ············final·Iterator<SpecialEffectsController>·iterator·=·this.collectAllSpecialEffectsController().iterator(); |
290 | ············while·(iterator.hasNext())·{ | 326 | ············while·(iterator.hasNext())·{ |
291 | ················((SpecialEffectsController)iterator.next()).forceCompleteAllOperations(); | 327 | ················((SpecialEffectsController)iterator.next()).cancelAllOperations(); |
292 | ············} | 328 | ············} |
293 | ········} | 329 | ········} |
294 | ········else·if·(!this.mExitAnimationCancellationSignals.isEmpty())·{ | 330 | ········else·if·(!this.mExitAnimationCancellationSignals.isEmpty())·{ |
295 | ············for·(final·Fragment·fragment·:·this.mExitAnimationCancellationSignals.keySet())·{ | 331 | ············for·(final·Fragment·fragment·:·this.mExitAnimationCancellationSignals.keySet())·{ |
296 | ················this.cancelExitAnimation(fragment); | 332 | ················this.cancelExitAnimation(fragment); |
297 | ················this.moveToState(fragment); | 333 | ················this.moveToState(fragment); |
298 | ············} | 334 | ············} |
Offset 408, 38 lines modified | Offset 444, 18 lines modified |
408 | ············} | 444 | ············} |
409 | ············n5·=·n4; | 445 | ············n5·=·n4; |
410 | ········} | 446 | ········} |
411 | ········executeOps(list,·list2,·index,·n); | 447 | ········executeOps(list,·list2,·index,·n); |
412 | ········int·n6; | 448 | ········int·n6; |
413 | ········ArrayList<Boolean>·list3; | 449 | ········ArrayList<Boolean>·list3; |
414 | ········if·(FragmentManager.USE_STATE_MANAGER)·{ | 450 | ········if·(FragmentManager.USE_STATE_MANAGER)·{ |
415 | ············final·boolean·booleanValue·=·(boolean)list2.get(n·-·1); | |
416 | ············if·(mReorderingAllowed)·{ | 451 | ············if·(mReorderingAllowed)·{ |
417 | ················for·(int·j·=·index;·j·<·n;·++j)·{ | |
418 | ····················final·BackStackRecord·backStackRecord2·=·(BackStackRecord)list.get(j); | |
419 | ····················if·(booleanValue)·{ | |
420 | ························for·(int·k·=·((FragmentTransaction)backStackRecord2).mOps.size()·-·n5;·k·>=·0;·--k)·{ | |
421 | ····························final·Fragment·mFragment2·=·((FragmentTransaction$Op)((FragmentTransaction)backStackRecord2).mOps.get(k)).mFragment; | |
422 | ····························if·(mFragment2·!=·null)·{ | |
423 | ································this.createOrGetFragmentStateManager(mFragment2).moveToExpectedState(); | |
424 | ····························} | |
425 | ························} | |
426 | ····················} | |
427 | ····················else·{ | |
428 | ························final·Iterator·iterator2·=·((FragmentTransaction)backStackRecord2).mOps.iterator(); | |
429 | ························while·(iterator2.hasNext())·{ | |
430 | ····························final·Fragment·mFragment3·=·((FragmentTransaction$Op)iterator2.next()).mFragment; | |
431 | ····························if·(mFragment3·!=·null)·{ | |
432 | ································this.createOrGetFragmentStateManager(mFragment3).moveToExpectedState(); | |
433 | ····························} | |
434 | ························} | |
435 | ····················} | |
436 | ················} | |
437 | ················this.moveToState(this.mCurState,·n5·!=·0); | 452 | ················this.moveToState(this.mCurState,·n5·!=·0); |
438 | ············} | 453 | ············} |
| 454 | ············final·boolean·booleanValue·=·(boolean)list2.get(n·-·1); |
439 | ············for·(final·SpecialEffectsController·specialEffectsController·:·this.collectChangedControllers(list,·index,·n))·{ | 455 | ············for·(final·SpecialEffectsController·specialEffectsController·:·this.collectChangedControllers(list,·index,·n))·{ |
440 | ················specialEffectsController.updateOperationDirection(booleanValue); | 456 | ················specialEffectsController.updateOperationDirection(booleanValue); |
441 | ················specialEffectsController.markPostponedState(); | 457 | ················specialEffectsController.markPostponedState(); |
442 | ················specialEffectsController.executePendingOperations(); | 458 | ················specialEffectsController.executePendingOperations(); |
443 | ············} | 459 | ············} |
444 | ············n6·=·n; | 460 | ············n6·=·n; |
445 | ············list3·=·(ArrayList<Boolean>)list2; | 461 | ············list3·=·(ArrayList<Boolean>)list2; |
Offset 491, 20 lines modified | Offset 507, 20 lines modified |
491 | ················this.moveToState(this.mCurState,·b3); | 507 | ················this.moveToState(this.mCurState,·b3); |
492 | ············} | 508 | ············} |
493 | ············else·{ | 509 | ············else·{ |
494 | ················list3·=·list4; | 510 | ················list3·=·list4; |
495 | ················n6·=·n8; | 511 | ················n6·=·n8; |
496 | ············} | 512 | ············} |
497 | ········} | 513 | ········} |
498 | ········for·(int·l·=·index;·l·<·n6;·++l)·{ | 514 | ········for·(int·j·=·index;·j·<·n6;·++j)·{ |
499 | ············final·BackStackRecord·backStackRecord3·=·(BackStackRecord)list.get(l); | 515 | ············final·BackStackRecord·backStackRecord2·=·(BackStackRecord)list.get(j); |
500 | ············if·(list3.get(l)·&&·backStackRecord3.mIndex·>=·0)·{ | 516 | ············if·(list3.get(j)·&&·backStackRecord2.mIndex·>=·0)·{ |
501 | ················backStackRecord3.mIndex·=·-1; | 517 | ················backStackRecord2.mIndex·=·-1; |
502 | ············} | 518 | ············} |
503 | ············backStackRecord3.runOnCommitRunnables(); | 519 | ············backStackRecord2.runOnCommitRunnables(); |
504 | ········} | 520 | ········} |
505 | ········if·(n2·!=·0)·{ | 521 | ········if·(n2·!=·0)·{ |
506 | ············this.reportBackStackChanged(); | 522 | ············this.reportBackStackChanged(); |
507 | ········} | 523 | ········} |
508 | ····} | 524 | ····} |
509 | ···· | 525 | ···· |
510 | ····private·void·executePostponedTransaction(final·ArrayList·list,·final·ArrayList·list2)·{ | 526 | ····private·void·executePostponedTransaction(final·ArrayList·list,·final·ArrayList·list2)·{ |
Offset 795, 19 lines modified | Offset 811, 19 lines modified |
795 | ····void·addBackStackState(final·BackStackRecord·e)·{ | 811 | ····void·addBackStackState(final·BackStackRecord·e)·{ |
796 | ········if·(this.mBackStack·==·null)·{ | 812 | ········if·(this.mBackStack·==·null)·{ |
797 | ············this.mBackStack·=·new·ArrayList(); | 813 | ············this.mBackStack·=·new·ArrayList(); |
798 | ········} | 814 | ········} |
799 | ········this.mBackStack.add(e); | 815 | ········this.mBackStack.add(e); |
800 | ····} | 816 | ····} |
801 | ···· | 817 | ···· |
802 | ····void·addCancellationSignal(final·Fragment·fragment,·final·CancellationSignal·e)·{ | 818 | ····void·addCancellationSignal(final·Fragment·key,·final·CancellationSignal·e)·{ |
803 | ········if·(this.mExitAnimationCancellationSignals.get(fragment)·==·null)·{ | 819 | ········if·(this.mExitAnimationCancellationSignals.get(key)·==·null)·{ |
804 | ············this.mExitAnimationCancellationSignals.put(fragment,·new·HashSet()); | 820 | ············this.mExitAnimationCancellationSignals.put(key,·new·HashSet()); |
805 | ········} | 821 | ········} |
806 | ········((HashSet<CancellationSignal>)this.mExitAnimationCancellationSignals.get(fragment)).add(e); | 822 | ········((HashSet<CancellationSignal>)this.mExitAnimationCancellationSignals.get(key)).add(e); |
807 | ····} | 823 | ····} |
808 | ···· | 824 | ···· |
809 | ····void·addFragment(final·Fragment·obj)·{ | 825 | ····void·addFragment(final·Fragment·obj)·{ |
810 | ········if·(isLoggingEnabled(2))·{ | 826 | ········if·(isLoggingEnabled(2))·{ |
811 | ············final·StringBuilder·sb·=·new·StringBuilder(); | 827 | ············final·StringBuilder·sb·=·new·StringBuilder(); |
812 | ············sb.append("add:·"); | 828 | ············sb.append("add:·"); |
813 | ············sb.append(obj); | 829 | ············sb.append(obj); |
Offset 939, 16 lines modified | Offset 955, 16 lines modified |
939 | ············if·(menuAvailable)·{ | 955 | ············if·(menuAvailable)·{ |
940 | ················return·true; | 956 | ················return·true; |
941 | ············} | 957 | ············} |
942 | ········} | 958 | ········} |
943 | ········return·false; | 959 | ········return·false; |
944 | ····} | 960 | ····} |
945 | ···· | 961 | ···· |
946 | ····public·final·void·clearFragmentResult(final·String·s)·{ | 962 | ····public·final·void·clearFragmentResult(final·String·key)·{ |
947 | ········this.mResults.remove(s); | 963 | ········this.mResults.remove(key); |
948 | ····} | 964 | ····} |
949 | ···· | 965 | ···· |
950 | ····void·completeExecute(final·BackStackRecord·e,·final·boolean·b,·final·boolean·b2,·final·boolean·b3)·{ | 966 | ····void·completeExecute(final·BackStackRecord·e,·final·boolean·b,·final·boolean·b2,·final·boolean·b3)·{ |
951 | ········if·(b)·{ | 967 | ········if·(b)·{ |
952 | ············e.executePopOps(b3); | 968 | ············e.executePopOps(b3); |
953 | ········} | 969 | ········} |
954 | ········else·{ | 970 | ········else·{ |
Offset 1608, 39 lines modified | Offset 1624, 39 lines modified |
1608 | ········n·=·Math.min(n,·fragmentStateManager.computeExpectedState()); | 1624 | ········n·=·Math.min(n,·fragmentStateManager.computeExpectedState()); |
1609 | ········final·int·mState·=·fragment.mState; | 1625 | ········final·int·mState·=·fragment.mState; |
1610 | ········final·String·s·=·"FragmentManager"; | 1626 | ········final·String·s·=·"FragmentManager"; |
1611 | ········final·int·n2·=·3; | 1627 | ········final·int·n2·=·3; |
1612 | ········final·int·n3·=·-1; | 1628 | ········final·int·n3·=·-1; |
1613 | ········final·int·n4·=·5; | 1629 | ········final·int·n4·=·5; |
1614 | ········final·int·n5·=·4; | 1630 | ········final·int·n5·=·4; |
1615 | ········Label_0756:·{ | 1631 | ········Label_0750:·{ |
1616 | ············if·(mState·<=·n)·{ | 1632 | ············if·(mState·<=·n)·{ |
1617 | ················if·(mState·<·n·&&·!this.mExitAnimationCancellationSignals.isEmpty())·{ | 1633 | ················if·(mState·<·n·&&·!this.mExitAnimationCancellationSignals.isEmpty())·{ |
1618 | ····················this.cancelExitAnimation(fragment); | 1634 | ····················this.cancelExitAnimation(fragment); |
1619 | ················} | 1635 | ················} |
1620 | ················final·int·mState2·=·fragment.mState; | 1636 | ················final·int·mState2·=·fragment.mState; |
1621 | ················Label_0286:·{ | 1637 | ················Label_0284:·{ |
1622 | ····················Label_0276:·{ | 1638 | ····················Label_0274:·{ |
1623 | ························Label_0266:·{ | 1639 | ························Label_0264:·{ |
1624 | ····························Label_0246:·{ | 1640 | ····························Label_0244:·{ |
1625 | ································if·(mState2·!=·n3)·{ | 1641 | ································if·(mState2·!=·n3)·{ |
1626 | ····································if·(mState2·!=·0)·{ | 1642 | ····································if·(mState2·!=·0)·{ |
1627 | ········································if·(mState2·==·fragmentManagerState)·{ | 1643 | ········································if·(mState2·==·fragmentManagerState)·{ |
1628 | ············································break·Label_0246; | 1644 | ············································break·Label_0244; |
1629 | ········································} | 1645 | ········································} |
1630 | ········································if·(mState2·==·b)·{ | 1646 | ········································if·(mState2·==·b)·{ |
1631 | ············································break·Label_0266; | 1647 | ············································break·Label_0264; |
1632 | ········································} | 1648 | ········································} |
1633 | ········································if·(mState2·==·n5)·{ | 1649 | ········································if·(mState2·==·n5)·{ |
1634 | ············································break·Label_0276; | 1650 | ············································break·Label_0274; |
1635 | ········································} | 1651 | ········································} |
1636 | ········································if·(mState2·!=·n4)·{ | 1652 | ········································if·(mState2·!=·n4)·{ |
1637 | ············································break·Label_0756; | 1653 | ············································break·Label_0750; |
1638 | ········································} | 1654 | ········································} |
1639 | ········································break·Label_0286; | 1655 | ········································break·Label_0284; |
1640 | ····································} | 1656 | ····································} |
1641 | ································} | 1657 | ································} |
1642 | ································else·if·(n·>·n3)·{ | 1658 | ································else·if·(n·>·n3)·{ |
1643 | ····································fragmentStateManager.attach(); | 1659 | ····································fragmentStateManager.attach(); |
1644 | ································} | 1660 | ································} |
1645 | ································if·(n·>·0)·{ | 1661 | ································if·(n·>·0)·{ |
1646 | ····································fragmentStateManager.create(); | 1662 | ····································fragmentStateManager.create(); |
Offset 1662, 23 lines modified | Offset 1678, 23 lines modified |
1662 | ····················} | 1678 | ····················} |
1663 | ················} | 1679 | ················} |
1664 | ················if·(n·>·n4)·{ | 1680 | ················if·(n·>·n4)·{ |
1665 | ····················fragmentStateManager.resume(); | 1681 | ····················fragmentStateManager.resume(); |
1666 | ················} | 1682 | ················} |
1667 | ············} | 1683 | ············} |
1668 | ············else·if·(mState·>·n)·{ | 1684 | ············else·if·(mState·>·n)·{ |
1669 | ················Label_0744:·{ | 1685 | ················Label_0738:·{ |
1670 | ····················if·(mState·!=·0)·{ | 1686 | ····················if·(mState·!=·0)·{ |
1671 | ························if·(mState·!=·fragmentManagerState)·{ | 1687 | ························if·(mState·!=·fragmentManagerState)·{ |
1672 | ····························if·(mState·!=·b)·{ | 1688 | ····························if·(mState·!=·b)·{ |
1673 | ································if·(mState·!=·n5)·{ | 1689 | ································if·(mState·!=·n5)·{ |
1674 | ····································if·(mState·!=·n4)·{ | 1690 | ····································if·(mState·!=·n4)·{ |
1675 | ········································final·int·n6·=·7; | 1691 | ········································final·int·n6·=·7; |
1676 | ········································if·(mState·!=·n6)·{ | 1692 | ········································if·(mState·!=·n6)·{ |
1677 | ············································break·Label_0756; | 1693 | ············································break·Label_0750; |
1678 | ········································} | 1694 | ········································} |
1679 | ········································if·(n·<·n6)·{ | 1695 | ········································if·(n·<·n6)·{ |
1680 | ············································fragmentStateManager.pause(); | 1696 | ············································fragmentStateManager.pause(); |
1681 | ········································} | 1697 | ········································} |
1682 | ····································} | 1698 | ····································} |
1683 | ····································if·(n·<·n4)·{ | 1699 | ····································if·(n·<·n4)·{ |
1684 | ········································fragmentStateManager.stop(); | 1700 | ········································fragmentStateManager.stop(); |
Offset 1724, 15 lines modified | Offset 1740, 15 lines modified |
1724 | ································if·(this.mExitAnimationCancellationSignals.get(fragment)·==·null)·{ | 1740 | ································if·(this.mExitAnimationCancellationSignals.get(fragment)·==·null)·{ |
1725 | ····································fragmentStateManager.destroyFragmentView(); | 1741 | ····································fragmentStateManager.destroyFragmentView(); |
1726 | ································} | 1742 | ································} |
1727 | ····························} | 1743 | ····························} |
1728 | ························} | 1744 | ························} |
1729 | ························if·(n·<·fragmentManagerState)·{ | 1745 | ························if·(n·<·fragmentManagerState)·{ |
1730 | ····························if·(this.mExitAnimationCancellationSignals.get(fragment)·!=·null)·{ | 1746 | ····························if·(this.mExitAnimationCancellationSignals.get(fragment)·!=·null)·{ |
1731 | ································break·Label_0744; | 1747 | ································break·Label_0738; |
1732 | ····························} | 1748 | ····························} |
1733 | ····························fragmentStateManager.destroy(); | 1749 | ····························fragmentStateManager.destroy(); |
1734 | ························} | 1750 | ························} |
1735 | ····················} | 1751 | ····················} |
1736 | ····················fragmentManagerState·=·n; | 1752 | ····················fragmentManagerState·=·n; |
1737 | ················} | 1753 | ················} |
1738 | ················if·(fragmentManagerState·<·0)·{ | 1754 | ················if·(fragmentManagerState·<·0)·{ |