]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/Webview.java
Remove webview error message toast.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / Webview.java
index 9c51b446d8d7c88df530bc03ef4029c034a47464..2760e346e5458f1748fcb16e85144b53a782274c 100644 (file)
@@ -1,3 +1,22 @@
+/**
+ * Copyright 2015 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 package com.stoutner.privacybrowser;
 
 import android.annotation.SuppressLint;
@@ -96,9 +115,11 @@ public class Webview extends AppCompatActivity implements CreateHomeScreenShortc
                 return true;
             }
 
+            /* These errors do not provide any useful information and clutter the screen.
             public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
-                Toast.makeText(mainWebViewActivity, "Error loading " + request + "   Error: " + error, Toast.LENGTH_LONG).show();
+                Toast.makeText(mainWebViewActivity, "Error loading " + request + "   Error: " + error, Toast.LENGTH_SHORT).show();
             }
+            */
 
             // Update the URL in urlTextBox when the page starts to load.
             @Override
@@ -329,6 +350,13 @@ public class Webview extends AppCompatActivity implements CreateHomeScreenShortc
 
                 startActivity(downloadManangerIntent);
                 break;
+
+            case R.id.about:
+                // Show the AboutDialog AlertDialog and name this instance aboutDialog.
+                AppCompatDialogFragment aboutDialog = new AboutDialog();
+                aboutDialog.show(getSupportFragmentManager(), "aboutDialog");
+
+                break;
         }
 
         return super.onOptionsItemSelected(menuItem);