The clause “whether he intended to hear or not” makes deliberate listening unnecessary. If a person actually hears a recited verse of prostration, merely saying that they had not intended to listen does not remove the Hanafi ruling.
Actual hearing and intent to hear are two different matters.