Avoid calling proxy.playbackEnded() again in onCustomViewHidden().
It is now always called via the MediaPlayer.onCompletion() callback.

Fix b: 2533272

Change-Id: If86cf6b2ab355ddcd976cd6a2ad92ce071a1af33
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 42e1539..eee8025 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -129,9 +129,10 @@
                     // is invoked.
                     mTimer.cancel();
                     mTimer = null;
-                    mCurrentProxy.playbackEnded();
+                    if (mVideoView.isPlaying()) {
+                        mVideoView.stopPlayback();
+                    }
                     mCurrentProxy = null;
-                    mVideoView.stopPlayback();
                     mLayout.removeView(mVideoView);
                     mVideoView = null;
                     if (mProgressView != null) {