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

Commit 0a90597a authored by George Mount's avatar George Mount Committed by Android Git Automerger
Browse files

am 5506d92e: Fix NPE when detached View is added as a shared element.

* commit '5506d92e98f69c81ec2f5bbf82726e3333cf7e85':
  Fix NPE when detached View is added as a shared element.
parents 7e21053d c9a52272
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -222,8 +222,15 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
        if (mListener != null) {
            mListener.onMapSharedElements(mAllSharedElementNames, sharedElements);
        }
        mSharedElementNames.addAll(sharedElements.keySet());
        mSharedElements.addAll(sharedElements.values());
        int numSharedElements = sharedElements.size();
        for (int i = 0; i < numSharedElements; i++) {
            View sharedElement = sharedElements.valueAt(i);
            String name = sharedElements.keyAt(i);
            if (sharedElement != null && sharedElement.isAttachedToWindow() && name != null) {
                mSharedElements.add(sharedElement);
                mSharedElementNames.add(name);
            }
        }
        if (getViewsTransition() != null && mTransitioningViews != null) {
            ViewGroup decorView = getDecor();
            if (decorView != null) {