WebView doesn't Go Back on Back Button Click

I have a WebView App which browses web pages of a website. I have used the following lines of codes to use the back button to navigate to the previous web page and double back button click to quit the app.

The double back button tap to quit the app is working fine but the app doesn't go back on single back button click. What's the issue here?

private static final int TIME_DELAY = 2000;
        private static long back_pressed;
        @Override
        public void onBackPressed() {
            if(myWebView.canGoBack()) {
                myWebView.goBack();
            }

            if (back_pressed + TIME_DELAY > System.currentTimeMillis()) {
                super.onBackPressed();
            } else {
                Toast.makeText(getBaseContext(), "Press once again to exit!",
                        Toast.LENGTH_SHORT).show();
            }
            back_pressed = System.currentTimeMillis();
        }