File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
liveness/src/main/java/com/amplifyframework/ui/liveness/camera Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,7 @@ import com.amplifyframework.ui.liveness.model.LivenessCheckState
46
46
import com.amplifyframework.ui.liveness.state.LivenessState
47
47
import com.amplifyframework.ui.liveness.util.WebSocketCloseCode
48
48
import java.util.Date
49
- import java.util.Timer
50
49
import java.util.concurrent.Executors
51
- import kotlin.concurrent.schedule
52
50
import kotlin.coroutines.resume
53
51
import kotlin.coroutines.suspendCoroutine
54
52
import kotlinx.coroutines.MainScope
@@ -253,18 +251,6 @@ internal class LivenessCoordinator(
253
251
}
254
252
255
253
private fun processFinalEventsSent () {
256
- // Timeout if the disconnect event isn't received (onComplete isn't invoked) within the time limit
257
- Timer ().schedule(DISCONNECT_EVENT_TIMEOUT_MS ) {
258
- if (! disconnectEventReceived) {
259
- val timeoutError =
260
- FaceLivenessDetectionException .SessionTimedOutException (
261
- " Session timed out. Did not receive final response from server within " +
262
- " time limit."
263
- )
264
- processSessionError(timeoutError, true )
265
- }
266
- cancel()
267
- }
268
254
unbindCamera(context)
269
255
}
270
256
@@ -309,6 +295,5 @@ internal class LivenessCoordinator(
309
295
const val TARGET_ENCODE_BITRATE = (1024 * 1024 * .6 ).toInt()
310
296
const val TARGET_ENCODE_KEYFRAME_INTERVAL = 1 // webm muxer only flushes to file on keyframe
311
297
val TARGET_RESOLUTION_SIZE = Size (TARGET_WIDTH , TARGET_HEIGHT )
312
- const val DISCONNECT_EVENT_TIMEOUT_MS : Long = 8000
313
298
}
314
299
}
You can’t perform that action at this time.
0 commit comments