Many mobile devices (phones, mp3 players, etc..) have moisture sensors that allow the manufacturer to determine whether the device received for service had been exposed to a liquid. If this is the case, the warranty will be refused.
These sensors are present, for example in 4 different locations on the iPhone, on the exterior and interior of the device. In the case of the iPhone, pellets will turn red on contact with liquid, located at the bottom of the Jack or Firewire socket (depending on the specific model).(see the source image).