This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="${applicationId}"> | |
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator"/> | |
</manifest> |
This file contains 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
package com.downloader | |
import org.junit.Test | |
import java.util.* | |
import java.util.concurrent.TimeUnit | |
class OnProgressSpeedListenerTest { | |
@Test | |
fun `speed is not calculated until the required number of samples have been received`() { |
This file contains 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
package com.aniketkadam.cleanlinks | |
import android.content.ClipData | |
import android.content.ClipboardManager | |
import io.reactivex.Observable | |
import io.reactivex.Observer | |
import io.reactivex.disposables.Disposable | |
import java.util.concurrent.atomic.AtomicBoolean | |
fun ClipboardManager.updates(): Observable<OptionalClipData> = ClipboardObservable(this) |
This file contains 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
package com.aniketkadam.dogether.goals | |
import androidx.lifecycle.LiveData | |
import com.aniketkadam.dogether.goals.data.GoalsListLiveData | |
import com.google.firebase.firestore.FirebaseFirestore | |
import javax.inject.Inject | |
class GoalListRepository @Inject constructor(private val firebaseFirestore: FirebaseFirestore) { | |
fun getOwnGoals(): LiveData<List<Goal>> = |
This file contains 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
val <T> T.exhaustive: T | |
get() = this |
This file contains 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
rules_version = '2'; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /users/{uid}/goals/{document=**} { | |
allow read, write, create, delete: if request.auth != null && request.auth.uid != null && request.auth.uid == uid; | |
} | |
} | |
} |
This file contains 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
rules_version = '2'; | |
function isAuthenticated(request){ | |
return request.auth != null && request.auth.uid != null | |
} | |
function isDocUidSameAsUserUid(request){ | |
return request.auth.uid == request.resource.data.uid | |
} |
This file contains 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
package com.aniketkadam.dogether.goals | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MediatorLiveData | |
import com.aniketkadam.dogether.auth.FIREBASE_USER_ID | |
import com.aniketkadam.dogether.di.data.PRIVATE_GOALS_LOCATION_NAME | |
import com.aniketkadam.dogether.di.data.PUBLIC_GOALS_LOCATION_NAME | |
import com.aniketkadam.dogether.goals.data.GoalsListLiveData | |
import com.google.firebase.firestore.CollectionReference | |
import com.google.firebase.firestore.QueryDocumentSnapshot |
This file contains 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
|
This file contains 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
package com.aniketkadam.dogether.extensions | |
val <T> T.exhaustive: T | |
get() = this |