blob: 7f0c086ff8e9bf622ddd3bd252257eff9f662c79 [file] [log] [blame]
Sungsoo Lime3259042018-01-16 09:25:28 +09001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.widget;
18
19import android.annotation.IntDef;
20import android.annotation.NonNull;
21import android.annotation.Nullable;
22import android.content.Context;
Sungsoo Lime3259042018-01-16 09:25:28 +090023import android.media.AudioAttributes;
Insun Kangde16c4d2018-01-17 23:06:18 +090024import android.media.AudioManager;
Sungsoo Limaf2a1ad2018-01-24 11:36:10 +090025import android.media.MediaPlayerBase;
Sungsoo Lim82af5452018-01-25 15:02:12 +090026import android.media.session.MediaController;
Sungsoo Lime3259042018-01-16 09:25:28 +090027import android.media.update.ApiLoader;
28import android.media.update.VideoView2Provider;
29import android.media.update.ViewProvider;
30import android.net.Uri;
31import android.util.AttributeSet;
32import android.view.KeyEvent;
33import android.view.MotionEvent;
34
35import java.lang.annotation.Retention;
36import java.lang.annotation.RetentionPolicy;
Sungsoo Limaf2a1ad2018-01-24 11:36:10 +090037import java.util.List;
Sungsoo Lime3259042018-01-16 09:25:28 +090038import java.util.Map;
39
Insun Kangeb78d512018-01-22 18:04:07 +090040// TODO: Use @link tag to refer MediaPlayer2 in docs once MediaPlayer2.java is submitted. Same to
41// MediaSession2.
42// TODO: change the reference from MediaPlayer to MediaPlayer2.
Sungsoo Lime3259042018-01-16 09:25:28 +090043/**
Insun Kangeb78d512018-01-22 18:04:07 +090044 * Displays a video file. VideoView2 class is a View class which is wrapping MediaPlayer2 so that
45 * developers can easily implement a video rendering application.
46 *
47 * <p>
48 * <em> Data sources that VideoView2 supports : </em>
49 * VideoView2 can play video files and audio-only fiels as
50 * well. It can load from various sources such as resources or content providers. The supported
51 * media file formats are the same as MediaPlayer2.
52 *
53 * <p>
54 * <em> View type can be selected : </em>
55 * VideoView2 can render videos on top of TextureView as well as
56 * SurfaceView selectively. The default is SurfaceView and it can be changed using
57 * {@link #setViewType(int)} method. Using SurfaceView is recommended in most cases for saving
58 * battery. TextureView might be preferred for supporting various UIs such as animation and
59 * translucency.
60 *
61 * <p>
62 * <em> Differences between {@link VideoView} class : </em>
63 * VideoView2 covers and inherits the most of
64 * VideoView's functionalities. The main differences are
65 * <ul>
66 * <li> VideoView2 inherits FrameLayout and renders videos using SurfaceView and TextureView
67 * selectively while VideoView inherits SurfaceView class.
68 * <li> VideoView2 is integrated with MediaControlView2 and a default MediaControlView2 instance is
69 * attached to VideoView2 by default. If a developer does not want to use the default
70 * MediaControlView2, needs to set enableControlView attribute to false. For instance,
71 * <pre>
72 * &lt;VideoView2
73 * android:id="@+id/video_view"
74 * xmlns:widget="http://schemas.android.com/apk/com.android.media.update"
75 * widget:enableControlView="false" /&gt;
76 * </pre>
77 * If a developer wants to attach a customed MediaControlView2, then set enableControlView attribute
78 * to false and assign the customed media control widget using {@link #setMediaControlView2}.
79 * <li> VideoView2 is integrated with MediaPlayer2 while VideoView is integrated with MediaPlayer.
Sungsoo Lim82af5452018-01-25 15:02:12 +090080 * <li> VideoView2 is integrated with MediaSession and so it responses with media key events.
81 * A VideoView2 keeps a MediaSession instance internally and connects it to a corresponding
Insun Kangeb78d512018-01-22 18:04:07 +090082 * MediaControlView2 instance.
83 * </p>
84 * </ul>
85 *
86 * <p>
87 * <em> Audio focus and audio attributes : </em>
88 * By default, VideoView2 requests audio focus with
89 * {@link AudioManager#AUDIOFOCUS_GAIN}. Use {@link #setAudioFocusRequest(int)} to change this
90 * behavior. The default {@link AudioAttributes} used during playback have a usage of
91 * {@link AudioAttributes#USAGE_MEDIA} and a content type of
92 * {@link AudioAttributes#CONTENT_TYPE_MOVIE}, use {@link #setAudioAttributes(AudioAttributes)} to
93 * modify them.
94 *
95 * <p>
96 * Note: VideoView2 does not retain its full state when going into the background. In particular, it
97 * does not restore the current play state, play position, selected tracks. Applications should save
98 * and restore these on their own in {@link android.app.Activity#onSaveInstanceState} and
99 * {@link android.app.Activity#onRestoreInstanceState}.
100 *
Sungsoo Lime3259042018-01-16 09:25:28 +0900101 * @hide
102 */
103public class VideoView2 extends FrameLayout {
Insun Kangeb78d512018-01-22 18:04:07 +0900104 /** @hide */
Sungsoo Lime3259042018-01-16 09:25:28 +0900105 @IntDef({
106 VIEW_TYPE_TEXTUREVIEW,
107 VIEW_TYPE_SURFACEVIEW
108 })
109 @Retention(RetentionPolicy.SOURCE)
110 public @interface ViewType {}
Insun Kangeb78d512018-01-22 18:04:07 +0900111
Sungsoo Lime3259042018-01-16 09:25:28 +0900112 public static final int VIEW_TYPE_SURFACEVIEW = 1;
113 public static final int VIEW_TYPE_TEXTUREVIEW = 2;
114
115 private final VideoView2Provider mProvider;
116
Sungsoo Lime3259042018-01-16 09:25:28 +0900117 public VideoView2(@NonNull Context context) {
118 this(context, null);
119 }
120
Sungsoo Lime3259042018-01-16 09:25:28 +0900121 public VideoView2(@NonNull Context context, @Nullable AttributeSet attrs) {
122 this(context, attrs, 0);
123 }
124
Sungsoo Lime3259042018-01-16 09:25:28 +0900125 public VideoView2(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
126 this(context, attrs, defStyleAttr, 0);
127 }
128
Sungsoo Lime3259042018-01-16 09:25:28 +0900129 public VideoView2(
130 @NonNull Context context, @Nullable AttributeSet attrs,
131 int defStyleAttr, int defStyleRes) {
132 super(context, attrs, defStyleAttr, defStyleRes);
133
Insun Kangde16c4d2018-01-17 23:06:18 +0900134 mProvider = ApiLoader.getProvider(context).createVideoView2(this, new SuperProvider(),
135 attrs, defStyleAttr, defStyleRes);
Sungsoo Lime3259042018-01-16 09:25:28 +0900136 }
137
138 /**
139 * @hide
140 */
141 public VideoView2Provider getProvider() {
142 return mProvider;
143 }
144
145 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900146 * Sets MediaControlView2 instance. It will replace the previously assigned MediaControlView2
147 * instance if any.
148 *
149 * @param mediaControlView a media control view2 instance.
Sungsoo Lime3259042018-01-16 09:25:28 +0900150 */
Insun Kangde16c4d2018-01-17 23:06:18 +0900151 public void setMediaControlView2(MediaControlView2 mediaControlView) {
152 mProvider.setMediaControlView2_impl(mediaControlView);
153 }
154
155 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900156 * Returns MediaControlView2 instance which is currently attached to VideoView2 by default or by
157 * {@link #setMediaControlView2} method.
Insun Kangde16c4d2018-01-17 23:06:18 +0900158 */
159 public MediaControlView2 getMediaControlView2() {
160 return mProvider.getMediaControlView2_impl();
161 }
162
Sungsoo Lime3259042018-01-16 09:25:28 +0900163
164 /**
Sungsoo Lim82af5452018-01-25 15:02:12 +0900165 * Returns MediaController instance which is connected with MediaSession that VideoView2 is
166 * using. This method should be called when VideoView2 is attached to window, or it throws
167 * IllegalStateException, since internal MediaSession instance is not available until
168 * this view is attached to window. Please check {@link android.view.View#isAttachedToWindow}
169 * before calling this method.
170 *
171 * @throws IllegalStateException if interal MediaSession is not created yet.
Sungsoo Lime3259042018-01-16 09:25:28 +0900172 */
Sungsoo Lim82af5452018-01-25 15:02:12 +0900173 public MediaController getMediaController() {
174 return mProvider.getMediaController_impl();
Sungsoo Lime3259042018-01-16 09:25:28 +0900175 }
176
177 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900178 * Returns the audio session ID.
Sungsoo Lime3259042018-01-16 09:25:28 +0900179 */
180 public int getAudioSessionId() {
181 return mProvider.getAudioSessionId_impl();
182 }
183
184 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900185 * Starts rendering closed caption or subtitles if there is any. The first subtitle track will
186 * be chosen by default if there multiple subtitle tracks exist.
Sungsoo Lime3259042018-01-16 09:25:28 +0900187 */
188 public void showSubtitle() {
189 mProvider.showSubtitle_impl();
190 }
191
192 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900193 * Stops showing closed captions or subtitles.
Sungsoo Lime3259042018-01-16 09:25:28 +0900194 */
195 public void hideSubtitle() {
196 mProvider.hideSubtitle_impl();
197 }
198
Hyundo Moonefeb45e2018-01-24 11:16:19 +0900199 /**
200 * Sets full screen mode.
201 */
202 public void setFullScreen(boolean fullScreen) {
203 mProvider.setFullScreen_impl(fullScreen);
204 }
205
Sungsoo Lime3259042018-01-16 09:25:28 +0900206 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900207 * Sets playback speed.
208 *
209 * It is expressed as a multiplicative factor, where normal speed is 1.0f. If it is less than
210 * or equal to zero, it will be just ignored and nothing will be changed. If it exceeds the
211 * maximum speed that internal engine supports, system will determine best handling or it will
212 * be reset to the normal speed 1.0f.
Insun Kangde16c4d2018-01-17 23:06:18 +0900213 * @param speed the playback speed. It should be positive.
Insun Kangde16c4d2018-01-17 23:06:18 +0900214 */
Sungsoo Lim82af5452018-01-25 15:02:12 +0900215 // TODO: Support this via MediaController2.
Insun Kangde16c4d2018-01-17 23:06:18 +0900216 public void setSpeed(float speed) {
217 mProvider.setSpeed_impl(speed);
218 }
219
220 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900221 * Sets which type of audio focus will be requested during the playback, or configures playback
222 * to not request audio focus. Valid values for focus requests are
223 * {@link AudioManager#AUDIOFOCUS_GAIN}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT},
224 * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK}, and
225 * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}. Or use
226 * {@link AudioManager#AUDIOFOCUS_NONE} to express that audio focus should not be
227 * requested when playback starts. You can for instance use this when playing a silent animation
228 * through this class, and you don't want to affect other audio applications playing in the
229 * background.
230 *
231 * @param focusGain the type of audio focus gain that will be requested, or
Sungsoo Limaf2a1ad2018-01-24 11:36:10 +0900232 * {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during
233 * playback.
Sungsoo Lime3259042018-01-16 09:25:28 +0900234 */
235 public void setAudioFocusRequest(int focusGain) {
236 mProvider.setAudioFocusRequest_impl(focusGain);
237 }
238
239 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900240 * Sets the {@link AudioAttributes} to be used during the playback of the video.
241 *
242 * @param attributes non-null <code>AudioAttributes</code>.
Sungsoo Lime3259042018-01-16 09:25:28 +0900243 */
244 public void setAudioAttributes(@NonNull AudioAttributes attributes) {
245 mProvider.setAudioAttributes_impl(attributes);
246 }
247
248 /**
Sungsoo Limaf2a1ad2018-01-24 11:36:10 +0900249 * Sets a remote player for handling playback of the selected route from MediaControlView2.
250 * If this is not called, MediaCotrolView2 will not show the route button.
251 *
252 * @param routeCategories the list of media control categories in
253 * {@link android.support.v7.media.MediaControlIntent}
254 * @param player the player to handle the selected route. If null, a default
255 * route player will be used.
256 * @throws IllegalStateException if MediaControlView2 is not set.
257 */
258 public void setRouteAttributes(@NonNull List<String> routeCategories,
259 @Nullable MediaPlayerBase player) {
260 mProvider.setRouteAttributes_impl(routeCategories, player);
261 }
262
263 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900264 * Sets video path.
265 *
266 * @param path the path of the video.
Sungsoo Lime3259042018-01-16 09:25:28 +0900267 */
268 public void setVideoPath(String path) {
269 mProvider.setVideoPath_impl(path);
270 }
271
272 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900273 * Sets video URI.
274 *
275 * @param uri the URI of the video.
Sungsoo Lime3259042018-01-16 09:25:28 +0900276 */
277 public void setVideoURI(Uri uri) {
278 mProvider.setVideoURI_impl(uri);
279 }
280
281 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900282 * Sets video URI using specific headers.
283 *
284 * @param uri the URI of the video.
285 * @param headers the headers for the URI request.
286 * Note that the cross domain redirection is allowed by default, but that can be
287 * changed with key/value pairs through the headers parameter with
288 * "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
289 * to disallow or allow cross domain redirection.
Sungsoo Lime3259042018-01-16 09:25:28 +0900290 */
291 public void setVideoURI(Uri uri, Map<String, String> headers) {
292 mProvider.setVideoURI_impl(uri, headers);
293 }
294
295 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900296 * Selects which view will be used to render video between SurfacView and TextureView.
297 *
298 * @param viewType the view type to render video
299 * <ul>
300 * <li>{@link #VIEW_TYPE_SURFACEVIEW}
301 * <li>{@link #VIEW_TYPE_TEXTUREVIEW}
302 * </ul>
Sungsoo Lime3259042018-01-16 09:25:28 +0900303 */
Sungsoo Lime3259042018-01-16 09:25:28 +0900304 public void setViewType(@ViewType int viewType) {
305 mProvider.setViewType_impl(viewType);
306 }
307
308 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900309 * Returns view type.
310 *
311 * @return view type. See {@see setViewType}.
Sungsoo Lime3259042018-01-16 09:25:28 +0900312 */
313 @ViewType
314 public int getViewType() {
315 return mProvider.getViewType_impl();
316 }
317
318 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900319 * Registers a callback to be invoked when the media file is loaded and ready to go.
320 *
321 * @param l the callback that will be run.
Sungsoo Lime3259042018-01-16 09:25:28 +0900322 */
Insun Kangde16c4d2018-01-17 23:06:18 +0900323 public void setOnPreparedListener(OnPreparedListener l) {
Sungsoo Lime3259042018-01-16 09:25:28 +0900324 mProvider.setOnPreparedListener_impl(l);
325 }
326
327 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900328 * Registers a callback to be invoked when the end of a media file has been reached during
329 * playback.
330 *
331 * @param l the callback that will be run.
Sungsoo Lime3259042018-01-16 09:25:28 +0900332 */
Insun Kangde16c4d2018-01-17 23:06:18 +0900333 public void setOnCompletionListener(OnCompletionListener l) {
Sungsoo Lime3259042018-01-16 09:25:28 +0900334 mProvider.setOnCompletionListener_impl(l);
335 }
336
337 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900338 * Registers a callback to be invoked when an error occurs during playback or setup. If no
339 * listener is specified, or if the listener returned false, VideoView2 will inform the user of
340 * any errors.
341 *
342 * @param l The callback that will be run
Sungsoo Lime3259042018-01-16 09:25:28 +0900343 */
Insun Kangde16c4d2018-01-17 23:06:18 +0900344 public void setOnErrorListener(OnErrorListener l) {
Sungsoo Lime3259042018-01-16 09:25:28 +0900345 mProvider.setOnErrorListener_impl(l);
346 }
347
348 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900349 * Registers a callback to be invoked when an informational event occurs during playback or
350 * setup.
351 *
352 * @param l The callback that will be run
Sungsoo Lime3259042018-01-16 09:25:28 +0900353 */
Insun Kangde16c4d2018-01-17 23:06:18 +0900354 public void setOnInfoListener(OnInfoListener l) {
Sungsoo Lime3259042018-01-16 09:25:28 +0900355 mProvider.setOnInfoListener_impl(l);
356 }
357
358 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900359 * Registers a callback to be invoked when a view type change is done.
360 * {@see #setViewType(int)}
361 * @param l The callback that will be run
Sungsoo Lime3259042018-01-16 09:25:28 +0900362 */
363 public void setOnViewTypeChangedListener(OnViewTypeChangedListener l) {
364 mProvider.setOnViewTypeChangedListener_impl(l);
365 }
366
367 /**
Hyundo Moonefeb45e2018-01-24 11:16:19 +0900368 * Registers a callback to be invoked when the fullscreen mode should be changed.
369 */
370 public void setFullScreenChangedListener(OnFullScreenChangedListener l) {
371 mProvider.setFullScreenChangedListener_impl(l);
372 }
373
374 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900375 * Interface definition of a callback to be invoked when the viw type has been changed.
Sungsoo Lime3259042018-01-16 09:25:28 +0900376 */
377 public interface OnViewTypeChangedListener {
378 /**
Insun Kangde16c4d2018-01-17 23:06:18 +0900379 * Called when the view type has been changed.
Insun Kangeb78d512018-01-22 18:04:07 +0900380 * @see #setViewType(int)
381 * @param viewType
382 * <ul>
383 * <li>{@link #VIEW_TYPE_SURFACEVIEW}
384 * <li>{@link #VIEW_TYPE_TEXTUREVIEW}
385 * </ul>
Sungsoo Lime3259042018-01-16 09:25:28 +0900386 */
387 void onViewTypeChanged(@ViewType int viewType);
388 }
389
Insun Kangde16c4d2018-01-17 23:06:18 +0900390 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900391 * Interface definition of a callback to be invoked when the media source is ready for playback.
Insun Kangde16c4d2018-01-17 23:06:18 +0900392 */
393 public interface OnPreparedListener {
394 /**
395 * Called when the media file is ready for playback.
396 */
397 void onPrepared();
398 }
399
400 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900401 * Interface definition for a callback to be invoked when playback of a media source has
402 * completed.
Insun Kangde16c4d2018-01-17 23:06:18 +0900403 */
404 public interface OnCompletionListener {
405 /**
406 * Called when the end of a media source is reached during playback.
407 */
408 void onCompletion();
409 }
410
411 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900412 * Interface definition of a callback to be invoked when there has been an error during an
413 * asynchronous operation.
Insun Kangde16c4d2018-01-17 23:06:18 +0900414 */
415 public interface OnErrorListener {
Insun Kangeb78d512018-01-22 18:04:07 +0900416 // TODO: Redefine error codes.
Insun Kangde16c4d2018-01-17 23:06:18 +0900417 /**
418 * Called to indicate an error.
Insun Kangeb78d512018-01-22 18:04:07 +0900419 * @param what the type of error that has occurred
420 * @param extra an extra code, specific to the error.
421 * @return true if the method handled the error, false if it didn't.
422 * @see MediaPlayer#OnErrorListener
Insun Kangde16c4d2018-01-17 23:06:18 +0900423 */
424 boolean onError(int what, int extra);
425 }
426
427 /**
Insun Kangeb78d512018-01-22 18:04:07 +0900428 * Interface definition of a callback to be invoked to communicate some info and/or warning
429 * about the media or its playback.
Insun Kangde16c4d2018-01-17 23:06:18 +0900430 */
431 public interface OnInfoListener {
432 /**
433 * Called to indicate an info or a warning.
Insun Kangde16c4d2018-01-17 23:06:18 +0900434 * @param what the type of info or warning.
435 * @param extra an extra code, specific to the info.
Insun Kangeb78d512018-01-22 18:04:07 +0900436 *
437 * @see MediaPlayer#OnInfoListener
Insun Kangde16c4d2018-01-17 23:06:18 +0900438 */
439 void onInfo(int what, int extra);
440 }
441
Hyundo Moonefeb45e2018-01-24 11:16:19 +0900442 /**
443 * Interface definition of a callback to be invoked to inform the fullscreen mode is changed.
444 */
445 public interface OnFullScreenChangedListener {
446 /**
447 * Called to indicate a fullscreen mode change.
448 */
449 void onFullScreenChanged(boolean fullScreen);
450 }
451
Sungsoo Lime3259042018-01-16 09:25:28 +0900452 @Override
Insun Kangfd3fdfd2018-01-23 15:01:37 +0900453 protected void onAttachedToWindow() {
454 mProvider.onAttachedToWindow_impl();
455 }
456
457 @Override
458 protected void onDetachedFromWindow() {
459 mProvider.onDetachedFromWindow_impl();
460 }
461
462 @Override
Sungsoo Lime3259042018-01-16 09:25:28 +0900463 public CharSequence getAccessibilityClassName() {
464 return mProvider.getAccessibilityClassName_impl();
465 }
466
467 @Override
468 public boolean onTouchEvent(MotionEvent ev) {
469 return mProvider.onTouchEvent_impl(ev);
470 }
471
472 @Override
473 public boolean onTrackballEvent(MotionEvent ev) {
474 return mProvider.onTrackballEvent_impl(ev);
475 }
476
477 @Override
478 public boolean onKeyDown(int keyCode, KeyEvent event) {
479 return mProvider.onKeyDown_impl(keyCode, event);
480 }
481
482 @Override
483 public void onFinishInflate() {
484 mProvider.onFinishInflate_impl();
485 }
486
487 @Override
488 public boolean dispatchKeyEvent(KeyEvent event) {
489 return mProvider.dispatchKeyEvent_impl(event);
490 }
491
492 @Override
493 public void setEnabled(boolean enabled) {
494 mProvider.setEnabled_impl(enabled);
495 }
496
497 private class SuperProvider implements ViewProvider {
498 @Override
Insun Kangfd3fdfd2018-01-23 15:01:37 +0900499 public void onAttachedToWindow_impl() {
500 VideoView2.super.onAttachedToWindow();
501 }
502
503 @Override
504 public void onDetachedFromWindow_impl() {
505 VideoView2.super.onDetachedFromWindow();
506 }
507
508 @Override
Sungsoo Lime3259042018-01-16 09:25:28 +0900509 public CharSequence getAccessibilityClassName_impl() {
510 return VideoView2.super.getAccessibilityClassName();
511 }
512
513 @Override
514 public boolean onTouchEvent_impl(MotionEvent ev) {
515 return VideoView2.super.onTouchEvent(ev);
516 }
517
518 @Override
519 public boolean onTrackballEvent_impl(MotionEvent ev) {
520 return VideoView2.super.onTrackballEvent(ev);
521 }
522
523 @Override
524 public boolean onKeyDown_impl(int keyCode, KeyEvent event) {
525 return VideoView2.super.onKeyDown(keyCode, event);
526 }
527
528 @Override
529 public void onFinishInflate_impl() {
530 VideoView2.super.onFinishInflate();
531 }
532
533 @Override
534 public boolean dispatchKeyEvent_impl(KeyEvent event) {
535 return VideoView2.super.dispatchKeyEvent(event);
536 }
537
538 @Override
539 public void setEnabled_impl(boolean enabled) {
540 VideoView2.super.setEnabled(enabled);
541 }
542 }
543}