Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 511452cf authored by George Mount's avatar George Mount Committed by Android Git Automerger
Browse files

am b71580c3: Merge "Fix NPE when rejected snapshots are null." into lmp-mr1-dev

* commit 'b71580c3':
  Fix NPE when rejected snapshots are null.
parents 56f77a6f b71580c3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
        if (mListener != null) {
            mListener.onRejectSharedElements(rejectedSnapshots);
        }
        removeNullViews(rejectedSnapshots);
        startRejectedAnimations(rejectedSnapshots);

        // Now start shared element transition
@@ -370,6 +371,16 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
        }
    }

    private static void removeNullViews(ArrayList<View> views) {
        if (views != null) {
            for (int i = views.size() - 1; i >= 0; i--) {
                if (views.get(i) == null) {
                    views.remove(i);
                }
            }
        }
    }

    private void onTakeSharedElements() {
        if (!mIsReadyForTransition || mSharedElementsBundle == null) {
            return;