mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-03-19 18:10:10 +01:00
renaming some functions and variables
This commit is contained in:
parent
674f259d5b
commit
3989eca8e8
@ -257,7 +257,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||
}
|
||||
}
|
||||
|
||||
private fun is3rdPartyIntent() = isVideoCaptureIntent() || isImageCaptureIntent()
|
||||
private fun isThirdPartyIntent() = isVideoCaptureIntent() || isImageCaptureIntent()
|
||||
|
||||
private fun isImageCaptureIntent(): Boolean = intent?.action == MediaStore.ACTION_IMAGE_CAPTURE || intent?.action == MediaStore.ACTION_IMAGE_CAPTURE_SECURE
|
||||
|
||||
@ -321,12 +321,12 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||
}
|
||||
|
||||
val outputUri = intent.extras?.get(MediaStore.EXTRA_OUTPUT) as? Uri
|
||||
val is3rdPartyIntent = is3rdPartyIntent()
|
||||
val isThirdPartyIntent = isThirdPartyIntent()
|
||||
mPreview = CameraXInitializer(this).createCameraXPreview(
|
||||
preview_view,
|
||||
listener = this,
|
||||
outputUri = outputUri,
|
||||
is3rdPartyIntent = is3rdPartyIntent,
|
||||
isThirdPartyIntent = isThirdPartyIntent,
|
||||
initInPhotoMode = mIsInPhotoMode,
|
||||
)
|
||||
checkImageCaptureIntent()
|
||||
@ -409,13 +409,13 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||
}
|
||||
|
||||
private fun onSwipeLeft() {
|
||||
if (!is3rdPartyIntent() && camera_mode_tab.isVisible()) {
|
||||
if (!isThirdPartyIntent() && camera_mode_tab.isVisible()) {
|
||||
selectPhotoTab(triggerListener = true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onSwipeRight() {
|
||||
if (!is3rdPartyIntent() && camera_mode_tab.isVisible()) {
|
||||
if (!isThirdPartyIntent() && camera_mode_tab.isVisible()) {
|
||||
selectVideoTab(triggerListener = true)
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ class CameraXInitializer(private val activity: BaseSimpleActivity) {
|
||||
previewView: PreviewView,
|
||||
listener: CameraXPreviewListener,
|
||||
outputUri: Uri?,
|
||||
is3rdPartyIntent: Boolean,
|
||||
isThirdPartyIntent: Boolean,
|
||||
initInPhotoMode: Boolean,
|
||||
): CameraXPreview {
|
||||
val cameraErrorHandler = newCameraErrorHandler()
|
||||
val mediaOutputHelper = newMediaOutputHelper(cameraErrorHandler, outputUri, is3rdPartyIntent)
|
||||
val mediaOutputHelper = newMediaOutputHelper(cameraErrorHandler, outputUri, isThirdPartyIntent)
|
||||
return CameraXPreview(
|
||||
activity,
|
||||
previewView,
|
||||
@ -30,13 +30,13 @@ class CameraXInitializer(private val activity: BaseSimpleActivity) {
|
||||
private fun newMediaOutputHelper(
|
||||
cameraErrorHandler: CameraErrorHandler,
|
||||
outputUri: Uri?,
|
||||
is3rdPartyIntent: Boolean,
|
||||
isThirdPartyIntent: Boolean,
|
||||
): MediaOutputHelper {
|
||||
return MediaOutputHelper(
|
||||
activity,
|
||||
cameraErrorHandler,
|
||||
outputUri,
|
||||
is3rdPartyIntent,
|
||||
isThirdPartyIntent,
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user