Some more language fixes

Issue: #7565
PiperOrigin-RevId: 353613493
This commit is contained in:
olly 2021-01-25 11:33:38 +00:00 committed by Ian Baker
parent bfc736986e
commit dc7fde1ff7
7 changed files with 24 additions and 24 deletions

View File

@ -2189,7 +2189,7 @@ public final class Util {
return getMobileNetworkType(networkInfo);
case ConnectivityManager.TYPE_ETHERNET:
return C.NETWORK_TYPE_ETHERNET;
default: // VPN, Bluetooth, Dummy.
default:
return C.NETWORK_TYPE_OTHER;
}
}
@ -2620,7 +2620,7 @@ public final class Util {
"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.
private static final String[] isoLegacyTagReplacements =
new String[] {

View File

@ -30,7 +30,7 @@ import java.nio.ByteBuffer;
/* package */ final class C2Mp3TimestampTracker {
// 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 String TAG = "C2Mp3TimestampTracker";
@ -76,7 +76,7 @@ import java.nio.ByteBuffer;
}
// 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) {
anchorTimestampUs = buffer.timeUs;
processedSamples = frameCount - DECODER_DELAY_SAMPLES;

View File

@ -178,10 +178,10 @@ public interface Cache {
* @param key The cache key of the resource.
* @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.
* The length is ignored in the case of a cache hit. In the case of a cache miss, it defines
* the maximum length of the hole {@link CacheSpan} that's returned. Cache implementations may
* support parallel writes into non-overlapping holes, and so passing the actual required
* length should be preferred to passing {@link C#LENGTH_UNSET} when possible.
* The length is ignored if there is a cache entry that overlaps the position. Else, it
* defines the maximum length of the hole {@link CacheSpan} that's returned. Cache
* implementations may support parallel writes into non-overlapping holes, and so passing the
* actual required length should be preferred to passing {@link C#LENGTH_UNSET} when possible.
* @return The {@link CacheSpan}.
* @throws InterruptedException If the thread was interrupted.
* @throws CacheException If an error is encountered.
@ -199,8 +199,8 @@ public interface Cache {
* @param key The cache key of the resource.
* @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.
* The length is ignored in the case of a cache hit. In the case of a cache miss, it defines
* the range of data locked by the returned {@link CacheSpan}.
* The length is ignored if there is a cache entry that overlaps the position. Else, it
* defines the range of data locked by the returned {@link CacheSpan}.
* @return The {@link CacheSpan}. Or null if the cache entry is locked.
* @throws CacheException If an error is encountered.
*/

View File

@ -4885,8 +4885,8 @@ public final class ExoPlayerTest {
MediaSource mediaSource2 = new FakeMediaSource(timeline2);
Timeline expectedPlaceholderTimeline =
new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2));
TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 2));
ActionSchedule actionSchedule =
new ActionSchedule.Builder(TAG)
.waitForTimelineChanged(
@ -4958,9 +4958,9 @@ public final class ExoPlayerTest {
Timeline expectedPlaceholderTimeline =
new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2),
TimelineWindowDefinition.createDummy(/* tag= */ 3));
TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 2),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 3));
Timeline expectedRealTimeline =
new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition);
Timeline expectedRealTimelineAfterRemove =
@ -5018,9 +5018,9 @@ public final class ExoPlayerTest {
Timeline expectedPlaceholderTimeline =
new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 1),
TimelineWindowDefinition.createDummy(/* tag= */ 2),
TimelineWindowDefinition.createDummy(/* tag= */ 3));
TimelineWindowDefinition.createPlaceholder(/* tag= */ 1),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 2),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 3));
Timeline expectedRealTimeline =
new FakeTimeline(firstWindowDefinition, secondWindowDefinition, thirdWindowDefinition);
Timeline expectedRealTimelineAfterRemove = new FakeTimeline(firstWindowDefinition);
@ -5155,8 +5155,8 @@ public final class ExoPlayerTest {
Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE /* source update after prepare */);
Timeline expectedSecondPlaceholderTimeline =
new FakeTimeline(
TimelineWindowDefinition.createDummy(/* tag= */ 0),
TimelineWindowDefinition.createDummy(/* tag= */ 0));
TimelineWindowDefinition.createPlaceholder(/* tag= */ 0),
TimelineWindowDefinition.createPlaceholder(/* tag= */ 0));
Timeline expectedSecondRealTimeline =
new FakeTimeline(
new TimelineWindowDefinition(

View File

@ -115,7 +115,7 @@ import java.io.IOException;
input.resetPeekPosition();
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);
while (chunkHeader.id != WavUtil.DATA_FOURCC) {
if (chunkHeader.id != WavUtil.RIFF_FOURCC && chunkHeader.id != WavUtil.FMT_FOURCC) {

View File

@ -60,7 +60,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@RequiresApi(29)
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");
/** Key for use with the Map returned from {@link FakeExoMediaDrm#queryKeyStatus(byte[])}. */
@ -192,7 +192,7 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
@Override
public ProvisionRequest getProvisionRequest() {
Assertions.checkState(referenceCount > 0);
return DUMMY_PROVISION_REQUEST;
return FAKE_PROVISION_REQUEST;
}
@Override

View File

@ -58,7 +58,7 @@ public final class FakeTimeline extends 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(
/* periodCount= */ 1,
/* id= */ tag,