Skip to content

Commit

Permalink
revert unwanted changes in .idea files
Browse files Browse the repository at this point in the history
  • Loading branch information
niting1112 committed Oct 17, 2024
1 parent e3b35e3 commit 36c755f
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 87 deletions.
32 changes: 0 additions & 32 deletions .idea/inspectionProfiles/ktlint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion media/audio-ui-model/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions media/audio-ui-model/api/current.api
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// Signature format: 4.0
package com.google.android.horologist.audio.ui {

public final class RotaryVolumeControlsKt {
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior highResVolumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior lowResVolumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior volumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
}

public final class VolumeUiState {
ctor public VolumeUiState(optional int current, optional int max, optional int min);
method public int component1();
Expand Down
6 changes: 6 additions & 0 deletions media/audio-ui/api/current.api
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Signature format: 4.0
package com.google.android.horologist.audio.ui {

public final class RotaryVolumeControlsKt {
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior highResVolumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior lowResVolumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
method @androidx.compose.runtime.Composable public static androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior volumeRotaryBehavior(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiStateProvider, kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit> onRotaryVolumeInput);
}

public final class VolumePositionIndicatorKt {
method @androidx.compose.runtime.Composable public static void VolumePositionIndicator(kotlin.jvm.functions.Function0<com.google.android.horologist.audio.ui.VolumeUiState> volumeUiState, optional androidx.compose.ui.Modifier modifier, optional kotlinx.coroutines.flow.Flow<kotlin.Unit>? displayIndicatorEvents, optional long color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class RotaryVolumeControlsTest {
@Test
fun highResRotary_with15Max_converts30Pixels_getsOneVolumeIncrease() {
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = 30f,
volumeUiStateProvider = { VolumeUiState(current = 2, max = 15) },
)
Expand All @@ -150,7 +150,7 @@ class RotaryVolumeControlsTest {
@Test
fun highResRotary_with15Max_convertsNegative30Pixels_getsOneVolumeDecrease() {
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = -30f,
volumeUiStateProvider = { VolumeUiState(current = 2, max = 15) },
)
Expand All @@ -161,7 +161,7 @@ class RotaryVolumeControlsTest {
@Test
fun highResRotary_increasesBeyondMax_getsMax() {
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = 100f,
volumeUiStateProvider = { VolumeUiState(current = 25, max = 25) },
)
Expand All @@ -172,7 +172,7 @@ class RotaryVolumeControlsTest {
@Test
fun highResRotary_decreasesBeyondMin_getsMin() {
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = -100f,
volumeUiStateProvider = { VolumeUiState(current = 0, max = 25, min = 0) },
)
Expand All @@ -183,7 +183,7 @@ class RotaryVolumeControlsTest {
@Test
fun highResRotary_converts48Pixels_withSmallMax_getsNewVolumeCorrectly() {
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = 48f,
volumeUiStateProvider = { VolumeUiState(current = 0, max = 5, min = 0) },
)
Expand All @@ -195,7 +195,7 @@ class RotaryVolumeControlsTest {
fun highResRotary_converts23Pixels_withSmallMax_getsNoChange() {
// 23/48 = 0.47916 which would round to 0
val actual =
com.google.android.horologist.audio.ui.convertPixelToVolume(
convertPixelToVolume(
change = 23f,
volumeUiStateProvider = { VolumeUiState(current = 0, max = 5, min = 0) },
)
Expand All @@ -221,7 +221,7 @@ class RotaryVolumeControlsTest {
modifier =
Modifier
.rotaryScrollable(
behavior = com.google.android.horologist.audio.ui.volumeRotaryBehavior(
behavior = volumeRotaryBehavior(
volumeUiStateProvider = { VolumeUiStateMapper.map(volumeState) },
onRotaryVolumeInput = { newVolume ->
volumeRepository.setVolume(
Expand Down
6 changes: 3 additions & 3 deletions media/sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ dependencies {

implementation(libs.moshi.adapters)
implementation(libs.moshi.kotlin)
implementation(project(":media:audio-ui-model"))
implementation(project(":media:ui-model"))
testImplementation(project(":media:audio-ui-model"))
implementation(projects.media.audioUiModel)
implementation(projects.media.uiModel)
testImplementation(projects.media.audioUiModel)
ksp(libs.moshi.kotlin.codegen)
implementation(libs.kotlinx.serialization.core)

Expand Down
1 change: 0 additions & 1 deletion media/ui-model/.gitignore

This file was deleted.

Empty file removed media/ui-model/consumer-rules.pro
Empty file.
21 changes: 0 additions & 21 deletions media/ui-model/proguard-rules.pro

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,7 @@ class TrackPositionUiModelMapperTest {
val playbackState = PlaybackState.IDLE

// when
val result = TrackPositionUiModelMapper.map(
PlaybackStateEvent(
playbackState,
PlaybackStateEvent.Cause.Initial,
),
)
val result = TrackPositionUiModelMapper.map(PlaybackStateEvent(playbackState, PlaybackStateEvent.Cause.Initial))

// then
assertThat(result).isInstanceOf(TrackPositionUiModel.Hidden::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,7 @@ class PlayerScreenTest {
// given
composeTestRule.setContent {
PlayerScreen(
playerViewModel = PlayerViewModel(
FakePlayerRepository(),
),
playerViewModel = PlayerViewModel(FakePlayerRepository()),
controlButtons = { _, _ -> Text("Custom") },
volumeViewModel = volumeViewModel,
)
Expand All @@ -433,9 +431,7 @@ class PlayerScreenTest {
// given
composeTestRule.setContent {
PlayerScreen(
playerViewModel = PlayerViewModel(
FakePlayerRepository(),
),
playerViewModel = PlayerViewModel(FakePlayerRepository()),
buttons = { Text("Custom") },
volumeViewModel = volumeViewModel,
)
Expand All @@ -450,9 +446,7 @@ class PlayerScreenTest {
// given
composeTestRule.setContent {
PlayerScreen(
playerViewModel = PlayerViewModel(
FakePlayerRepository(),
),
playerViewModel = PlayerViewModel(FakePlayerRepository()),
background = { Text("Custom") },
volumeViewModel = volumeViewModel,
)
Expand Down

0 comments on commit 36c755f

Please sign in to comment.