Refactor usages of Picture In Picture and Multi Window (4/4)
Bug: 27365860 Change-Id: I488fbc9fc8035fa06e6a68c117a58cc35749cc7c
This commit is contained in:
@@ -40,7 +40,7 @@ public class CaptionOverlayActivity extends Activity
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
// Overlay the caption on the content.
|
// Overlay the caption on the content.
|
||||||
overlayWithDecorCaption(true);
|
setOverlayWithDecorCaptionEnabled(true);
|
||||||
setContentView(R.layout.caption_overlay_layout);
|
setContentView(R.layout.caption_overlay_layout);
|
||||||
getWindow().setRestrictedCaptionAreaListener(this);
|
getWindow().setRestrictedCaptionAreaListener(this);
|
||||||
getWindow().setResizingCaptionDrawable(new ColorDrawable(Color.BLACK));
|
getWindow().setResizingCaptionDrawable(new ColorDrawable(Color.BLACK));
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public class PlaybackOverlayActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
for (PictureInPictureListener listener : mListeners) {
|
for (PictureInPictureListener listener : mListeners) {
|
||||||
listener.onPictureInPictureChanged(inPictureInPicture);
|
listener.onPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +46,6 @@ public class PlaybackOverlayActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface PictureInPictureListener {
|
public interface PictureInPictureListener {
|
||||||
void onPictureInPictureChanged(boolean inPictureInPicture);
|
void onPictureInPictureModeChanged(boolean isInPictureInPictureMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class PlaybackOverlayFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onActionClicked(Action action) {
|
public void onActionClicked(Action action) {
|
||||||
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
||||||
getActivity().enterPictureInPicture();
|
getActivity().enterPictureInPictureMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.onActionClicked(action);
|
super.onActionClicked(action);
|
||||||
@@ -182,8 +182,8 @@ public class PlaybackOverlayFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
if (inPictureInPicture) {
|
if (isInPictureInPictureMode) {
|
||||||
// Hide the controls in picture-in-picture mode.
|
// Hide the controls in picture-in-picture mode.
|
||||||
setFadingEnabled(true);
|
setFadingEnabled(true);
|
||||||
fadeOut();
|
fadeOut();
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ public class PlaybackOverlaySupportActivity extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
for (PictureInPictureListener listener : mListeners) {
|
for (PictureInPictureListener listener : mListeners) {
|
||||||
listener.onPictureInPictureChanged(inPictureInPicture);
|
listener.onPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +48,6 @@ public class PlaybackOverlaySupportActivity extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface PictureInPictureListener {
|
public interface PictureInPictureListener {
|
||||||
void onPictureInPictureChanged(boolean inPictureInPicture);
|
void onPictureInPictureModeChanged(boolean isInPictureInPicture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public class PlaybackOverlaySupportFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onActionClicked(Action action) {
|
public void onActionClicked(Action action) {
|
||||||
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
||||||
getActivity().enterPictureInPicture();
|
getActivity().enterPictureInPictureMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.onActionClicked(action);
|
super.onActionClicked(action);
|
||||||
@@ -184,8 +184,8 @@ public class PlaybackOverlaySupportFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
if (inPictureInPicture) {
|
if (isInPictureInPictureMode) {
|
||||||
// Hide the controls in picture-in-picture mode.
|
// Hide the controls in picture-in-picture mode.
|
||||||
setFadingEnabled(true);
|
setFadingEnabled(true);
|
||||||
fadeOut();
|
fadeOut();
|
||||||
|
|||||||
Reference in New Issue
Block a user