_processKalamMtpBuffer = async ({ stderr }) => {
  const googleAndroidFileTransferIsActive = `Quit 'Android File Transfer' app (by Google) and Refresh`;

  let processedErrorValue = null;

  if (!undefinedOrNull(stderr)) {
    processedErrorValue = mtpErrors[stderr];
  }

  switch (stderr) {
    case MTP_ERROR.ErrorMtpDetectFailed:
    case MTP_ERROR.ErrorDeviceSetup:
      const _isGoogleAndroidFileTransferActive =
        await isGoogleAndroidFileTransferActive();

      if (_isGoogleAndroidFileTransferActive) {
        return {
          error: googleAndroidFileTransferIsActive,
          throwAlert: true,
          logError: true,
          mtpStatus: false,
          reportError: false,
        };
      }

      break;

    default:
      break;
  }

  switch (stderr) {
    /* No MTP device found */
    case MTP_ERROR.ErrorMtpDetectFailed:
      return {
        error: processedErrorValue,
        throwAlert: false,
        logError: false,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorStorageFull:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorNoStorage:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: true,
      };

    case MTP_ERROR.ErrorStorageInfo:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: true,
      };

    case MTP_ERROR.ErrorDeviceInfo:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: true,
      };

    case MTP_ERROR.ErrorMultipleDevice:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorDeviceSetup:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: true,
      };

    case MTP_ERROR.ErrorSendObject:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorFileObjectRead:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorFileTransfer:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorInvalidPath:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorLocalFileRead:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorFilePermission:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorFileNotFound:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: false,
      };

    case MTP_ERROR.ErrorListDirectory:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };

    case MTP_ERROR.ErrorAllowStorageAccess:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorDeviceChanged:
      return {
        error: processedErrorValue,
        throwAlert: false,
        logError: true,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorMtpLockExists:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: false,
      };

    case MTP_ERROR.ErrorDeviceLocked:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: false,
        reportError: false,
      };

    case MTP_ERROR.ErrorGeneral:
    default:
      return {
        error: processedErrorValue,
        throwAlert: true,
        logError: true,
        mtpStatus: true,
        reportError: true,
      };
  }
}
Helper function for processKalamMtpBuffer

@param [stderr] variable will hold the kalam ffi errorTypes
@return {Promise<{throwAlert: boolean, logError: boolean, mtpStatus: boolean, reportError: boolean, error: string}|{throwAlert: boolean, logError: boolean, mtpStatus: boolean, reportError: boolean, error: null}>}
@private