Merge "Fix the NPE in the AnimationController"

This commit is contained in:
TreeHugger Robot
2019-11-08 05:46:37 +00:00
committed by Android (Google) Code Review

View File

@@ -123,8 +123,10 @@ public class VideoPreference extends Preference {
layout.setLayoutParams(new LinearLayout.LayoutParams( layout.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, mHeight)); LinearLayout.LayoutParams.MATCH_PARENT, mHeight));
} }
if (mAnimationController != null) {
mAnimationController.attachView(mVideo, mPreviewImage, mPlayButton); mAnimationController.attachView(mVideo, mPreviewImage, mPlayButton);
} }
}
@Override @Override
public void onDetached() { public void onDetached() {