firebase / firebase/firebase-android-sdk
Could you make ProvideError public?
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 34
Description
## What feature would you like to see?
```java
protected interface ProvideError {
Exception getError();
}
```
[This](https://github.com/firebase/firebase-android-sdk/blob/master/firebase-storage/src/main/java/com/google/firebase/storage/StorageTask.java#L1061-L1063) interface public
## How would you use it?
Allowing it to be public, you could then create Kotlin extension on the highest generic upper bound of `StorageTask` like:
```kotlin
fun Continuation.resume(): Unit =
resumeWith(Result.success(Unit))
suspend fun StorageTask.await() = suspendCancellableCoroutine { cont ->
val l = OnCompleteListener { cont.resume() }
addOnCompleteListener(l)
cont.invokeOnCancellation { removeOnCompleteListener(l) }
}
```
Contributor guide
Research direction
Start in firebase-storage/src/main/java/com/google/firebase/storage/StorageTask.java at the ProvideError declaration linked in the issue. Check the surrounding StorageTask API and firebase-storage validation or tests, then confirm that the interface is publicly accessible without changing its methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- api, mobile
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100