Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import java.util.concurrent.TimeUnit
import kotlin.collections.ArrayList


internal class TedImagePickerActivity : AppCompatActivity() {
open class TedImagePickerActivity : AppCompatActivity() {

private lateinit var binding: ActivityTedImagePickerBinding
private val albumAdapter by lazy { AlbumAdapter(builder) }
Expand Down Expand Up @@ -268,7 +268,7 @@ internal class TedImagePickerActivity : AppCompatActivity() {
}

@SuppressLint("CheckResult")
private fun onCameraTileClick() {
open fun onCameraTileClick() {
val (cameraIntent, uri) = MediaUtil.getMediaIntentUri(
this@TedImagePickerActivity,
builder.mediaType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ open class TedImagePickerBaseBuilder<out B : TedImagePickerBaseBuilder<B>>(
.setPermissions(Manifest.permission.READ_EXTERNAL_STORAGE)
.request()

private open fun getIntent(context: Context): Intent {
// allow to use a custom activity intent
return TedImagePickerActivity.getIntent(context, this)
}
private fun startActivity(context: Context) {
TedImagePickerActivity.getIntent(context, this)
getIntent(context, this)
.run {
TedRxOnActivityResult.with(context).startActivityForResult(this)
}.run {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TedRxImagePicker {
}

@SuppressLint("ParcelCreator")
class Builder(private val contextWeakReference: WeakReference<Context>) :
open class Builder(private val contextWeakReference: WeakReference<Context>) :
TedImagePickerBaseBuilder<Builder>() {

fun start(): Single<Uri> =
Expand Down