A magnetic field can have unpredictable effects on an electronic device, as most electronic components are not affected by such a field. It is certainly possible for a strong magnet or a rapidly fluctuating magnetic field to interfere with certain components of a cellphone, causing it to drain power faster. However, a small magnet such as a magnetic clasp on a cellphone case is largely harmless.
Current and Magnetism
Electricity and magnetism are closely related through Ampere's Law: the physical law that describes how electromagnets are created by running current through a wire to create an electric field. The reverse is also true: a magnetic field can also produce a current via induction, which has the potential to overdraw a battery of an electronic device. However, though any current is capable of generating an magnetic field, only a change in magnetic force -- otherwise known as "flux" -- can produce a current, as per Faraday's Law. A static magnetic field will only produce a drain for a split second, which will not significantly affect a cellphone battery.
Electronic Components Sensitive to Magnetism
An electronic device is not normally sensitive to static magnetic fields in and of itself. However, if it contains components that are designed to be magnetically sensitive, it may be sensitive to a powerful magnetic field. Magnetic components of electronics can include magnetic proximity switches, hard disk drives and voltage converters. Magnetic switches are designed to trigger when a magnet passes over it, a hard disk drive uses a magnetic head to write data to a save disk, and a voltage converter uses magnetic induction to increase the generated voltage of a circuit.
Video of the Day
Construction of Cellphones
Most modern cellphones do not usually use magnetic media for storage, favoring flash memory such as SD cards and SIM cards instead. However cellphones with a powerful backlit fluorescent screen may require a voltage converter that uses an magnetic transformer to store and convert charge. In the presence of a sufficiently strong magnetic field, the battery will have to work harder to create the appropriate output voltage; it will wear out as a result. However, the strength required to do so is several times the strength of an average bar or horseshoe magnet -- only an electromagnet is potentially strong enough.
Avoiding Cellphone Battery Drain
If you suspect that your cellphone's battery is draining due to close proximity to a magnetic field, call the manufacturer and get the information on the device's sensitivity from the source. All cellphones operate differently, so you cannot rule out the possibility of your phone being affected by a magnet until you have confirmed it yourself. However, if you have a smartphone and your battery has difficulty holding a charge, your problem may not be from a magnet but from automatic services with a high power requirement, such as GPS, 4G and automatic notifications and updates.