Researchers have proposed a method to automatically detect a new class of software glitches in smartphones called "no-sleep energy bugs," which can entirely drain batteries while the phones are not in use.
While limited because of it's Android-specific approach, this is definitely something all smartphone manufacturers need to be concerned about investigating.