Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright (c) 2010, Sony Ericsson Mobile Communication AB. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
#here comes Observable<List<DtlMerchant>>#
.flatMap(Observable::from)
.filter(merchant -> merchant.getPartnerStatus() == PartnerStatus.UNKNOWN)
.filter(merchant -> merchant.getType() == MerchantType.UNKNOWN)
.toList()
#here I need the same Observable<List<DtlMerchant>>#
@Den-Rimus
Den-Rimus / ResettableLazyDelegate.kt
Last active June 22, 2022 04:39
Android Kotlin resettable lazy delegate
interface ResettableLazy<out T> : Lazy<T> {
fun reset()
}
private class ResettableSynchronizedLazyImpl<out T>(initializer: () -> T, lock: Any? = null) : ResettableLazy<T> {
private val initializer: (() -> T)? = initializer
2021-01-15 17:11:22.439 23815-23815/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2021-01-15 17:11:22.441 23815-23815/? E/Zygote: accessInfo : 1
2021-01-15 17:11:22.465 23815-23815/? I/le.cameraxbasi: Late-enabling -Xcheck:jni
2021-01-15 17:11:22.499 23815-23815/? I/le.cameraxbasi: report jit thread pid = 23837
2021-01-15 17:11:23.323 23815-23815/com.android.example.cameraxbasic W/le.cameraxbasi: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
2021-01-15 17:11:23.323 23815-23815/com.android.example.cameraxbasic W/le.cameraxbasi: Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
2021-01-15 17:11:23.323 23815-23815/com.android.example.cameraxbasic W/le.cameraxbasi: Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
2021-01-15 17:11:23.323 23815-23815/com.android.example.cameraxbasic W/le.cameraxbasi: Accessing hidden field Landroid/graphics/Insets;->top: