File tree Expand file tree Collapse file tree 2 files changed +13
-17
lines changed
watchface/src/main/java/com/android/developers/androidify/watchface/transfer Expand file tree Collapse file tree 2 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,4 @@ class WearDeviceRepositoryImpl @Inject constructor(
105105 null
106106 }
107107 }
108-
109- private val TAG = " WearDeviceRepository"
110108}
Original file line number Diff line number Diff 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 */
2727object 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"
You can’t perform that action at this time.
0 commit comments