Nat Strangerweather
11/27/2022, 12:45 PMThis method should only be accessed from tests or within private scope
Should I just ignore it?Ataul Munim
11/27/2022, 12:51 PMNat Strangerweather
11/27/2022, 12:52 PMprivate fun sendPhoto() {
lifecycleScope.launch {
try {
val image = clientDataViewModel.image ?: return@launch
val imageAsset = image.toAsset()
val request = PutDataMapRequest.create(IMAGE_PATH).apply {
dataMap.putAsset(IMAGE_KEY, imageAsset)
dataMap.putLong(TIME_KEY, Instant.now().epochSecond)
}
.asPutDataRequest()
.setUrgent()
val result = dataClient.putDataItem(request).await()
Log.d(TAG, "DataItem saved: $result")
} catch (cancellationException: CancellationException) {
throw cancellationException
} catch (exception: Exception) {
Log.d(TAG, "Saving DataItem failed: $exception")
}
}
}
Ataul Munim
11/27/2022, 12:53 PMNat Strangerweather
11/27/2022, 12:54 PMNat Strangerweather
11/27/2022, 12:54 PMNat Strangerweather
11/27/2022, 12:54 PM.asPutDataRequest()
.setUrgent()
Nat Strangerweather
11/27/2022, 12:57 PMAtaul Munim
11/27/2022, 12:59 PMNat Strangerweather
11/27/2022, 1:02 PM@VisibleForTesting
but I'm not sure what to do about it.Nat Strangerweather
11/27/2022, 1:02 PMAtaul Munim
11/27/2022, 1:03 PMNat Strangerweather
11/27/2022, 1:04 PMAtaul Munim
11/27/2022, 1:05 PMNat Strangerweather
11/27/2022, 1:05 PMAtaul Munim
11/27/2022, 1:05 PMyschimke
11/27/2022, 3:30 PMyschimke
11/27/2022, 3:32 PMNat Strangerweather
11/27/2022, 4:07 PMyschimke
11/27/2022, 4:10 PMAtaul Munim
11/27/2022, 4:10 PM