def update_status(unsent_reg_ids, all_results, multicast_result)
      results = multicast_result.results
      raise RuntimeError, "Internal error: sizes do not match. currentResults: #{results}; unsentRegIds: #{unsent_reg_ids}" unless results.size==unsent_reg_ids.size
      new_unsent_reg_ids = []
      unsent_reg_ids.each_with_index {|reg_id, index|
        result = results[index]
        all_results[reg_id]= result
        new_unsent_reg_ids << reg_id unless (result.error_code.nil? || result.error_code.eql?(ERROR_UNAVAILABLE))
      }
      new_unsent_reg_ids
    end
def update_status(unsent_reg_ids, all_results, multicast_result)
      results = multicast_result.results
      raise RuntimeError, "Internal error: sizes do not match. currentResults: #{results}; unsentRegIds: #{unsent_reg_ids}" unless results.size==unsent_reg_ids.size
      new_unsent_reg_ids = []
      unsent_reg_ids.each_with_index {|reg_id, index|
        result = results[index]
        all_results[reg_id]= result
        new_unsent_reg_ids << reg_id unless (result.error_code.nil? || result.error_code.eql?(ERROR_UNAVAILABLE))
      }
      new_unsent_reg_ids
    end
Updates the status of the messages sent to devices and the list of devices that should be retried.
 @param [Array] unsent_reg_ids
 @param [Hash] all_results
 @param [GcmHelper::MulticastResult] multicast_result