Skip to content

Commit 6478983

Browse files
committed
Addresses comments
1 parent b7de6ea commit 6478983

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

watchface/src/main/java/com/android/developers/androidify/watchface/transfer/WearDeviceRepository.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,4 @@ class WearDeviceRepositoryImpl @Inject constructor(
105105
null
106106
}
107107
}
108-
109-
private val TAG = "WearDeviceRepository"
110108
}

watchface/src/main/java/com/android/developers/androidify/watchface/transfer/WearableApiAvailability.kt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,19 @@ import kotlinx.coroutines.tasks.await
2525
* Checks whether a given Wearable Data Layer API is available on this device.
2626
*/
2727
object WearableApiAvailability {
28-
suspend fun isAvailable(api: GoogleApi<*>): Boolean {
29-
return try {
30-
GoogleApiAvailability.getInstance()
31-
.checkApiAvailability(api)
32-
.await()
28+
suspend fun isAvailable(api: GoogleApi<*>) = try {
29+
GoogleApiAvailability.getInstance()
30+
.checkApiAvailability(api)
31+
.await()
3332

34-
true
35-
} catch (e: AvailabilityException) {
36-
Log.d(
37-
TAG,
38-
"${api.javaClass.simpleName} API is not available in this device.",
39-
)
40-
false
41-
}
33+
true
34+
} catch (e: AvailabilityException) {
35+
Log.d(
36+
TAG,
37+
"${api.javaClass.simpleName} API is not available in this device.",
38+
)
39+
false
4240
}
43-
44-
val TAG = "WearableApiAvailability"
4541
}
42+
43+
private const val TAG = "WearableApiAvailability"

0 commit comments

Comments
 (0)