The best technology is one that responds to your desires before you even know what those desires are. Android 7.1 Nougat has just such a feature, informally called "Panic Behavior" or "Panic Detection."
This well-hidden function lets users evade screen-seizing malicious or annoying apps by doing what comes naturally: pressing the back button like there’s no tomorrow. If a user hits the back button four times in rapid succession, he or she will be taken back to the home screen, from which the appropriate steps can be taken to remove the offending app. The catch is that not all phones running Nougat may have it enabled.
This information comes courtesy of XDA Developers, a community of Android programmers who are often the first to find Android's hidden features. XDA's Mishaal Rahman took a deep dive into the panic-detection mode in order to explain both its benefits and limitations.
Rahman examined the "config.xml" file in Android 7.1 Nougat and found a variable known as "config_backPanicBehavior." When active (as it was by default on the Google Pixel phone we tried), it measures how quickly and frequently users press the back button. If they hit it four times with less than 300 milliseconds between each press, the phone assumes they're trying desperately to get away from an unwanted screen. The protocol bypasses whatever is active and sends the user back to the home screen.
The benefits of panic detection are obvious, particularly for users who are dealing with never-ending streams of adware, or forms of ransomware that lock a screen and demand payment. (The feature probably won't help with encrypting ransomware, which locks up files.)
In either case, using the panic-detection mode could bring a user right back to the home menu, from which uninstalling the offending program — or backing up data and factory-resetting the phone — would be possible.
On the other hand, there may be a slight problem with panic detection: It's not necessarily something that users can activate themselves. If you have a Google Pixel, Nexus 5X or Nexus 6P phone, you're probably golden.
But if you have an Android 7.1 phone from another manufacturer, it's at the manufacturer's discretion whether or not the feature is active. (You could also root the device, but that opens you up to more security risks than a panic button alone would solve.)
Now that the information about panic detection is out in the wild, malefactors could theoretically figure out a way to program around it. However, developing adware or malware is one thing; developing adware or malware that overrides default variables in a phone's configuration is exponentially more difficult. If you have an Android 7.1 device and encounter screen-stealing software, at least you now know how to bypass it.