Update: The plot thickens: the phone also emits the noise just after recording video, and for a much longer period of time. An Apple discussion thread about the noise is here.
Are dogs unusually attentive to, or angry at, your new iPhone 3G S? The folks over at Boy Genius Report have an inkling as to what might be causing it: when a iPhone 3G S user sends a text message or locks the screen, the phone's speaker (the grille on the bottom left-hand side of the device) emits a high pitched sound for approximately three seconds. Many users corroborate the presence of the sound in the comments of the article.
This is an unusual response to these interactions, and further investigation has not yielded any other function that triggers the sound. To activate the sound with a lock, the phone must first be fully unlocked (waking the phone and putting it back to sleep will not trigger the sound). The phone does not emit the tone when the sound is switched off; likewise, when the volume is low, the sound is barely audible, if at all. To my 22-year old ears the sound is soft even with the volume all the way up, but noticeable once I became aware of it (and now a bit annoying).
Boy Genius Report estimates the sound to be in the 15 kHz range (here's a clip of a similar sound for reference), well within the iPhone's listed range of 20 Hz to 20 kHz. Your personal experience with the sound may vary, as higher pitched sounds become harder to hear as you age. Some users report hearing it loud and clear, while others must hold the speaker right up to their ear to hear it; some don't hear it at all. For this reason, it's hard to say whether the sound is endemic to the phone or an anomaly only occurring in certain devices.
A call to Apple's tech support revealed they had no previous knowledge of this issue. They directed me to do a hard reset (holding down the Home button + the Sleep button for ten seconds) but the sound remained. The representative speculated it was a hardware issue, and recommended I take the phone to my nearest Apple Store to get a replacement. Until then, if a rabid dog attacks me, all I have to do to confuse it is unlock and relock my iPhone (or, send a text message).
Can any of you hear this sound too?