]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Clear the logcat after every page loads in Incognito Mode. https://redmine.stoutner...
authorSoren Stoutner <soren@stoutner.com>
Fri, 9 Oct 2020 22:04:19 +0000 (15:04 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 9 Oct 2020 22:04:19 +0000 (15:04 -0700)
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/res/layout/tab_custom_view.xml
app/src/main/res/values-night-v23/styles.xml
app/src/main/res/values-night-v27/styles.xml
app/src/main/res/values-night/colors.xml
app/src/main/res/values-night/styles.xml
app/src/main/res/values-v23/styles.xml
app/src/main/res/values-v27/styles.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/styles.xml

index 78629e559f4b2a4c487097ef91f6eebabd24d042..c49c14caacd5981eb6edc52c9f42c4cd7c440584 100644 (file)
@@ -6291,7 +6291,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     }
                 }
 
-                // Clear the cache and history if Incognito Mode is enabled.
+                // Clear the cache, history, and logcat if Incognito Mode is enabled.
                 if (incognitoModeEnabled) {
                     // Clear the cache.  `true` includes disk files.
                     nestedScrollWebView.clearCache(true);
@@ -6311,9 +6311,17 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                         // Delete the secondary `Service Worker` cache directory.
                         // A `String[]` must be used because the directory contains a space and `Runtime.exec` will not escape the string correctly otherwise.
                         Runtime.getRuntime().exec(new String[]{"rm", "-rf", privateDataDirectoryString + "/app_webview/Service Worker/"});
-                    } catch (IOException e) {
+                    } catch (IOException exception) {
                         // Do nothing if an error is thrown.
                     }
+
+                    // Clear the logcat.
+                    try {
+                        // Clear the logcat.  `-c` clears the logcat.  `-b all` clears all the buffers (instead of just crash, main, and system).
+                        Runtime.getRuntime().exec("logcat -b all -c");
+                    } catch (IOException exception) {
+                        // Do nothing.
+                    }
                 }
 
                 // Get the current page position.
index 42782a8cd808e6440a351463cdb2df6c273c4968..49f61d4b16b248210d73685c394415c9e6b59e49 100644 (file)
@@ -41,6 +41,7 @@
         android:layout_width="100dp"
         android:gravity="center_vertical"
         android:text="@string/new_tab"
+        android:textColor="?android:textColorPrimary"
         android:maxLines="2"
         android:ellipsize="end" />
 </LinearLayout>
\ No newline at end of file
index b43b6acd37a9e67b62f4beedd7d13f9909104a75..2d2f1ec055d3926a346559926152c8f31198339e 100644 (file)
@@ -36,7 +36,7 @@
         <item name="redTextColor">@color/red_900</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_400</item>
+        <item name="addTabIconTintColor">@color/white</item>
         <item name="domainSettingsIconTintColor">@color/violet_500</item>
         <item name="fabIconTintColor">@color/gray_875</item>
         <item name="findOnPageIconTintColor">@color/violet_500</item>
index 915223870ec3b7d353a7abdec49a31c58c7428fd..00b22081d1732df8caac459163c9109552b142fa 100644 (file)
@@ -38,7 +38,7 @@
         <item name="redTextColor">@color/red_900</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_400</item>
+        <item name="addTabIconTintColor">@color/white</item>
         <item name="domainSettingsIconTintColor">@color/violet_500</item>
         <item name="fabIconTintColor">@color/gray_875</item>
         <item name="findOnPageIconTintColor">@color/violet_500</item>
index 3f7d5af422c29ef287c225282f26100e38e2c697..6c07cd077b0b39b3f786f63b9ced260a11f2cad6 100644 (file)
@@ -78,6 +78,7 @@
     <color name="gray_850">#FF313131</color>
     <color name="gray_875">#FF2D2D2D</color>
     <color name="gray_900">#FF212121</color>
+    <color name="gray_925">#FF202020</color>
 
     <color name="green_50">#FFE8F5E9</color>
     <color name="green_100">#FFC8E6C9</color>
index e9690ffef97f2ab097822ab4c7261ecdd8f62145..ba21706c45ba908f778c8ea65c2ba4bd99a72c63 100644 (file)
@@ -34,7 +34,7 @@
         <item name="redTextColor">@color/red_900</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_400</item>
+        <item name="addTabIconTintColor">@color/white</item>
         <item name="domainSettingsIconTintColor">@color/violet_500</item>
         <item name="fabIconTintColor">@color/gray_875</item>
         <item name="findOnPageIconTintColor">@color/violet_500</item>
index 2956335033902531547d105b99bdb9e5ab056e2b..ff8de4435432fec19b4484313b5d434bc51a8fd7 100644 (file)
@@ -36,7 +36,7 @@
         <item name="redTextColor">@color/red_a700</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_700</item>
+        <item name="addTabIconTintColor">@color/gray_925</item>
         <item name="domainSettingsIconTintColor">@color/blue_800</item>
         <item name="fabIconTintColor">@color/white</item>
         <item name="findOnPageIconTintColor">@color/blue_800</item>
index e2d1c51122f05a5aab25c32d8c142a34a92104b7..b56b11795e1d9dce820e3760991001b86a0334bd 100644 (file)
@@ -38,7 +38,7 @@
         <item name="redTextColor">@color/red_a700</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_700</item>
+        <item name="addTabIconTintColor">@color/gray_925</item>
         <item name="domainSettingsIconTintColor">@color/blue_800</item>
         <item name="fabIconTintColor">@color/white</item>
         <item name="findOnPageIconTintColor">@color/blue_800</item>
index 7c7d15f815f925d7ff5452886f63f4faa4dac0f3..77746f32a6461fa3cf97df3d52c2f0d927ba4791 100644 (file)
@@ -78,6 +78,7 @@
     <color name="gray_850">#FF313131</color>
     <color name="gray_875">#FF2D2D2D</color>
     <color name="gray_900">#FF212121</color>
+    <color name="gray_925">#FF202020</color>
 
     <color name="green_50">#FFE8F5E9</color>
     <color name="green_100">#FFC8E6C9</color>
index e381752197b9d9d050f84820b60cec73e9b43a52..f57308ae5a988f4fd4bfe2abc2a2561233113406 100644 (file)
@@ -34,7 +34,7 @@
         <item name="redTextColor">@color/red_a700</item>
 
         <!-- Tints. -->
-        <item name="addTabIconTintColor">@color/gray_700</item>
+        <item name="addTabIconTintColor">@color/gray_925</item>
         <item name="domainSettingsIconTintColor">@color/blue_800</item>
         <item name="fabIconTintColor">@color/white</item>
         <item name="findOnPageIconTintColor">@color/blue_800</item>