Skip to content

Tests for LocalMediaRepository #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yasith
Copy link
Contributor

@yasith yasith commented Mar 12, 2025

Apply Spotless

@yasith yasith force-pushed the yasith/localMediaRepository branch from fc81f5b to 83747b1 Compare March 13, 2025 18:49
@yasith yasith force-pushed the yasith/localMediaRepository branch from 1548bb2 to b1b91af Compare March 18, 2025 21:19
@IODispatcher private val iODispatcher: CoroutineDispatcher
) : MediaRepository {

override suspend fun load(mediaDescriptor: MediaDescriptor): Media {
Copy link
Collaborator

@Kimblebee Kimblebee Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i think it would be helpful for fresh eyes down the road to include some kdocs that describe the significance between what load() and getLastCapturedMedia() are doing.

Comment on lines +69 to +78
val loadedBitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// Android 10 (API 29) and above: Use ImageDecoder
context.contentResolver.openInputStream(uri)?.use { inputStream ->
BitmapFactory.decodeStream(inputStream)
}
} else {
// Android 9 (API 28) and below: Use BitmapFactory
context.contentResolver.openInputStream(uri)?.use { inputStream ->
BitmapFactory.decodeStream(inputStream)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are using BitmapFactory for both of these cases

* limitations under the License.
*/

package media
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package name?

@yasith yasith force-pushed the yasith/localMediaRepository branch 2 times, most recently from 46c712e to 8b2632c Compare March 26, 2025 02:38
Base automatically changed from yasith/localMediaRepository to main March 26, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants