Commit dc7fde1f by olly Committed by Ian Baker

Some more language fixes

Issue: #7565
PiperOrigin-RevId: 353613493
parent bfc73698
...@@ -2189,7 +2189,7 @@ public final class Util { ...@@ -2189,7 +2189,7 @@ public final class Util {
return getMobileNetworkType(networkInfo); return getMobileNetworkType(networkInfo);
case ConnectivityManager.TYPE_ETHERNET: case ConnectivityManager.TYPE_ETHERNET:
return C.NETWORK_TYPE_ETHERNET; return C.NETWORK_TYPE_ETHERNET;
default: // VPN, Bluetooth, Dummy. default:
return C.NETWORK_TYPE_OTHER; return C.NETWORK_TYPE_OTHER;
} }
} }
...@@ -2620,7 +2620,7 @@ public final class Util { ...@@ -2620,7 +2620,7 @@ public final class Util {
"hsn", "zh-hsn" "hsn", "zh-hsn"
}; };
// Legacy ("grandfathered") tags, replaced by modern equivalents (including macrolanguage) // Legacy tags that have been replaced by modern equivalents (including macrolanguage)
// See https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry. // See https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry.
private static final String[] isoLegacyTagReplacements = private static final String[] isoLegacyTagReplacements =
new String[] { new String[] {
......
...@@ -30,7 +30,7 @@ import java.nio.ByteBuffer; ...@@ -30,7 +30,7 @@ import java.nio.ByteBuffer;
/* package */ final class C2Mp3TimestampTracker { /* package */ final class C2Mp3TimestampTracker {
// Mirroring the actual codec, as can be found at // Mirroring the actual codec, as can be found at
// https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/codec2/components/mp3/C2SoftMp3Dec.h;l=55;drc=3665390c9d32a917398b240c5a46ced07a3b65eb // https://cs.android.com/android/platform/superproject/+/main:frameworks/av/media/codec2/components/mp3/C2SoftMp3Dec.h;l=55;drc=3665390c9d32a917398b240c5a46ced07a3b65eb
private static final long DECODER_DELAY_SAMPLES = 529; private static final long DECODER_DELAY_SAMPLES = 529;
private static final String TAG = "C2Mp3TimestampTracker"; private static final String TAG = "C2Mp3TimestampTracker";
...@@ -76,7 +76,7 @@ import java.nio.ByteBuffer; ...@@ -76,7 +76,7 @@ import java.nio.ByteBuffer;
} }
// These calculations mirror the timestamp calculations in the Codec2 Mp3 Decoder. // These calculations mirror the timestamp calculations in the Codec2 Mp3 Decoder.
// https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/codec2/components/mp3/C2SoftMp3Dec.cpp;l=464;drc=ed134640332fea70ca4b05694289d91a5265bb46 // https://cs.android.com/android/platform/superproject/+/main:frameworks/av/media/codec2/components/mp3/C2SoftMp3Dec.cpp;l=464;drc=ed134640332fea70ca4b05694289d91a5265bb46
if (processedSamples == 0) { if (processedSamples == 0) {
anchorTimestampUs = buffer.timeUs; anchorTimestampUs = buffer.timeUs;
processedSamples = frameCount - DECODER_DELAY_SAMPLES; processedSamples = frameCount - DECODER_DELAY_SAMPLES;
......
...@@ -178,10 +178,10 @@ public interface Cache { ...@@ -178,10 +178,10 @@ public interface Cache {
* @param key The cache key of the resource. * @param key The cache key of the resource.
* @param position The starting position in the resource from which data is required. * @param position The starting position in the resource from which data is required.
* @param length The length of the data being requested, or {@link C#LENGTH_UNSET} if unbounded. * @param length The length of the data being requested, or {@link C#LENGTH_UNSET} if unbounded.
* The length is ignored in the case of a cache hit. In the case of a cache miss, it defines * The length is ignored if there is a cache entry that overlaps the position. Else, it
* the maximum length of the hole {@link CacheSpan} that's returned. Cache implementations may * defines the maximum length of the hole {@link CacheSpan} that's returned. Cache
* support parallel writes into non-overlapping holes, and so passing the actual required * implementations may support parallel writes into non-overlapping holes, and so passing the
* length should be preferred to passing {@link C#LENGTH_UNSET} when possible. * actual required length should be preferred to passing {@link C#LENGTH_UNSET} when possible.
* @return The {@link CacheSpan}. * @return The {@link CacheSpan}.
* @throws InterruptedException If the thread was interrupted. * @throws InterruptedException If the thread was interrupted.
* @throws CacheException If an error is encountered. * @throws CacheException If an error is encountered.
...@@ -199,8 +199,8 @@ public interface Cache { ...@@ -199,8 +199,8 @@ public interface Cache {
* @param key The cache key of the resource. * @param key The cache key of the resource.
* @param position The starting position in the resource from which data is required. * @param position The starting position in the resource from which data is required.
* @param length The length of the data being requested, or {@link C#LENGTH_UNSET} if unbounded. * @param length The length of the data being requested, or {@link C#LENGTH_UNSET} if unbounded.
* The length is ignored in the case of a cache hit. In the case of a cache miss, it defines * The length is ignored if there is a cache entry that overlaps the position. Else, it
* the range of data locked by the returned {@link CacheSpan}. * defines the range of data locked by the returned {@link CacheSpan}.
* @return The {@link CacheSpan}. Or null if the cache entry is locked. * @return The {@link CacheSpan}. Or null if the cache entry is locked.
* @throws CacheException If an error is encountered. * @throws CacheException If an error is encountered.
*/ */
......
...@@ -4885,8 +4885,8 @@ public final class ExoPlayerTest { ...@@ -4885,8 +4885,8 @@ public final class ExoPlayerTest {
MediaSource mediaSource2 = new FakeMediaSource(timeline2); MediaSource mediaSource2 = new FakeMediaSource(timeline2);
Timeline expectedPlaceholderTimeline = Timeline expectedPlaceholderTimeline =
new FakeTimeline( new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1), TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2)); TimelineWindowDefinition.createPlaceholder(/* tag= */ 2));
ActionSchedule actionSchedule = ActionSchedule actionSchedule =
new ActionSchedule.Builder(TAG) new ActionSchedule.Builder(TAG)
.waitForTimelineChanged( .waitForTimelineChanged(
...@@ -4958,9 +4958,9 @@ public final class ExoPlayerTest { ...@@ -4958,9 +4958,9 @@ public final class ExoPlayerTest {
Timeline expectedPlaceholderTimeline = Timeline expectedPlaceholderTimeline =
new FakeTimeline( new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1), TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2), TimelineWindowDefinition.createPlaceholder(/* tag= */ 2),
TimelineWindowDefinition.createDummy(/* tag= */ 3)); TimelineWindowDefinition.createPlaceholder(/* tag= */ 3));
Timeline expectedRealTimeline = Timeline expectedRealTimeline =
new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition); new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition);
Timeline expectedRealTimelineAfterRemove = Timeline expectedRealTimelineAfterRemove =
...@@ -5018,9 +5018,9 @@ public final class ExoPlayerTest { ...@@ -5018,9 +5018,9 @@ public final class ExoPlayerTest {
Timeline expectedPlaceholderTimeline = Timeline expectedPlaceholderTimeline =
new FakeTimeline( new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1), TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2), TimelineWindowDefinition.createPlaceholder(/* tag= */ 2),
TimelineWindowDefinition.createDummy(/* tag= */ 3)); TimelineWindowDefinition.createPlaceholder(/* tag= */ 3));
Timeline expectedRealTimeline = Timeline expectedRealTimeline =
new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition); new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition);
Timeline expectedRealTimelineAfterRemove = new FakeTimeline(firstWindowDefinition); Timeline expectedRealTimelineAfterRemove = new FakeTimeline(firstWindowDefinition);
...@@ -5155,8 +5155,8 @@ public final class ExoPlayerTest { ...@@ -5155,8 +5155,8 @@ public final class ExoPlayerTest {
Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE /* source update after prepare */); Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE /* source update after prepare */);
Timeline expectedSecondPlaceholderTimeline = Timeline expectedSecondPlaceholderTimeline =
new FakeTimeline( new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 0), TimelineWindowDefinition.createPlaceholder(/* tag= */ 0),
TimelineWindowDefinition.createDummy(/* tag= */ 0)); TimelineWindowDefinition.createPlaceholder(/* tag= */ 0));
Timeline expectedSecondRealTimeline = Timeline expectedSecondRealTimeline =
new FakeTimeline( new FakeTimeline(
new TimelineWindowDefinition( new TimelineWindowDefinition(
......
...@@ -115,7 +115,7 @@ import java.io.IOException; ...@@ -115,7 +115,7 @@ import java.io.IOException;
input.resetPeekPosition(); input.resetPeekPosition();
ParsableByteArray scratch = new ParsableByteArray(ChunkHeader.SIZE_IN_BYTES); ParsableByteArray scratch = new ParsableByteArray(ChunkHeader.SIZE_IN_BYTES);
// Skip all chunks until we hit the data header. // Skip all chunks until we find the data header.
ChunkHeader chunkHeader = ChunkHeader.peek(input, scratch); ChunkHeader chunkHeader = ChunkHeader.peek(input, scratch);
while (chunkHeader.id != WavUtil.DATA_FOURCC) { while (chunkHeader.id != WavUtil.DATA_FOURCC) {
if (chunkHeader.id != WavUtil.RIFF_FOURCC && chunkHeader.id != WavUtil.FMT_FOURCC) { if (chunkHeader.id != WavUtil.RIFF_FOURCC && chunkHeader.id != WavUtil.FMT_FOURCC) {
......
...@@ -60,7 +60,7 @@ import java.util.concurrent.atomic.AtomicInteger; ...@@ -60,7 +60,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@RequiresApi(29) @RequiresApi(29)
public final class FakeExoMediaDrm implements ExoMediaDrm { public final class FakeExoMediaDrm implements ExoMediaDrm {
public static final ProvisionRequest DUMMY_PROVISION_REQUEST = public static final ProvisionRequest FAKE_PROVISION_REQUEST =
new ProvisionRequest(TestUtil.createByteArray(7, 8, 9), "bar.test"); new ProvisionRequest(TestUtil.createByteArray(7, 8, 9), "bar.test");
/** Key for use with the Map returned from {@link FakeExoMediaDrm#queryKeyStatus(byte[])}. */ /** Key for use with the Map returned from {@link FakeExoMediaDrm#queryKeyStatus(byte[])}. */
...@@ -192,7 +192,7 @@ public final class FakeExoMediaDrm implements ExoMediaDrm { ...@@ -192,7 +192,7 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
@Override @Override
public ProvisionRequest getProvisionRequest() { public ProvisionRequest getProvisionRequest() {
Assertions.checkState(referenceCount > 0); Assertions.checkState(referenceCount > 0);
return DUMMY_PROVISION_REQUEST; return FAKE_PROVISION_REQUEST;
} }
@Override @Override
......
...@@ -58,7 +58,7 @@ public final class FakeTimeline extends Timeline { ...@@ -58,7 +58,7 @@ public final class FakeTimeline extends Timeline {
* *
* @param tag The tag to use in the timeline. * @param tag The tag to use in the timeline.
*/ */
public static TimelineWindowDefinition createDummy(Object tag) { public static TimelineWindowDefinition createPlaceholder(Object tag) {
return new TimelineWindowDefinition( return new TimelineWindowDefinition(
/* periodCount= */ 1, /* periodCount= */ 1,
/* id= */ tag, /* id= */ tag,
......
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