diff --git a/app/src/main/java/aiv/ashivered/safebrowser/LoadUrl.java b/app/src/main/java/aiv/ashivered/safebrowser/LoadUrl.java index 2c42b84..debcb4f 100644 --- a/app/src/main/java/aiv/ashivered/safebrowser/LoadUrl.java +++ b/app/src/main/java/aiv/ashivered/safebrowser/LoadUrl.java @@ -60,7 +60,7 @@ public void blockString() { public void onBackPressed () { if (mWebView.canGoBack()) { mWebView.goBack(); - } else if (mWebView.canGoBack()) { + } else { super.onBackPressed(); } } @@ -135,8 +135,9 @@ protected void onCreate(Bundle savedInstanceState) { mWebView.loadUrl(data.toString()); } else { blockString(); - Intent goMain = new Intent(this, MainActivity.class); - startActivity(goMain); + /* Intent goMain = new Intent(this, MainActivity.class); + startActivity(goMain); */ + finish(); } } } diff --git a/app/src/main/java/aiv/ashivered/safebrowser/MainActivity.java b/app/src/main/java/aiv/ashivered/safebrowser/MainActivity.java index 9934427..a172745 100644 --- a/app/src/main/java/aiv/ashivered/safebrowser/MainActivity.java +++ b/app/src/main/java/aiv/ashivered/safebrowser/MainActivity.java @@ -59,7 +59,7 @@ public void blockString() { public void onBackPressed () { if (mWebView.canGoBack()) { mWebView.goBack(); - } else if (mWebView.canGoBack()) { + } else { super.onBackPressed(); } }