Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwSettings.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwSettings.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
index 3a0dbadf11f34a1c1b07f9f1b7317acc9c70d2d2..231091e21b03ac280b218961d6ff61ceb17b57b7 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -68,31 +68,31 @@ public class AwSettings {
private int mDefaultFixedFontSize = 13;
private boolean mLoadsImagesAutomatically = true;
private boolean mImagesEnabled = true;
- private boolean mJavaScriptEnabled = false;
- private boolean mAllowUniversalAccessFromFileURLs = false;
- private boolean mAllowFileAccessFromFileURLs = false;
- private boolean mJavaScriptCanOpenWindowsAutomatically = false;
- private boolean mSupportMultipleWindows = false;
+ private boolean mJavaScriptEnabled;
+ private boolean mAllowUniversalAccessFromFileURLs;
+ private boolean mAllowFileAccessFromFileURLs;
+ private boolean mJavaScriptCanOpenWindowsAutomatically;
+ private boolean mSupportMultipleWindows;
private PluginState mPluginState = PluginState.OFF;
- private boolean mAppCacheEnabled = false;
- private boolean mDomStorageEnabled = false;
- private boolean mDatabaseEnabled = false;
- private boolean mUseWideViewport = false;
- private boolean mZeroLayoutHeightDisablesViewportQuirk = false;
- private boolean mForceZeroLayoutHeight = false;
- private boolean mLoadWithOverviewMode = false;
+ private boolean mAppCacheEnabled;
+ private boolean mDomStorageEnabled;
+ private boolean mDatabaseEnabled;
+ private boolean mUseWideViewport;
+ private boolean mZeroLayoutHeightDisablesViewportQuirk;
+ private boolean mForceZeroLayoutHeight;
+ private boolean mLoadWithOverviewMode;
private boolean mMediaPlaybackRequiresUserGesture = true;
private String mDefaultVideoPosterURL;
- private float mInitialPageScalePercent = 0;
+ private float mInitialPageScalePercent;
private boolean mSpatialNavigationEnabled; // Default depends on device features.
- private boolean mEnableSupportedHardwareAcceleratedFeatures = false;
+ private boolean mEnableSupportedHardwareAcceleratedFeatures;
private int mMixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW;
- private boolean mOffscreenPreRaster = false;
+ private boolean mOffscreenPreRaster;
private int mDisabledMenuItems = MENU_ITEM_NONE;
// Although this bit is stored on AwSettings it is actually controlled via the CookieManager.
- private boolean mAcceptThirdPartyCookies = false;
+ private boolean mAcceptThirdPartyCookies;
private final boolean mSupportLegacyQuirks;
private final boolean mAllowEmptyDocumentPersistence;
@@ -108,9 +108,9 @@ public class AwSettings {
private boolean mShouldFocusFirstNode = true;
private boolean mGeolocationEnabled = true;
private boolean mAutoCompleteEnabled = true;
- private boolean mFullscreenSupported = false;
+ private boolean mFullscreenSupported;
private boolean mSupportZoom = true;
- private boolean mBuiltInZoomControls = false;
+ private boolean mBuiltInZoomControls;
private boolean mDisplayZoomControls = true;
static class LazyDefaultUserAgent{
@@ -123,10 +123,10 @@ public class AwSettings {
// For compatibility with the legacy WebView, we can only enable AppCache when the path is
// provided. However, we don't use the path, so we just check if we have received it from the
// client.
- private static boolean sAppCachePathIsSet = false;
+ private static boolean sAppCachePathIsSet;
// The native side of this object. It's lifetime is bounded by the WebContent it is attached to.
- private long mNativeAwSettings = 0;
+ private long mNativeAwSettings;
// Custom handler that queues messages to call native code on the UI thread.
private final EventHandler mEventHandler;
@@ -141,7 +141,7 @@ public class AwSettings {
// Actual UI thread handler
private Handler mHandler;
// Synchronization flag.
- private boolean mSynchronizationPending = false;
+ private boolean mSynchronizationPending;
EventHandler() {
}

Powered by Google App Engine
This is Rietveld 408576698