From: Soren Stoutner Date: Thu, 4 Feb 2016 03:06:43 +0000 (-0700) Subject: Make privacy_mode.xml green. X-Git-Tag: v1.0~9 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=cb90dabb95b908c3e76c0616ac201106199e200a;p=PrivacyBrowserAndroid.git Make privacy_mode.xml green. --- diff --git a/app/src/main/assets/about_text.html b/app/src/main/assets/about_text.html index 89d2ab9b..0995c3df 100644 --- a/app/src/main/assets/about_text.html +++ b/app/src/main/assets/about_text.html @@ -6,10 +6,10 @@

Privacy Browser is released under the GPLv3+ license. The full text of the license is below.

-

/app/src/main/res/drawable/javascript_on.xml is part of the Android Material icon set, where it is named ic_visibility. +

/app/src/main/res/drawable/javascript_enabled.xml is part of the Android Material icon set, where it is named ic_visibility. It is released under the CC-BY license. Changes to fill color were made by Soren Stoutner in 2016.

-

/app/src/main/res/drawable/warning_on.xml is part of the Android Material icon set, where it is named ic_visibility. +

/app/src/main/res/drawable/warning.xml is part of the Android Material icon set, where it is named ic_visibility. It is released under the CC-BY license. Changes to fill color were made by Soren Stoutner in 2016.

/app/src/main/res/drawable/privacy_mode.xml is part of the Android Material icon set, where it is named ic_visibility_off. diff --git a/app/src/main/java/com/stoutner/privacybrowser/MainWebView.java b/app/src/main/java/com/stoutner/privacybrowser/MainWebView.java index 0b9c117a..f58f1a2b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/MainWebView.java +++ b/app/src/main/java/com/stoutner/privacybrowser/MainWebView.java @@ -332,10 +332,10 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh // Set the initial icon for toggleJavaScript if (javaScriptEnabled) { - toggleJavaScript.setIcon(R.drawable.javascript_on); + toggleJavaScript.setIcon(R.drawable.javascript_enabled); } else { if (domStorageEnabled || cookiesEnabled) { - toggleJavaScript.setIcon(R.drawable.warning_on); + toggleJavaScript.setIcon(R.drawable.warning); } else { toggleJavaScript.setIcon(R.drawable.privacy_mode); } @@ -398,7 +398,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh // Update the toggleJavaScript icon and display a toast message. if (domStorageEnabled || cookiesEnabled) { - menuItem.setIcon(R.drawable.warning_on); + menuItem.setIcon(R.drawable.warning); if (domStorageEnabled && cookiesEnabled) { Toast.makeText(getApplicationContext(), "JavaScript disabled, DOM Storage and Cookies still enabled", Toast.LENGTH_SHORT).show(); } else { @@ -414,7 +414,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh } } else { javaScriptEnabled = true; - menuItem.setIcon(R.drawable.javascript_on); + menuItem.setIcon(R.drawable.javascript_enabled); mainWebView.getSettings().setJavaScriptEnabled(true); mainWebView.reload(); Toast.makeText(getApplicationContext(), "JavaScript enabled", Toast.LENGTH_SHORT).show(); @@ -434,7 +434,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show(); } else { if (cookiesEnabled) { - toggleJavaScript.setIcon(R.drawable.warning_on); + toggleJavaScript.setIcon(R.drawable.warning); Toast.makeText(getApplicationContext(), "Cookies still enabled", Toast.LENGTH_SHORT).show(); } // Else Do nothing because JavaScript is enabled. } @@ -446,7 +446,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh // Update the toggleJavaScript icon if appropriate. if (!javaScriptEnabled) { - toggleJavaScript.setIcon(R.drawable.warning_on); + toggleJavaScript.setIcon(R.drawable.warning); } // Else Do nothing because JavaScript is enabled. Toast.makeText(getApplicationContext(), "DOM Storage enabled", Toast.LENGTH_SHORT).show(); @@ -482,7 +482,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show(); } else { if (domStorageEnabled) { - toggleJavaScript.setIcon(R.drawable.warning_on); + toggleJavaScript.setIcon(R.drawable.warning); Toast.makeText(getApplicationContext(), "DOM Storage still enabled", Toast.LENGTH_SHORT).show(); } // Else Do nothing because JavaScript is enabled. } @@ -494,7 +494,7 @@ public class MainWebView extends AppCompatActivity implements CreateHomeScreenSh // Update the toggleJavaScript icon if appropriate. if (!javaScriptEnabled) { - toggleJavaScript.setIcon(R.drawable.warning_on); + toggleJavaScript.setIcon(R.drawable.warning); } // Else Do nothing because JavaScript is enabled. Toast.makeText(getApplicationContext(), "Cookies enabled", Toast.LENGTH_SHORT).show(); diff --git a/app/src/main/res/drawable/javascript_enabled.xml b/app/src/main/res/drawable/javascript_enabled.xml new file mode 100644 index 00000000..5dc5dfc7 --- /dev/null +++ b/app/src/main/res/drawable/javascript_enabled.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/app/src/main/res/drawable/javascript_on.xml b/app/src/main/res/drawable/javascript_on.xml deleted file mode 100644 index 306bf042..00000000 --- a/app/src/main/res/drawable/javascript_on.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/privacy_mode.xml b/app/src/main/res/drawable/privacy_mode.xml index 8fb3beee..58101898 100644 --- a/app/src/main/res/drawable/privacy_mode.xml +++ b/app/src/main/res/drawable/privacy_mode.xml @@ -9,6 +9,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/warning.xml b/app/src/main/res/drawable/warning.xml new file mode 100644 index 00000000..9415215f --- /dev/null +++ b/app/src/main/res/drawable/warning.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/app/src/main/res/drawable/warning_on.xml b/app/src/main/res/drawable/warning_on.xml deleted file mode 100644 index 2de87737..00000000 --- a/app/src/main/res/drawable/warning_on.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - -