This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object DebugNotification { | |
| private const val DEBUG_CHANNEL_ID = "debug_channel" | |
| @JvmStatic | |
| @JvmOverloads | |
| fun show(context: Context, title: String, text: String = "Debug notification") { | |
| if (BuildConfig.DEBUG) { | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
| createChannel(context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun Query.observeLiveData(): FirestoreQueryLiveData { | |
| return FirestoreQueryLiveData(this) | |
| } | |
| fun DocumentReference.observeLiveData(): FirestoreDocumentLiveData { | |
| return FirestoreDocumentLiveData(this) | |
| } | |
| class FirestoreQueryLiveData( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FirebaseLiveData( | |
| private val reference: DatabaseReference | |
| ) : LiveData<DataSnapshot>() { | |
| private var eventListener: ValueEventListener? = null | |
| override fun onActive() { | |
| super.onActive() | |
| logd("onActive $reference") | |
| eventListener = reference.addValueEventListener(FValueEventListener( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlin.properties.ReadWriteProperty | |
| import kotlin.reflect.KProperty | |
| /** | |
| * With this delegate, a property will only return it's value once. Subsequent queries will return the default value. | |
| */ | |
| class GetAndForgetProperty<in R, T>(private val defaultValue: T) : ReadWriteProperty<R, T> { | |
| companion object { | |
| fun <T> getAndForget(defaultValue: T): GetAndForgetProperty<Any, T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Object.prototype.potato = function(){ | |
| console.log('MMMMMMMMMMMMMMMMMMMMMMMMMMMMMNmdhysssssyhhmNMMMMMMMMMMMMMMMMMMMMMMMMMM','MMMMMMMMMMMMMMMMMMMMMMMmy+:.```.--:::::--.```.:+ydMMMMMMMMMMMMMMMMMMMM','MMMMMMMMMMMMMMMMMMMMh+. .:+shddhhhyyyyyhhhddhs+:. ./hNMMMMMMMMMMMMMMMM','MMMMMMMMMMMMMMMMMMy- .+hdhysoo++++++++++++++ooyhdh+. .sNMMMMMMMMMMMMMM','MMMMMMMMMMMMMMMMd: .sdho+++ssso++++++++++++++++++oydy- -dMMMMMMMMMMMMM','MMMMMMMMMMMMMMMy` +dho+++++ooso++++++++++++++++++oooym+ .dMMMMMMMMMMMM','MMMMMMMMMMMMMMs``sms++++++++++++++++++++++++++++osss+sm+ .NMMMMMMMMMMM','MMMMMMMMMMMMMh``ymo++sso++++++++++++++++++++++++++++++hm- oMMMMMMMMMMM','MMMMMMMMMMMMm` oms+++ooo++++++++++++++++++++++++++++++oms .NMMMMMMMMMM','MMMMMMMMMMMM: /my++++++++++++++++++++++++++++++++++++++hd` dMMMMMMMMMM','MMMMMMMMMMMs .dh+++++++++oyhhyo+++++++++++++++++ohhhyo+ym- sMMMMMMMMMM','MMMMMMMMMMm` smo++++++++ommmmmmo+++++++++++++++ommmmmd+om+ :MMMMMMMMMM','MMMMMMMMMM/ :my++++++++++dmmmmd+++++ssyyyyyso++odmmmmh++dh `dMMMMMMMMM','MMMMMMMMMh``hd++++++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FirebaseLiveData( | |
| private val reference: DatabaseReference | |
| ) : LiveData<DataSnapshot>() { | |
| private var eventListener: ValueEventListener? = null | |
| override fun onActive() { | |
| super.onActive() | |
| logd("onActive $reference") | |
| eventListener = reference.addValueEventListener(FValueEventListener( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| WARNING!!! | |
| NO, SERIOUSLY. REAL WARNING!!! | |
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class NetworkEndpointPreference extends StringPreference { | |
| @Inject | |
| public NetworkEndpointPreference(SharedPreferences preferences) { | |
| super(preferences, "debug_network_endpoint_url", DebugApiEndpoints.PROD.getUrl()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class InjectedInstrumentationTestRule implements MethodRule { | |
| private final Object testModule; | |
| public InjectedInstrumentationTestRule(Object testModule) { | |
| this.testModule = testModule; | |
| } | |
| @Override | |
| public Statement apply(final Statement statement, FrameworkMethod frameworkMethod, final Object testClassInstance) { |