{ l2 = Math.max(l2, l3); ViewCompat.postOnAnimationDelayed(get0itemView, (Runnable)localObject2, l1 + l2); return; ((Runnable)localObject2).run(); break label211; ((Runnable)localObject2).run(); break label291; break; l1 = 0L; break label366; l2 = 0L; break label376; }
{ if (k != 0) { localObject1 = new ArrayList(); ((ArrayList)localObject1).addAll(mPendingChanges); mChangesList.add(localObject1); mPendingChanges.clear(); localObject2 = new DefaultItemAnimator.2(this, (ArrayList)localObject1); if (i == 0) { break label428; } ViewCompat.postOnAnimationDelayed(get0oldHolder.itemView, (Runnable)localObject2, getRemoveDuration()); } if (m == 0) { break label436; } localObject1 = new ArrayList(); ((ArrayList)localObject1).addAll(mPendingAdditions); mAdditionsList.add(localObject1); mPendingAdditions.clear(); localObject2 = new DefaultItemAnimator.3(this, (ArrayList)localObject1); if ((i == 0) && (j == 0) && (k == 0)) { break label456; } if (i == 0) { break label438; } l1 = getRemoveDuration(); if (j == 0) { break label444; } l2 = getMoveDuration(); label376: if (k == 0) { break label450; } }
@Override public void runPendingAnimations() { boolean removalsPending = !mPendingRemovals.isEmpty(); boolean movesPending = !mPendingMoves.isEmpty(); boolean changesPending = !mPendingChanges.isEmpty(); boolean additionsPending = !mPendingAdditions.isEmpty(); if (!removalsPending && !movesPending && !additionsPending && !changesPending) { // nothing to animate return; } // First, remove stuff for (ViewHolder holder : mPendingRemovals) { animateRemoveImpl(holder); } mPendingRemovals.clear(); // Next, move stuff if (movesPending) { final ArrayList<MoveInfo> moves = new ArrayList<MoveInfo>(); moves.addAll(mPendingMoves); mMovesList.add(moves); mPendingMoves.clear(); Runnable mover = new Runnable() { @Override public void run() { for (MoveInfo moveInfo : moves) { animateMoveImpl( moveInfo.holder, moveInfo.fromX, moveInfo.fromY, moveInfo.toX, moveInfo.toY); } moves.clear(); mMovesList.remove(moves); } }; if (removalsPending) { View view = moves.get(0).holder.itemView; ViewCompat.postOnAnimationDelayed(view, mover, getRemoveDuration()); } else { mover.run(); } } // Next, change stuff, to run in parallel with move animations if (changesPending) { final ArrayList<ChangeInfo> changes = new ArrayList<ChangeInfo>(); changes.addAll(mPendingChanges); mChangesList.add(changes); mPendingChanges.clear(); Runnable changer = new Runnable() { @Override public void run() { for (ChangeInfo change : changes) { animateChangeImpl(change); } changes.clear(); mChangesList.remove(changes); } }; if (removalsPending) { ViewHolder holder = changes.get(0).oldHolder; ViewCompat.postOnAnimationDelayed(holder.itemView, changer, getRemoveDuration()); } else { changer.run(); } } // Next, add stuff if (additionsPending) { final ArrayList<ViewHolder> additions = new ArrayList<ViewHolder>(); additions.addAll(mPendingAdditions); mAdditionsList.add(additions); mPendingAdditions.clear(); Runnable adder = new Runnable() { public void run() { for (ViewHolder holder : additions) { animateAddImpl(holder); } additions.clear(); mAdditionsList.remove(additions); } }; if (removalsPending || movesPending || changesPending) { long removeDuration = removalsPending ? getRemoveDuration() : 0; long moveDuration = movesPending ? getMoveDuration() : 0; long changeDuration = changesPending ? getChangeDuration() : 0; long totalDelay = removeDuration + Math.max(moveDuration, changeDuration); View view = additions.get(0).itemView; ViewCompat.postOnAnimationDelayed(view, adder, totalDelay); } else { adder.run(); } } }
public void runPendingAnimations() { int i; int j; label24: int k; if (!mPendingRemovals.isEmpty()) { i = 1; if (mPendingMoves.isEmpty()) { break label72; } j = 1; if (mPendingChanges.isEmpty()) { break label77; } k = 1; label36: if (mPendingAdditions.isEmpty()) { break label82; } } label72: label77: label82: for (int m = 1;; m = 0) { if ((i != 0) || (j != 0) || (m != 0) || (k != 0)) { break label88; } return; i = 0; break; j = 0; break label24; k = 0; break label36; } label88: Object localObject1 = mPendingRemovals.iterator(); while (((Iterator)localObject1).hasNext()) { animateRemoveImpl((RecyclerView.ViewHolder)((Iterator)localObject1).next()); } mPendingRemovals.clear(); Object localObject2; label211: label291: long l1; label366: long l2; if (j != 0) { localObject1 = new ArrayList(); ((ArrayList)localObject1).addAll(mPendingMoves); mMovesList.add(localObject1); mPendingMoves.clear(); localObject2 = new DefaultItemAnimator.1(this, (ArrayList)localObject1); if (i != 0) { ViewCompat.postOnAnimationDelayed(get0holder.itemView, (Runnable)localObject2, getRemoveDuration()); } } else