Skip to content

Commit

Permalink
Apply Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicalMeghan authored and github-actions[bot] committed Jan 24, 2024
1 parent 841cec1 commit 8d0431a
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const val REQUEST_PAUSE = 6
// [END android_broadcast_receiver_constants]

// TODO: update this snippet
//@Composable
//fun PipListenerPreAPI12(shouldEnterPipMode: Boolean) {
// @Composable
// fun PipListenerPreAPI12(shouldEnterPipMode: Boolean) {
// // [START android_pip_pre12_listener]
// // [START region_tag_10]
// val currentShouldEnterPipMode = true
Expand All @@ -95,7 +95,7 @@ const val REQUEST_PAUSE = 6
// }
// }
// // [END android_pip_pre12_listener]
//}
// }

@Composable
fun VideoPlayer(
Expand Down Expand Up @@ -129,8 +129,7 @@ internal fun Context.findActivity(): ComponentActivity {
// [END android_find_activity]

@Composable
fun VideoPlayerScreen(
) {
fun VideoPlayerScreen() {
// [START android_pip_button_click]
val context = LocalContext.current
Button(onClick = {
Expand All @@ -149,7 +148,7 @@ fun VideoPlayerScreen(
// [START android_is_in_pip_mode]
@Composable
fun isInPipMode(): Boolean {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val activity = LocalContext.current.findActivity()
var pipMode by remember { mutableStateOf(activity.isInPictureInPictureMode) }
DisposableEffect(activity) {
Expand All @@ -162,7 +161,6 @@ fun isInPipMode(): Boolean {
onDispose { activity.removeOnPictureInPictureModeChangedListener(observer) }
}


return pipMode
} else {
return false
Expand Down Expand Up @@ -254,7 +252,6 @@ fun PipListenerPreAPI12_1(shouldEnterPipMode: Boolean) {
}
}


@Composable
fun VideoPlayer1(
shouldEnterPipMode: Boolean,
Expand Down Expand Up @@ -372,13 +369,12 @@ fun listOfRemoteActions(isPlaying: Boolean, context: Context): List<RemoteAction
return listOf()
}


@Composable
fun VideoPlayer4(
shouldEnterPipMode: Boolean,
modifier: Modifier = Modifier,

) {
) {
val context = LocalContext.current

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Expand Down

0 comments on commit 8d0431a

Please sign in to comment.