val game: LiveData<RefreshableResource<GameEntity>> = Transformations.switchMap(_gameId) { gameId ->
when (gameId) {
BggContract.INVALID_ID -> AbsentLiveData.create()
else -> gameRepository.getGame(gameId)
}
}
調べてみると、
どうやら、null の入った LiveData のようです。
/**
* A LiveData class that has `null` value.
*/
class AbsentLiveData<T : Any?> private constructor(): LiveData<T>() {
init {
// use post instead of set since this can be created on any thread
postValue(null)
}
companion object {
fun <T> create(): LiveData<T> {
return AbsentLiveData()
}
}
}
私たちはその命令を遵守し、その影響を検討しています。Google Play、そしてGoogle Play Protectによるセキュリティ保護機能は、既存のファーウェイ端末で引き続き機能します。
We are complying with the order and reviewing the implications. For users of our services, Google Play and the security protections from Google Play Protect will continue to function on existing Huawei devices.