Seems like RIM has been getting a lot of patents granted lately along with getting sued for various others. Their most recent one, applied for in 2007 has just now been given the thumbs up from the USPTO and it highights a system wherein your handset can detect when your ear is further away from it and as such, increase of decrease the volume based on proximity. The technical portion:
A degree of seal of an ear about a speaker port may be estimated by detecting touch contact between the ear and at least one touch sensor in fixed relation to the speaker port. The degree of seal is estimated based on the detected touch contact. Based upon the estimated degree of seal, the acoustic output of the speaker may be adjusted. The adjustment may compensate for perceived changes to the quality of the acoustic output resulting from the degree of seal. The at least one touch sensor may be a plurality of touch sensors spaced around the speaker port. Each sensor may have a truncated wedge shape, with a narrow end closest to the speaker port. Upon receipt of user input indicative of a high degree of ear seal, a sample of the sensor(s) may be taken and stored for using during future estimation of the degree of seal.
Sounds much like how the proximity sensor works on touchscreen device only this is for volume of the handset. Makes you wonder how many other patents RIM has in store and why some really old ones are only now just getting approved.