Skip to content

Commit 07439af

Browse files
asolovaygithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent b954cca commit 07439af

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

misc/src/main/java/com/example/snippets/PreloadManagerKotlinSnippets.kt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1+
/*
2+
* Copyright 2025 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.snippets
218

3-
import androidx.media3.common.C
4-
import androidx.media3.exoplayer.source.preload.TargetPreloadStatusControl
519
import android.os.Bundle
620
import androidx.annotation.OptIn
721
import androidx.appcompat.app.AppCompatActivity
22+
import androidx.media3.common.C
823
import androidx.media3.common.MediaItem
924
import androidx.media3.common.util.UnstableApi
1025
import androidx.media3.exoplayer.ExoPlayer
1126
import androidx.media3.exoplayer.source.preload.DefaultPreloadManager
27+
import androidx.media3.exoplayer.source.preload.TargetPreloadStatusControl
1228
import java.lang.Math.abs
1329

14-
1530
// constants to make the code snippets work
1631
const val currentPlayingIndex = 10
1732

@@ -71,7 +86,6 @@ class PreloadManagerSnippetsKotlin {
7186
// [START android_defaultpreloadmanager_invalidate]
7287
preloadManager.invalidate()
7388
// [END android_defaultpreloadmanager_invalidate]
74-
7589
}
7690

7791
@OptIn(UnstableApi::class)
@@ -103,7 +117,6 @@ class PreloadManagerSnippetsKotlin {
103117
// [START android_defaultpreloadmanager_removeItem]
104118
preloadManager.remove(mediaItem)
105119
// [END android_defaultpreloadmanager_removeItem]
106-
107120
}
108121

109122
@OptIn(UnstableApi::class)
@@ -118,6 +131,4 @@ class PreloadManagerSnippetsKotlin {
118131
return listOf()
119132
}
120133
}
121-
122-
123134
}

0 commit comments

Comments
 (0)