X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FMainWebViewActivity.java;h=e72865220028fe868ba17cddb287a4eb881421c9;hp=b82667260b9d8c1f8e0f7622e1a445cadf2aa3b6;hb=e3ed631a52f5e8eac2d5c938b2d475ed6c9362bb;hpb=881c9f34b4eceb0ab41446328bc6e8e8dc1c00f0 diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index b8266726..e7286522 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -122,6 +122,9 @@ import java.util.Set; public class MainWebViewActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, CreateHomeScreenShortcutDialog.CreateHomeScreenSchortcutListener, SslCertificateErrorDialog.SslCertificateErrorListener, DownloadFileDialog.DownloadFileListener, DownloadImageDialog.DownloadImageListener, UrlHistoryDialog.UrlHistoryListener { + // `darkTheme` is public static so it can be accessed from `AboutActivity`. It is also used in `onCreate()`, `applyAppSettings()`, and `applyDomainSettings()`. + public static boolean darkTheme; + // `favoriteIconBitmap` is public static so it can be accessed from `CreateHomeScreenShortcutDialog`, `BookmarksActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`, `ViewSslCertificateDialog`. // It is also used in `onCreate()`, `onCreateHomeScreenShortcutCreate()`, and `applyDomainSettings`. public static Bitmap favoriteIconBitmap; @@ -292,9 +295,6 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // `mainWebViewRelativeLayout` is used in `onCreate()` and `onNavigationItemSelected()`. private RelativeLayout mainWebViewRelativeLayout; - // `darkTheme` is used in `onCreate()`, `applyAppSettings()`, and `applyDomainSettings()`. - private boolean darkTheme; - @Override // Remove Android Studio's warning about the dangers of using SetJavaScriptEnabled. The whole premise of Privacy Browser is built around an understanding of these dangers. @SuppressLint("SetJavaScriptEnabled") @@ -317,7 +317,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // Run the default commands. super.onCreate(savedInstanceState); - // Set the content view according to the theme.. + // Set the content view according to the theme. if (darkTheme) { setContentView(R.layout.main_drawerlayout_dark); } else {