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) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// Overlay the caption on the content.
|
||||
overlayWithDecorCaption(true);
|
||||
setOverlayWithDecorCaptionEnabled(true);
|
||||
setContentView(R.layout.caption_overlay_layout);
|
||||
getWindow().setRestrictedCaptionAreaListener(this);
|
||||
getWindow().setResizingCaptionDrawable(new ColorDrawable(Color.BLACK));
|
||||
|
||||
@@ -31,9 +31,9 @@ public class PlaybackOverlayActivity extends Activity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||
for (PictureInPictureListener listener : mListeners) {
|
||||
listener.onPictureInPictureChanged(inPictureInPicture);
|
||||
listener.onPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,6 @@ public class PlaybackOverlayActivity extends Activity {
|
||||
}
|
||||
|
||||
public interface PictureInPictureListener {
|
||||
void onPictureInPictureChanged(boolean inPictureInPicture);
|
||||
void onPictureInPictureModeChanged(boolean isInPictureInPictureMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class PlaybackOverlayFragment
|
||||
@Override
|
||||
public void onActionClicked(Action action) {
|
||||
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
||||
getActivity().enterPictureInPicture();
|
||||
getActivity().enterPictureInPictureMode();
|
||||
return;
|
||||
}
|
||||
super.onActionClicked(action);
|
||||
@@ -182,8 +182,8 @@ public class PlaybackOverlayFragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
||||
if (inPictureInPicture) {
|
||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||
if (isInPictureInPictureMode) {
|
||||
// Hide the controls in picture-in-picture mode.
|
||||
setFadingEnabled(true);
|
||||
fadeOut();
|
||||
|
||||
@@ -33,9 +33,9 @@ public class PlaybackOverlaySupportActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||
for (PictureInPictureListener listener : mListeners) {
|
||||
listener.onPictureInPictureChanged(inPictureInPicture);
|
||||
listener.onPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ public class PlaybackOverlaySupportActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
public interface PictureInPictureListener {
|
||||
void onPictureInPictureChanged(boolean inPictureInPicture);
|
||||
void onPictureInPictureModeChanged(boolean isInPictureInPicture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class PlaybackOverlaySupportFragment
|
||||
@Override
|
||||
public void onActionClicked(Action action) {
|
||||
if (action.getId() == R.id.lb_control_picture_in_picture) {
|
||||
getActivity().enterPictureInPicture();
|
||||
getActivity().enterPictureInPictureMode();
|
||||
return;
|
||||
}
|
||||
super.onActionClicked(action);
|
||||
@@ -184,8 +184,8 @@ public class PlaybackOverlaySupportFragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPictureInPictureChanged(boolean inPictureInPicture) {
|
||||
if (inPictureInPicture) {
|
||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||
if (isInPictureInPictureMode) {
|
||||
// Hide the controls in picture-in-picture mode.
|
||||
setFadingEnabled(true);
|
||||
fadeOut();
|
||||
|
||||
Reference in New Issue
Block a user