The built-in iPhone speakers and microphones are often the most exposed and easiest areas for water to enter the smartphone. But Apple may have found a way to get that liquid out -- without the need for a bag of uncooked rice.

An Apple Inc. patent application published by the U.S. Patent and Trademark Office Thursday, titled “Liquid Expulsion From An Orifice,” details an invention which uses electrical charges to move liquid from the iPhone’s speaker components and push it out through the speaker and microphone ports. The feature would be activated once water was detected by pressure, optical or moisture sensors.

Apple Flowchart Liquid A flowchart illustrating how the iPhone's liquid protection feature would work. Photo: USPTO/Apple Inc.

Another version of the invention would take a more proactive approach to preventing water from entering the speaker at all by combining a protective screen mesh on the outside of a speaker port with a negative electric charge to prevent liquids from seeping in. But in cases where water is already inside the iPhone’s speaker, it proposes using a positive electric charge on the protective screen mesh to help draw out the water. Alternatively, Apple proposes using sounds waves generated from a speaker to extract water from an iPhone.

Apple Speaker module A cross-sectional view of an iPhone's speaker component. One version of the invention proposes using acoustic waves to push water from the speaker. Photo: USPTO/Apple Inc.

While Apple hasn’t officially said any of its smartphones are waterproof, it has shown increased interest toward improving their resistance to liquid damage. One patent application from Apple, published in March, revealed an invention that used hydrophobic coatings on internal components to reduce the chance of water destroying the innards. Apple’s latest smartphone -- the iPhone 6S -- was also revealed to have a number of new rubber gaskets to help prevent liquid from seeping into the device, iFixIt discovered.

As with many of Apple’s patent applications and filings, it’s unknown if or when it plans to implement the feature in one of its products. Apple first filed the patent application on May 12, 2014, and credits Apple product design staff for the invention, including Stephen P. Zadesky, Fletcher Rothkopf and Ashley E. Fletcher.