Skip to content

Commit 5afffab

Browse files
JolandaVerhoefgithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent 54aad13 commit 5afffab

File tree

10 files changed

+152
-9
lines changed

10 files changed

+152
-9
lines changed

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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

319
import android.content.BroadcastReceiver
@@ -106,7 +122,7 @@ class BroadcastReceiverViewModel @Inject constructor(
106122
}
107123

108124
fun sendBroadcast(newData: String, usePermission: Boolean = false) {
109-
if(!usePermission) {
125+
if (!usePermission) {
110126
// [START android_broadcast_receiver_8_send]
111127
val intent = Intent("com.example.snippets.ACTION_UPDATE_DATA").apply {
112128
putExtra("com.example.snippets.DATA", newData)
@@ -122,7 +138,6 @@ class BroadcastReceiverViewModel @Inject constructor(
122138
// [START android_broadcast_receiver_9_send_with_permission]
123139
context.sendBroadcast(intent, android.Manifest.permission.ACCESS_COARSE_LOCATION)
124140
// [END android_broadcast_receiver_9_send_with_permission]
125-
126141
}
127142
}
128143
}
@@ -231,7 +246,7 @@ fun MyApp() {}
231246
// [START android_broadcast_receiver_14_stateless]
232247
@Composable
233248
fun MyStatefulScreen() {
234-
val myBroadcastReceiver = remember { MyBroadcastReceiver()}
249+
val myBroadcastReceiver = remember { MyBroadcastReceiver() }
235250
val context = LocalContext.current
236251
LifecycleStartEffect(true) {
237252
// [START_EXCLUDE]

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
/*
2+
* Copyright 2024 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 kotlinx.coroutines.flow.MutableStateFlow
4-
import kotlinx.coroutines.flow.StateFlow
519
import javax.inject.Inject
620
import javax.inject.Singleton
21+
import kotlinx.coroutines.flow.MutableStateFlow
22+
import kotlinx.coroutines.flow.StateFlow
723

824
@Singleton
925
class DataRepository @Inject constructor() {

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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

319
import android.os.Bundle

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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

319
import android.app.Application

misc/src/main/java/com/example/snippets/navigation/Destination.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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.navigation
218

319
enum class Destination(val route: String, val title: String) {

misc/src/main/java/com/example/snippets/navigation/LandingScreen.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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.navigation
218

319
/*

misc/src/main/java/com/example/snippets/ui/theme/Color.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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.ui.theme
218

319
import androidx.compose.ui.graphics.Color
@@ -8,4 +24,4 @@ val Pink80 = Color(0xFFEFB8C8)
824

925
val Purple40 = Color(0xFF6650a4)
1026
val PurpleGrey40 = Color(0xFF625b71)
11-
val Pink40 = Color(0xFF7D5260)
27+
val Pink40 = Color(0xFF7D5260)

misc/src/main/java/com/example/snippets/ui/theme/Theme.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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.ui.theme
218

319
import android.os.Build
@@ -54,4 +70,4 @@ fun SnippetsTheme(
5470
typography = Typography,
5571
content = content
5672
)
57-
}
73+
}

misc/src/main/java/com/example/snippets/ui/theme/Type.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 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.ui.theme
218

319
import androidx.compose.material3.Typography
@@ -31,4 +47,4 @@ val Typography = Typography(
3147
letterSpacing = 0.5.sp
3248
)
3349
*/
34-
)
50+
)

wear/src/main/java/com/example/wear/snippets/rotary/Rotary.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fun SnapScrollableScreen() {
243243
}
244244

245245
@Composable
246-
fun PositionScrollIndicator(){
246+
fun PositionScrollIndicator() {
247247
// [START android_wear_rotary_position_indicator]
248248
val listState = rememberScalingLazyListState()
249249
Scaffold(

0 commit comments

Comments
 (0)