-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANDROID-14297 Get Tweaks as suspend functions and non null (#39)
* Get Tweaks as suspend functions and non null * Provide no-op implementation * Add Tweaks Contract * Format file
- Loading branch information
Showing
3 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
library/src/main/java/com/telefonica/tweaks/TweaksContract.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.telefonica.tweaks | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
|
||
|
||
interface TweaksContract { | ||
|
||
fun <T> getTweakValue(key: String): Flow<T?> | ||
|
||
fun <T> getTweakValue(key: String, defaultValue: T): Flow<T> | ||
|
||
suspend fun <T> getTweak(key: String): T? | ||
|
||
suspend fun <T> getTweak(key: String, defaultValue: T): T | ||
|
||
suspend fun <T> setTweakValue(key: String, value: T) | ||
|
||
suspend fun clearValue(key: String) | ||
|
||
|
||
} |
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