Extreme power saver mode on the HTC One M8 does this essentially. You can only Call/Text/Email/Calendar/Calculator while in the mode and you get some crazy battery life as well.
Not my screenshot: http://www.androidcentral.com/sites/androidcentral.com/files...