text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> EventMessageDecoder decoder = new EventMessageDecoder(); MetadataInputBuffer buffer = new MetadataInputBuffer(); buffer.data = ByteBuffer.allocate(rawEmsgBody.length).put(rawEmsgBody); Metadata metadata = decoder.decode(buffer); assertThat(metadata.length()).isEqualTo(1); EventMes...
fim
yuliskov/SmartTube
java
<|fim_suffix|>est", "123", 3000, 1000403, new byte[] {0, 1, 2, 3, 4}); private static final byte[] ENCODED_MESSAGE = joinByteArrays( createByteArray(117, 114, 110, 58, 116, 101, 115, 116, 0), // scheme_id_uri = "urn:test" createByteArray(49, 50, 51, 0), // value = "123" createByte...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
fim
yuliskov/SmartTube
java
<|fim_suffix|>r2.metadata.flac; import static com.google.common.truth.Truth.assertThat; import android.os.Parcel; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; /** Test for {@link PictureFrame}. */ @RunWith(AndroidJUnit4.class) public final class Pictur...
fim
yuliskov/SmartTube
java
<|fim_suffix|>= Parcel.obtain(); vorbisCommentFrameToParcel.writeToParcel(parcel, 0); parcel.setDataPosition(0); VorbisComment vorbisCommentFrameFromParcel = VorbisComment.CREATOR.createFromParcel(parcel); assertThat(vorbisCommentFrameFromParcel).isEqualTo(vorbisCommentFrameToParcel); parcel.recyc...
fim
yuliskov/SmartTube
java
<|fim_suffix|>st_url';"; Metadata metadata = decoder.decode(icyContent); assertThat(metadata.length()).isEqualTo(1); IcyInfo streamInfo = (IcyInfo) metadata.get(0); assertThat(streamInfo.rawMetadata).isEqualTo(icyContent); assertThat(streamInfo.title).isEqualTo("test\r\ntitle"); assertThat(stre...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
fim
yuliskov/SmartTube
java
<|fim_suffix|>eateFromParcel(parcel); // Assert equals. assertThat(fromParcelStreamInfo).isEqualTo(streamInfo); } } <|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wit...
fim
yuliskov/SmartTube
java
<|fim_suffix|>rt org.junit.runner.RunWith; /** Test for {@link ChapterFrame}. */ @RunWith(AndroidJUnit4.class) public final class ChapterFrameTest { @Test public void testParcelable() { Id3Frame[] subFrames = new Id3Frame[] { new TextInformationFrame("TIT2", null, "title"), new UrlLinkFrame("WXXX"...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ToParcel = new ChapterTocFrame("id", false, true, children, subFrames); Parcel parcel = Parcel.obtain(); chapterTocFrameToParcel.writeToParcel(parcel, 0); parcel.setDataPosition(0); ChapterTocFrame chapterTocFrameFromParcel = ChapterTocFrame.CREATOR.createFromParcel(parcel); ...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>. 0x00, // tier(4), splice_command_length(4). 0x13, // splice_command_length(8). 0x05, // splice_command_type = splice_insert. // Start of splice_insert(). (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, // splice_event_id. 0x00, // splice_event_cancel_i...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> void mergeRequest_nonExistingDownload_createsNewDownload() throws IOException { byte[] data = new byte[] {1, 2, 3, 4}; DownloadRequest request = new DownloadRequest( "id", TYPE_PROGRESSIVE, Uri.parse("https://www.test.com/download"), asList(...
fim
yuliskov/SmartTube
java
<|fim_suffix|>on_setReason() throws Exception { String id = "id"; DownloadBuilder downloadBuilder = new DownloadBuilder(id) .setState(Download.STATE_FAILED) .setFailureReason(Download.FAILURE_REASON_UNKNOWN); Download download = downloadBuilder.build(); downloadIndex.putD...
fim
yuliskov/SmartTube
java
<|fim_suffix|>hrows Exception { DownloaderConstructorHelper constructorHelper = new DownloaderConstructorHelper(Mockito.mock(Cache.class), DummyDataSource.FACTORY); DownloaderFactory factory = new DefaultDownloaderFactory(constructorHelper); Downloader downloader = factory.createDownloader(...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> /* bitrate= */ bitrate, /* maxInputSize= */ Format.NO_VALUE, /* width= */ 480, /* height= */ 360, /* frameRate= */ Format.NO_VALUE, /* initializationData= */ null, /* drmInitData= */ null); } private static Format createAudioFormat(String language) {...
fim
yuliskov/SmartTube
java
<|fim_suffix|> return this; } private FakeDownloader assertStartCount(int count) { assertThat(startCount).isEqualTo(count); return this; } private FakeDownloader assertReleased() throws InterruptedException { int count = 0; while (started.await(ASSERT_TRUE_TIMEOUT, TimeUnit...
fim
yuliskov/SmartTube
java
<|fim_suffix|>t15); } private static void assertNotEqual(DownloadRequest request1, DownloadRequest request2) { assertThat(request1).isNotEqualTo(request2); assertThat(request2).isNotEqualTo(request1); } private static void assertEqual(DownloadRequest request1, DownloadRequest request2) { assertTha...
fim
yuliskov/SmartTube
java
<|fim_suffix|>express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.exoplayer2.offline; import static com.google.common.truth.Truth.assertThat; import android.os.Parcel; import androidx.test.ext.junit.runners.Android...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ldSource = new FakeMediaSource(/* timeline= */ null, /* manifest= */ null); dummyMainThread.runOnMainThread( () -> { mediaSource.addMediaSource(preparedChildSource); mediaSource.addMediaSource(unpreparedChildSource); }); testRunner.prepareSource(); f...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_suffix|> for (int i = 0; i < shuffleOrder.getLength(); i++) { if (i >= indexFrom && i < indexToExclusive) { continue; } int expectedNextIndex = shuffleOrder.getNextIndex(i); while (expectedNextIndex >= indexFrom && expectedNextIndex < indexToExclusive) { expectedNextInde...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> 0); parcel.setDataPosition(0); TrackGroupArray trackGroupArrayFromParcel = TrackGroupArray.CREATOR.createFromParcel(parcel); assertThat(trackGroupArrayFromParcel).isEqualTo(trackGroupArrayToParcel); parcel.recycle(); } } <|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source P...
fim
yuliskov/SmartTube
java
<|fim_suffix|>icense. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>nded()).isTrue(); } private static void assertEqual(MediaChunkListIterator iterator, FakeMediaChunk chunk) { assertThat(iterator.getChunkStartTimeUs()).isEqualTo(chunk.startTimeUs); assertThat(iterator.getChunkEndTimeUs()).isEqualTo(chunk.endTimeUs); assertThat(iterator.getDataSpec()).isE...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ntIndex)).get(0).text.toString()) .isEqualTo("This is the second subtitle \nwith a newline \nand another."); assertThat(subtitle.getEventTime(eventIndex + 1)).isEqualTo(3450000); } private static void assertTypicalCue3(SsaSubtitle subtitle, int eventIndex) { assertThat(subtitle.getEve...
fim
yuliskov/SmartTube
java
<|fim_suffix|>btitle.getCues(subtitle.getEventTime(eventIndex)).get(0).text.toString()) .isEqualTo("This is the second subtitle.\nSecond subtitle with second line."); assertThat(subtitle.getEventTime(eventIndex + 1)).isEqualTo(3456000); } private static void assertTypicalCue3(SubripSubtitle subtitle, i...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy <|fim_suffix|>ancestor.setFontColor(FOREGROUND_COLOR); ancestor.setLinethrough(tru...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>qualTo(0); List<Cue> subtitleCues = subtitle.getCues(0); assertThat(subtitleCues).hasSize(expectedCues.length); for (int i = 0; i < subtitleCues.size(); i++) { assertCueEquals(expectedCues[i], subtitleCues.get(i)); } } /** * Asserts that two cues are equal. */ private st...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tCue.Builder builder = new WebvttCue.Builder(); WebvttCueParser.parseCueText(null, string, builder, Collections.emptyList()); return (Spanned) builder.build().text; } private static <T> T[] getSpans(Spanned text, Class<T> spanType) { return text.getSpans(0, text.length(), spanType); } ...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ass)).hasLength(2); assertThat(s4.getSpans(/* start= */ 17, s4.length(), StyleSpan.class)).hasLength(1); assertThat(s4.getSpans(/* start= */ 17, s4.length(), StyleSpan.class)[0].getStyle()) .isEqualTo(Typeface.BOLD); } @Test public void testWithComplexCssSelectors() throws IOExcepti...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>e int[] selectedAllTracksInGroup(TrackGroup trackGroup) { int[] listIndices = new int[trackGroup.length]; for (int i = 0; i < trackGroup.length; i++) { listIndices[i] = i; } return listIndices; } private static Format videoFormat(int bitrate, int width, int height) { return ...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> @Override public int supportsFormat(Format format) throws ExoPlaybackException { return MimeTypes.getTrackType(format.sampleMimeType) == trackType ? (FORMAT_HANDLED | ADAPTIVE_SEAMLESS) : FORMAT_UNSUPPORTED_TYPE; } @Override public int supportsMixedMimeTypeAdaptation() t...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tesUsingFutureInfo( new MediaChunkIterator[] {MediaChunkIterator.EMPTY}, new Format[] {createFormatWithBitrate(10)}, MAX_DURATION_US, /* bitrates= */ null); assertThat(bitrates).asList().containsExactly(Format.NO_VALUE); } @Test public void getBi...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ECOND); } private static Format createFormatWithBitrate(int bitrate) { return Format.createSampleFormat( /* id= */ null, /* sampleMimeType= */ null, /* codecs= */ null, bitrate, /* drmInitData= */ null); } private static MediaChunkIterator createMediaC...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>. */ /* package */ final class DataSourceAsserts { /** * Asserts that data read from a {@link DataSource} matches {@code expected}. * * @param dataSource The {@link DataSource} through which to read. * @param dataSpec The {@link DataSpec} to use when opening the {@link DataSource}. * @p...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h<|fim_suffix|>m.bytesRead()).isEqualTo(TEST_DATA.length);...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ContentLength( CacheDataSource cacheDataSource, DataSpec dataSpec, boolean unknownLength, boolean customCacheKey) throws IOException { assertReadData(cacheDataSource, dataSpec, unknownLength); // If the request was unbounded then the content length should be cached, e...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
fim
yuliskov/SmartTube
java
<|fim_suffix|>wer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache; private File tempFolder; private SimpleCache cache; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); mockCache.init(); tempFolder = Util.createTempDirectory(ApplicationProv...
fim
yuliskov/SmartTube
java
<|fim_suffix|>.addSpan(span); index.maybeRemove(cachedContent.key); assertThat(index.get(cachedContent.key)).isNotNull(); } @Test public void testCantRemoveLockedCachedContent() { CachedContentIndex index = newInstance(); CachedContent cachedContent = index.getOrAdd("key1"); cachedContent.s...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Li<|fim_suffix|>fter; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockit...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache Licen<|fim_suffix|>on { MockitoAnnotations.initMocks(this); } @Test public void testContentBiggerThanMaxSizeDoesNotThrowException() throws Exception { int maxBytes = 100; LeastRecentlyUsedCacheEvict...
fim
yuliskov/SmartTube
java
<|fim_suffix|>; assertWithMessage(message).that(cacheSpan.file).isEqualTo(cacheFile); assertWithMessage(message).that(cacheSpan.lastTouchTimestamp).isEqualTo(lastTouchTimestamp); } private void assertNullCacheSpan(File parent, String key, long offset, long lastTouchTimestamp) { long cacheFileLength = 0...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> <= getMaxUnchangedBytesAllowedPostEncryption(data.length)) .isTrue(); offset = 0; while (offset < data.length) { int bytes = 1 + random.nextInt(4095); bytes = Math.min(bytes, data.length - offset); decryptCipher.updateInPlace(data, offset, bytes); offset += bytes;...
fim
yuliskov/SmartTube
java
<|fim_suffix|>e(); assertRead(); output = atomicFile.startWrite(); output.write(6); assertRead(); output.close(); output = atomicFile.startWrite(); assertRead(); output.close(); } private void assertRead() throws IOException { InputStream input = atomicFile.openRead(); ...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tMediaMimeType("mp4a.68")).isEqualTo(MimeTypes.AUDIO_AAC); assertThat(MimeTypes.getMediaMimeType("mp4a.69")).isEqualTo(MimeTypes.AUDIO_MPEG); assertThat(MimeTypes.getMediaMimeType("mp4a.6B")).isEqualTo(MimeTypes.AUDIO_MPEG); assertThat(MimeTypes.getMediaMimeType("mp4a.a5")).isEqualTo(MimeTypes...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>) { // Expected. } } @Test public void testModificationsAffectParsableArray() { ParsableByteArray parsableByteArray = getTestDataArray(); // When modifying the wrapped byte array byte[] data = parsableByteArray.data; long readValue = parsableByteArray.readUnsignedInt(); ...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>); assertThat(removeQueryParameter(uri, "foo").toString()).isEqualTo("http://uri"); uri = Uri.parse("http://uri?query=value"); assertThat(removeQueryParameter(uri, "foo").toString()).isEqualTo("http://uri?query=value"); } } <|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Proje...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tThat(binarySearchCeil(values, 0, false, false)).isEqualTo(0); assertThat(binarySearchCeil(values, 0, true, false)).isEqualTo(0); assertThat(binarySearchCeil(values, 1, false, false)).isEqualTo(1); assertThat(binarySearchCeil(values, 1, true, false)).isEqualTo(0); assertThat(binarySearch...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|> private static void testCoordinate(float[] expected, float[] output, int offset, int count) { for (int i = 0; i < count; i++) { Assert.assertEquals(expected[i], output[i + offset]); } } } <|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apach...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ing. Expected. } } } <|fim_prefix|>/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apach...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * <|fim_suffix|>mat; import com.google.android.exoplayer2.sour...
fim
yuliskov/SmartTube
java
<|fim_suffix|>ge governing permissions and * limitations under the License. */ package com.google.android.exoplayer2.source.dash; import java.io.IOException; /** Thrown when a live playback's manifest is stale and a new manifest could not be loaded. */ public final class DashManifestStaleException extends IOExcepti...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>cede the end of the live window. Use {@link * #DEFAULT_LIVE_PRESENTATION_DELAY_PREFER_MANIFEST_MS} to use the value specified by the * manifest, if present. * @param eventHandler A handler for events. May be null if delivery of events is not required. * @param eventListener A listener ...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
<|fim_suffix|>x, long timeOffsetUs) { this.chunkIndex = chunkIndex; this.timeOffsetUs = timeOffsetUs; } @Override public long getFirstSegmentNum() { return 0; } @Override public int getSegmentCount(long periodDurationUs) { return chunkIndex.length; } @Override public long getTimeUs(...
fim
yuliskov/SmartTube
java
<|fim_suffix|>tained within) the old index. newSegmentNumShift += oldIndex.getSegmentNum(newIndexStartTimeUs, newPeriodDurationUs) - newIndexFirstSegmentNum; } return new RepresentationHolder( newPeriodDurationUs, newRepresentation, extractorWrapper, newSegmentN...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* <|fim_suffix|>ormatRequired || !isFormatSentDownstream) { formatHolder.format = upstreamFormat; isFormatSentDownstream = true; return C.RESULT_FORMAT_READ; } if (currentIndex == eventTimesUs.length) { if (!eventStreamAppendable) { buffer.setFlags(C.BUFFER_FLAG_EN...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
yuliskov/SmartTube
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
fim
yuliskov/SmartTube
java