Created
April 24, 2020 14:14
-
-
Save mzorz/b0ee3c388c834feeac607044abc837a6 to your computer and use it in GitHub Desktop.
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
diff --git a/app/src/main/java/com/automattic/portkey/compose/frame/FrameSaveManager.kt b/app/src/main/java/com/automattic/portkey/compose/frame/FrameSaveManager.kt | |
index c0c21f4..b5d81da 100644 | |
--- a/app/src/main/java/com/automattic/portkey/compose/frame/FrameSaveManager.kt | |
+++ b/app/src/main/java/com/automattic/portkey/compose/frame/FrameSaveManager.kt | |
@@ -125,6 +125,10 @@ class FrameSaveManager(private val photoEditor: PhotoEditor) : CoroutineScope { | |
try { | |
// create ghost PhotoEditorView to be used for saving off-screen | |
val ghostPhotoEditorView = createGhostPhotoEditor(context, photoEditor.composedCanvas) | |
+ if (TEST_FLAG <= 2 ){ | |
+ TEST_FLAG++ | |
+ throw Exception("THIS IS A TEST") | |
+ } | |
frameFile = saveImageFrame(frame, ghostPhotoEditorView, frameIndex) | |
saveProgressListener?.onFrameSaveCompleted(frameIndex) | |
} catch (ex: Exception) { | |
@@ -295,6 +299,7 @@ class FrameSaveManager(private val photoEditor: PhotoEditor) : CoroutineScope { | |
private const val VIDEO_CONCURRENCY_LIMIT = 3 | |
private const val IMAGE_CONCURRENCY_LIMIT = 10 | |
private const val VIDEO_PROCESSING_READY_WAIT_TIME_MILLIS: Long = 500 | |
+ private var TEST_FLAG = 0 | |
fun releaseAddedViews(frame: StoryFrameItem) { | |
// don't forget to remove these views from ghost offscreen view before exiting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment