When it comes to devices, there is always the possibility of experiencing some kind of security issue, whether it's from malware or a virus infection. Although devices like smartphones run a different kind of software compared to PCs, they are not exempt from being compromised and manipulated. Android users have faced this issue for quite some time, with many vulnerabilities cropping up over the course of a year.
It was only a couple years ago when a huge security vulnerability, known as 'Stagefright', was discovered that opened up hundreds of millions of Android devices to being hacked. This event caused Google to take more responsibility when it came to the security of its own mobile OS, releasing monthly security updates. Since that time, Google has pushed its updates, with some manufacturers doing their best to offer them on their own handsets.
While this is all well in good, it appears that Google has a little more under the hood when it comes to security, with a built-in 'panic mode' that will activate once a user presses the back button enough times in succession. This feature is part of Android 7.1 but isn't necessarily activated by default and is dependent on your manufacturer. The gist of the feature allows Android to "listen" for multiple back key presses in a certain span to determine whether a user is panicking and if it should act upon this reaction. If Android does deem the user is panicked, it will automatically return the user back to the home screen.
This could be a very important feature as some malicious applications can hijack a user's home screen, preventing them from having access to areas that are required. If the panic mode is able to return users back to their home screens, they could then potentially proceed to remove the app and go back to using their Android devices like normal.
Source: XDA Developers