am 57928195: Merge "Fix NPE when snapshot ImageView uses ScaleType.MATRIX." into lmp-mr1-dev

* commit '57928195a89971e89273c4ef06397d78b0bd0233':
  Fix NPE when snapshot ImageView uses ScaleType.MATRIX.
This commit is contained in:
George Mount
2014-10-30 23:30:28 +00:00
committed by Android Git Automerger

View File

@@ -638,6 +638,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
if (decorView != null) {
decorView.getLocationOnScreen(decorLoc);
}
Matrix tempMatrix = new Matrix();
for (String name: names) {
Bundle sharedElementBundle = state.getBundle(name);
if (sharedElementBundle != null) {
@@ -647,7 +648,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
snapshot = mListener.onCreateSnapshotView(context, parcelable);
}
if (snapshot != null) {
setSharedElementState(snapshot, name, state, null, null, decorLoc);
setSharedElementState(snapshot, name, state, tempMatrix, null, decorLoc);
}
snapshots.add(snapshot);
}