Commit dfb87e21 by ibaker Committed by Ian Baker

Throw unsupported exception from deprecated MediaController methods

This is consistent with existing deprecated methods that have never been
supported on MediaController.

PiperOrigin-RevId: 407071712
parent 65c2bd98
......@@ -1181,8 +1181,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public boolean isCurrentWindowDynamic() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return isCurrentMediaItemDynamic();
throw new UnsupportedOperationException();
}
@Override
......@@ -1196,8 +1195,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public boolean isCurrentWindowLive() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return isCurrentMediaItemLive();
throw new UnsupportedOperationException();
}
@Override
......@@ -1211,8 +1209,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public boolean isCurrentWindowSeekable() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return isCurrentMediaItemSeekable();
throw new UnsupportedOperationException();
}
@Override
......@@ -1261,8 +1258,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public int getCurrentWindowIndex() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return getCurrentMediaItemIndex();
throw new UnsupportedOperationException();
}
@Override
......@@ -1275,8 +1271,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public int getPreviousWindowIndex() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return getPreviousMediaItemIndex();
throw new UnsupportedOperationException();
}
/**
......@@ -1296,8 +1291,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public int getNextWindowIndex() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return getNextMediaItemIndex();
throw new UnsupportedOperationException();
}
/**
......@@ -1331,16 +1325,14 @@ public class MediaController implements Player {
@Deprecated
@Override
public boolean hasPreviousWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return hasPreviousMediaItem();
throw new UnsupportedOperationException();
}
@UnstableApi
@Deprecated
@Override
public boolean hasNextWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
return hasNextMediaItem();
throw new UnsupportedOperationException();
}
@Override
......@@ -1373,8 +1365,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public void seekToPreviousWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
seekToPreviousMediaItem();
throw new UnsupportedOperationException();
}
/**
......@@ -1397,8 +1388,7 @@ public class MediaController implements Player {
@Deprecated
@Override
public void seekToNextWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
seekToNextMediaItem();
throw new UnsupportedOperationException();
}
/**
......
......@@ -892,15 +892,13 @@ public class MockPlayer implements Player {
@Deprecated
@Override
public void seekToPreviousWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
seekToPreviousMediaItem();
throw new UnsupportedOperationException();
}
@Deprecated
@Override
public void seekToNextWindow() {
// TODO(b/202157117): Throw UnsupportedOperationException when all callers are migrated.
seekToNextMediaItem();
throw new UnsupportedOperationException();
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment