Skip to content
Snippets Groups Projects
Commit 0945bb74 authored by Insun Kang's avatar Insun Kang Committed by Android (Google) Code Review
Browse files

Merge "Release MediaSession when VideoView2 is detached from window."

parents eb78d511 fd3fdfdf
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,15 @@ public class MediaControlView2 extends FrameLayout {
mProvider.hideSubtitle_impl();
}
@Override
protected void onAttachedToWindow() {
mProvider.onAttachedToWindow_impl();
}
@Override
protected void onDetachedFromWindow() {
mProvider.onDetachedFromWindow_impl();
}
@Override
public CharSequence getAccessibilityClassName() {
return mProvider.getAccessibilityClassName_impl();
......@@ -193,6 +202,16 @@ public class MediaControlView2 extends FrameLayout {
}
private class SuperProvider implements ViewProvider {
@Override
public void onAttachedToWindow_impl() {
MediaControlView2.super.onAttachedToWindow();
}
@Override
public void onDetachedFromWindow_impl() {
MediaControlView2.super.onDetachedFromWindow();
}
@Override
public CharSequence getAccessibilityClassName_impl() {
return MediaControlView2.super.getAccessibilityClassName();
......
......@@ -466,6 +466,16 @@ public class VideoView2 extends FrameLayout {
void onInfo(int what, int extra);
}
@Override
protected void onAttachedToWindow() {
mProvider.onAttachedToWindow_impl();
}
@Override
protected void onDetachedFromWindow() {
mProvider.onDetachedFromWindow_impl();
}
@Override
public CharSequence getAccessibilityClassName() {
return mProvider.getAccessibilityClassName_impl();
......@@ -502,6 +512,16 @@ public class VideoView2 extends FrameLayout {
}
private class SuperProvider implements ViewProvider {
@Override
public void onAttachedToWindow_impl() {
VideoView2.super.onAttachedToWindow();
}
@Override
public void onDetachedFromWindow_impl() {
VideoView2.super.onDetachedFromWindow();
}
@Override
public CharSequence getAccessibilityClassName_impl() {
return VideoView2.super.getAccessibilityClassName();
......
......@@ -37,6 +37,8 @@ import android.view.MotionEvent;
// TODO @SystemApi
public interface ViewProvider {
// TODO Add more (all?) methods from View
void onAttachedToWindow_impl();
void onDetachedFromWindow_impl();
CharSequence getAccessibilityClassName_impl();
boolean onTouchEvent_impl(MotionEvent ev);
boolean onTrackballEvent_impl(MotionEvent ev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment