Android вылетает приложение после сканирования qr кода

Вылетает на функции:

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        var employeeID = data?.extras?.getString(Constants.BAR_CODE)

        if (employeeID == "") {
            Toast.makeText(this@MainActivity,Constants.BAR_CODE_NOT_FOUND,Toast.LENGTH_LONG).show()
        } else {
            employeeID = URLEncoder.encode("employeeID", "UTF-8") + "=" + URLEncoder.encode(employeeID.toString(), "UTF-8") + "&"
            var session = URLEncoder.encode("session", "UTF-8") + "=" + URLEncoder.encode(Constants.responseBody, "UTF-8")
            AsyncRequest().execute("/checkUser?", employeeID, Constants.responseBody)
            var userInfoArray = parserUserInfo(Constants.responseBody)
            bar_code_id_txt?.text = userInfoArray[0]
            scan_data_txt.text = userInfoArray[1]
        }
    }

employeeID читается верно судя по логам, но потом все закрывается Вот полный лог:

04/25 15:30:52: Launching 'app' on Physical Device.
App restart successful without requiring a re-install.
$ adb shell am start -n "com.mugan86.qrscanner/com.mugan86.qrscanner.AuthActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.mugan86.qrscanner.test | com.mugan86.qrscanner
Waiting for application to come online: com.mugan86.qrscanner.test | com.mugan86.qrscanner
Connected to process 4837 on device 'huawei-stk_lx1-S3F4C19C03002472'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/gan86.qrscanne: Late-enabling -Xcheck:jni
E/gan86.qrscanne: Unknown bits set in runtime_flags: 0x8000
I/gan86.qrscanne: Reinit property: dalvik.vm.checkjni= false
W/re-initialized>: type=1400 audit(0.0:128700): avc: denied { read } for pid=4837 name="u:object_r:mmi_prop:s0" dev="tmpfs" ino=1638 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:mmi_prop:s0 tclass=file permissive=0
E/libc: Access denied finding property "runtime.mmitest.isrunning"
D/ActivityThread: Attach thread to application
W/ActivityThread: Application com.mugan86.qrscanner is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
Waiting for application to come online: com.mugan86.qrscanner.test | com.mugan86.qrscanner
Connecting to com.mugan86.qrscanner
Connected to the target VM, address: 'localhost:62700', transport: 'socket'
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/gan86.qrscanne: Late-enabling -Xcheck:jni
E/gan86.qrscanne: Unknown bits set in runtime_flags: 0x8000
I/gan86.qrscanne: Reinit property: dalvik.vm.checkjni= false
W/re-initialized>: type=1400 audit(0.0:128700): avc: denied { read } for pid=4837 name="u:object_r:mmi_prop:s0" dev="tmpfs" ino=1638 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:mmi_prop:s0 tclass=file permissive=0
E/libc: Access denied finding property "runtime.mmitest.isrunning"
D/ActivityThread: Attach thread to application
W/ActivityThread: Application com.mugan86.qrscanner is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/System.out: Debugger has connected
    waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10276(com.mugan86.qrscanner) identical 2 lines
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1425)
I/gan86.qrscanne: The ClassLoaderContext is a special shared library.
I/gan86.qrscanne: QarthPatchMonintor::Init
    QarthPatchMonintor::StartWatch
    QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/
    QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/com.mugan86.qrscanner
    QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all
    QarthPatchMonintor::Run
I/gan86.qrscanne: QarthPatchMonintor::Reading
    QarthPatchMonintor::CheckNotifyEvent
    QarthPatchMonintor::CheckNotifyEvent before read
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.mugan86.qrscanner#10276#256
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.mugan86.qrscanner#10276#0
I/AwareBitmapCacher: init processName:com.mugan86.qrscanner pid=4837 uid=10276
E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@4579923
V/ActivityThread: callActivityOnCreate
V/HwWidgetFactory: : successes to get AllImpl object and return....
I/OverScrollerOptimization: start init SmartSlideOverScroller and get the overscroller config
    get the overscroller config
W/gan86.qrscanne: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/gan86.qrscanne: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
D/ActivityThread: add activity client record, r= ActivityRecord{6e82309 token=android.os.BinderProxy@8a9b825 {com.mugan86.qrscanner/com.mugan86.qrscanner.AuthActivity}} token= android.os.BinderProxy@8a9b825
W/HiTouch_HiTouchSensor: depended package hiTouch does n't exist!
I/HiTouch_HiTouchSensor: HiTouch restricted: system app HiTouch don't exist.
D/HiTouch_PressGestureDetector: onAttached, package=com.mugan86.qrscanner, windowType=1, mHiTouchRestricted=true
I/iGraphics: [0020080c] pn: com.mugan86.qrscanner, p: 4837
    [0030080c] no spt app: com.mugan86.qrscanner
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/HwAutofillHelper: recordCurrentInfo:0
    inputType = 97
W/Gralloc3: mapper 3.x is not supported
E/: APS:IFLoad:importExternalFunctions, search function createNewHwApsUtils failed, dlsym err:undefined symbol: createNewHwApsUtils
D/: APS:importExternalFunctions OK
I/HwViewRootImpl: removeInvalidNode jank list is null
E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
    SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/AwareBitmapCacher: handleInit switch not opened pid=4837
I/HwViewRootImpl: removeInvalidNode all the node in jank list is out of time
D/HwAutofillHelper: recordCurrentInfo:0
    inputType = 97
E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
I/chatty: uid=10276(com.mugan86.qrscanner) identical 2 lines
E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/HwAutofillHelper: recordCurrentInfo:0
D/HwAutofillHelper: inputType = 129
    inputType is password, now record
V/AudioManager: querySoundEffectsEnabled...
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
V/AudioManager: querySoundEffectsEnabled...
D/HwFrameworkSecurityPartsFactory: HwFrameworkSecurityPartsFactory in.
I/HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory.
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@21974cf
V/ActivityThread: callActivityOnCreate
D/ActivityThread: add activity client record, r= ActivityRecord{af73eb6 token=android.os.BinderProxy@21974cf {com.mugan86.qrscanner/com.mugan86.qrscanner.MainActivity}} token= android.os.BinderProxy@21974cf
W/HiTouch_HiTouchSensor: depended package hiTouch does n't exist!
I/HiTouch_HiTouchSensor: HiTouch restricted: system app HiTouch don't exist.
D/HiTouch_PressGestureDetector: onAttached, package=com.mugan86.qrscanner, windowType=1, mHiTouchRestricted=true
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/libEGL: EGLNativeWindowType 0x762b229d50 disconnect failed
V/AudioManager: querySoundEffectsEnabled...
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@b0f9a45
V/ActivityThread: callActivityOnCreate
I/Camera: open camera: 0, package name: com.mugan86.qrscanner
D/ActivityThread: add activity client record, r= ActivityRecord{a13ccfd token=android.os.BinderProxy@b0f9a45 {com.mugan86.qrscanner/com.mugan86.qrscanner.ScannerViewActivity}} token= android.os.BinderProxy@b0f9a45
I/HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = true
W/HiTouch_HiTouchSensor: depended package hiTouch does n't exist!
I/HiTouch_HiTouchSensor: HiTouch restricted: system app HiTouch don't exist.
D/HiTouch_PressGestureDetector: onAttached, package=com.mugan86.qrscanner, windowType=1, mHiTouchRestricted=true
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/libEGL: EGLNativeWindowType 0x75b67f9550 disconnect failed
I/HwViewRootImpl: removeInvalidNode jank list is null
E/handler: 5a916357-dd77-4bf7-b16c-c7d88f49a847
    QR_CODE
I/Camera: close camera: 0, package name: com.mugan86.qrscanner
I/HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = false
I/MediaPlayerNative: prepare MediaPlayer(0x75c9710580)
D/MediaPlayerNative: Message: MEDIA_PREPARED(1), ext1=0, ext2=0x0
D/MediaPlayerNative: [notify] : [1170] callback app listenerNotNull=1, send=1
I/MediaPlayerNative: prepare complete - status=0 MediaPlayer(0x75c9710580)
V/PlayerBase: baseStart() piid=543
I/MediaPlayer: [HSM] stayAwake true uid: 10276, pid: 4837
D/MediaPlayerNative: Action:start, CurrentState:MEDIA_PLAYER_STARTED
I/System.out: ************** Stop Camera**********
I/HwViewRootImpl: removeInvalidNode all the node in jank list is out of time
D/MediaPlayerNative: Message: Unknown MediaEventType(6), ext1=0, ext2=0x0
D/MediaPlayerNative: [notify] : [1170] callback app listenerNotNull=1, send=1
D/MediaPlayerNative: [notify] : [1170] callback app listenerNotNull=1, send=1
D/MediaPlayerNative: Message: MEDIA_PLAYBACK_COMPLETE(2), ext1=0, ext2=0x0
    [notify] : [1170] callback app listenerNotNull=1, send=1
D/MediaPlayerNative: [notify] : [1170] callback app listenerNotNull=1, send=1
Disconnected from the target VM, address: 'localhost:62700', transport: 'socket'

Ответы (0 шт):