void a(int paramInt) { if (!this.o) ; while (true) { return; if (FragmentManagerImpl.DEBUG) Log.v("BackStackEntry", "Bump nesting in " + this + " by " + paramInt); for (BackStackRecord.Op localOp = this.f; localOp != null; localOp = localOp.v) { if (localOp.B != null) { Fragment localFragment2 = localOp.B; localFragment2.mBackStackNesting = (paramInt + localFragment2.mBackStackNesting); if (FragmentManagerImpl.DEBUG) Log.v( "BackStackEntry", "Bump nesting of " + localOp.B + " to " + localOp.B.mBackStackNesting); } if (localOp.G != null) for (int i1 = -1 + localOp.G.size(); i1 >= 0; i1--) { Fragment localFragment1 = (Fragment) localOp.G.get(i1); localFragment1.mBackStackNesting = (paramInt + localFragment1.mBackStackNesting); if (FragmentManagerImpl.DEBUG) Log.v( "BackStackEntry", "Bump nesting of " + localFragment1 + " to " + localFragment1.mBackStackNesting); } } } }
void bumpBackStackNesting(int i) { if (mAddToBackStack) { if (FragmentManagerImpl.DEBUG) Log.v( "FragmentManager", (new StringBuilder()) .append("Bump nesting in ") .append(this) .append(" by ") .append(i) .toString()); for (Op op = mHead; op != null; op = op.next) { if (op.fragment != null) { Fragment fragment1 = op.fragment; fragment1.mBackStackNesting = i + fragment1.mBackStackNesting; if (FragmentManagerImpl.DEBUG) Log.v( "FragmentManager", (new StringBuilder()) .append("Bump nesting of ") .append(op.fragment) .append(" to ") .append(op.fragment.mBackStackNesting) .toString()); } if (op.removed == null) continue; for (int j = -1 + op.removed.size(); j >= 0; j--) { Fragment fragment = (Fragment) op.removed.get(j); fragment.mBackStackNesting = i + fragment.mBackStackNesting; if (FragmentManagerImpl.DEBUG) Log.v( "FragmentManager", (new StringBuilder()) .append("Bump nesting of ") .append(fragment) .append(" to ") .append(fragment.mBackStackNesting) .toString()); } } } }
public void run() { label0: { if (FragmentManagerImpl.DEBUG) Log.v("FragmentManager", (new StringBuilder()).append("Run: ").append(this).toString()); if (mAddToBackStack && mIndex < 0) throw new IllegalStateException("addToBackStack() called after commit()"); bumpBackStackNesting(1); Op op = mHead; label1: do { if (op == null) break label0; switch (op.cmd) { default: break label1; case 7: // '\007' Fragment fragment7 = op.fragment; fragment7.mNextAnim = op.enterAnim; mManager.attachFragment(fragment7, mTransition, mTransitionStyle); break; case 6: // '\006' Fragment fragment6 = op.fragment; fragment6.mNextAnim = op.exitAnim; mManager.detachFragment(fragment6, mTransition, mTransitionStyle); break; case 5: // '\005' Fragment fragment5 = op.fragment; fragment5.mNextAnim = op.enterAnim; mManager.showFragment(fragment5, mTransition, mTransitionStyle); break; case 4: // '\004' Fragment fragment4 = op.fragment; fragment4.mNextAnim = op.exitAnim; mManager.hideFragment(fragment4, mTransition, mTransitionStyle); break; case 3: // '\003' Fragment fragment3 = op.fragment; fragment3.mNextAnim = op.exitAnim; mManager.removeFragment(fragment3, mTransition, mTransitionStyle); break; case 2: // '\002' Fragment fragment1 = op.fragment; if (mManager.mAdded != null) { for (int i = 0; i < mManager.mAdded.size(); i++) { Fragment fragment2 = (Fragment) mManager.mAdded.get(i); if (FragmentManagerImpl.DEBUG) Log.v( "FragmentManager", (new StringBuilder()) .append("OP_REPLACE: adding=") .append(fragment1) .append(" old=") .append(fragment2) .toString()); if (fragment1 != null && fragment2.mContainerId != fragment1.mContainerId) continue; if (fragment2 == fragment1) { fragment1 = null; op.fragment = null; continue; } if (op.removed == null) op.removed = new ArrayList(); op.removed.add(fragment2); fragment2.mNextAnim = op.exitAnim; if (mAddToBackStack) { fragment2.mBackStackNesting = 1 + fragment2.mBackStackNesting; if (FragmentManagerImpl.DEBUG) Log.v( "FragmentManager", (new StringBuilder()) .append("Bump nesting of ") .append(fragment2) .append(" to ") .append(fragment2.mBackStackNesting) .toString()); } mManager.removeFragment(fragment2, mTransition, mTransitionStyle); } } if (fragment1 != null) { fragment1.mNextAnim = op.enterAnim; mManager.addFragment(fragment1, false); } break; case 1: // '\001' Fragment fragment = op.fragment; fragment.mNextAnim = op.enterAnim; mManager.addFragment(fragment, false); break; } op = op.next; } while (true); throw new IllegalArgumentException( (new StringBuilder()).append("Unknown cmd: ").append(op.cmd).toString()); } mManager.moveToState(mManager.mCurState, mTransition, mTransitionStyle, true); if (mAddToBackStack) mManager.addBackStackState(this); }
public void run() { if (FragmentManagerImpl.DEBUG) Log.v("BackStackEntry", "Run: " + this); if ((this.o) && (this.mIndex < 0)) throw new IllegalStateException("addToBackStack() called after commit()"); a(1); BackStackRecord.Op localOp = this.f; if (localOp != null) { switch (localOp.A) { default: throw new IllegalArgumentException("Unknown cmd: " + localOp.A); case 1: Fragment localFragment9 = localOp.B; localFragment9.mNextAnim = localOp.C; this.e.a(localFragment9, false); case 2: case 3: case 4: case 5: case 6: case 7: } while (true) { localOp = localOp.v; break; Fragment localFragment6 = localOp.B; Fragment localFragment7; if (this.e.ae != null) { int i1 = 0; localFragment7 = localFragment6; if (i1 < this.e.ae.size()) { Fragment localFragment8 = (Fragment) this.e.ae.get(i1); if (FragmentManagerImpl.DEBUG) Log.v( "BackStackEntry", "OP_REPLACE: adding=" + localFragment7 + " old=" + localFragment8); if ((localFragment7 == null) || (localFragment8.mContainerId == localFragment7.mContainerId)) { if (localFragment8 != localFragment7) break label317; localFragment7 = null; localOp.B = null; } while (true) { i1++; break; label317: if (localOp.G == null) localOp.G = new ArrayList(); localOp.G.add(localFragment8); localFragment8.mNextAnim = localOp.D; if (this.o) { localFragment8.mBackStackNesting = (1 + localFragment8.mBackStackNesting); if (FragmentManagerImpl.DEBUG) Log.v( "BackStackEntry", "Bump nesting of " + localFragment8 + " to " + localFragment8.mBackStackNesting); } this.e.a(localFragment8, this.m, this.n); } } } else { localFragment7 = localFragment6; } if (localFragment7 != null) { localFragment7.mNextAnim = localOp.C; this.e.a(localFragment7, false); continue; Fragment localFragment5 = localOp.B; localFragment5.mNextAnim = localOp.D; this.e.a(localFragment5, this.m, this.n); continue; Fragment localFragment4 = localOp.B; localFragment4.mNextAnim = localOp.D; this.e.b(localFragment4, this.m, this.n); continue; Fragment localFragment3 = localOp.B; localFragment3.mNextAnim = localOp.C; this.e.c(localFragment3, this.m, this.n); continue; Fragment localFragment2 = localOp.B; localFragment2.mNextAnim = localOp.D; this.e.d(localFragment2, this.m, this.n); continue; Fragment localFragment1 = localOp.B; localFragment1.mNextAnim = localOp.C; this.e.e(localFragment1, this.m, this.n); } } } this.e.a(this.e.al, this.m, this.n, true); if (this.o) this.e.b(this); }