Merge "Fix NPE when snapshot ImageView uses ScaleType.MATRIX." into lmp-mr1-dev
This commit is contained in:
@@ -638,6 +638,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
|
|||||||
if (decorView != null) {
|
if (decorView != null) {
|
||||||
decorView.getLocationOnScreen(decorLoc);
|
decorView.getLocationOnScreen(decorLoc);
|
||||||
}
|
}
|
||||||
|
Matrix tempMatrix = new Matrix();
|
||||||
for (String name: names) {
|
for (String name: names) {
|
||||||
Bundle sharedElementBundle = state.getBundle(name);
|
Bundle sharedElementBundle = state.getBundle(name);
|
||||||
if (sharedElementBundle != null) {
|
if (sharedElementBundle != null) {
|
||||||
@@ -647,7 +648,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
|
|||||||
snapshot = mListener.onCreateSnapshotView(context, parcelable);
|
snapshot = mListener.onCreateSnapshotView(context, parcelable);
|
||||||
}
|
}
|
||||||
if (snapshot != null) {
|
if (snapshot != null) {
|
||||||
setSharedElementState(snapshot, name, state, null, null, decorLoc);
|
setSharedElementState(snapshot, name, state, tempMatrix, null, decorLoc);
|
||||||
}
|
}
|
||||||
snapshots.add(snapshot);
|
snapshots.add(snapshot);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user