[WebView] Remove dependencies on DebugFlags.

BUG:18152150
Change-Id: Ifafa06a01db4a679b9777798f3bdeda0abc3021e
diff --git a/chromium/java/com/android/webview/chromium/ContentSettingsAdapter.java b/chromium/java/com/android/webview/chromium/ContentSettingsAdapter.java
index d0d7dd3..5f623e4 100644
--- a/chromium/java/com/android/webview/chromium/ContentSettingsAdapter.java
+++ b/chromium/java/com/android/webview/chromium/ContentSettingsAdapter.java
@@ -17,7 +17,6 @@
 package com.android.webview.chromium;
 
 import android.util.Log;
-import android.webkit.DebugFlags;
 import android.webkit.WebSettings.LayoutAlgorithm;
 import android.webkit.WebSettings.PluginState;
 import android.webkit.WebSettings.RenderPriority;
@@ -29,6 +28,7 @@
 public class ContentSettingsAdapter extends android.webkit.WebSettings {
 
     private static final String LOGTAG = ContentSettingsAdapter.class.getSimpleName();
+    private static final boolean TRACE = false;
 
     private AwSettings mAwSettings;
 
@@ -55,7 +55,7 @@
 
     @Override
     public void setSupportZoom(boolean support) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setSupportZoom=" + support);
+        if (TRACE) Log.d(LOGTAG, "setSupportZoom=" + support);
         mAwSettings.setSupportZoom(support);
     }
 
@@ -66,7 +66,7 @@
 
     @Override
     public void setBuiltInZoomControls(boolean enabled) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setBuiltInZoomControls=" + enabled);
+        if (TRACE) Log.d(LOGTAG, "setBuiltInZoomControls=" + enabled);
         mAwSettings.setBuiltInZoomControls(enabled);
     }
 
@@ -77,7 +77,7 @@
 
     @Override
     public void setDisplayZoomControls(boolean enabled) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDisplayZoomControls=" + enabled);
+        if (TRACE) Log.d(LOGTAG, "setDisplayZoomControls=" + enabled);
         mAwSettings.setDisplayZoomControls(enabled);
     }
 
@@ -88,7 +88,7 @@
 
     @Override
     public void setAllowFileAccess(boolean allow) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAllowFileAccess=" + allow);
+        if (TRACE) Log.d(LOGTAG, "setAllowFileAccess=" + allow);
         mAwSettings.setAllowFileAccess(allow);
     }
 
@@ -99,7 +99,7 @@
 
     @Override
     public void setAllowContentAccess(boolean allow) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAllowContentAccess=" + allow);
+        if (TRACE) Log.d(LOGTAG, "setAllowContentAccess=" + allow);
         mAwSettings.setAllowContentAccess(allow);
     }
 
@@ -110,7 +110,7 @@
 
     @Override
     public void setLoadWithOverviewMode(boolean overview) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setLoadWithOverviewMode=" + overview);
+        if (TRACE) Log.d(LOGTAG, "setLoadWithOverviewMode=" + overview);
         mAwSettings.setLoadWithOverviewMode(overview);
     }
 
@@ -121,7 +121,7 @@
 
     @Override
     public void setAcceptThirdPartyCookies(boolean accept) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAcceptThirdPartyCookies=" + accept);
+        if (TRACE) Log.d(LOGTAG, "setAcceptThirdPartyCookies=" + accept);
         mAwSettings.setAcceptThirdPartyCookies(accept);
     }
 
@@ -154,7 +154,7 @@
 
     @Override
     public void setSaveFormData(boolean save) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setSaveFormData=" + save);
+        if (TRACE) Log.d(LOGTAG, "setSaveFormData=" + save);
         mAwSettings.setSaveFormData(save);
     }
 
@@ -176,7 +176,7 @@
 
     @Override
     public synchronized void setTextZoom(int textZoom) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setTextZoom=" + textZoom);
+        if (TRACE) Log.d(LOGTAG, "setTextZoom=" + textZoom);
         mAwSettings.setTextZoom(textZoom);
     }
 
@@ -227,7 +227,7 @@
 
     @Override
     public synchronized void setUseWideViewPort(boolean use) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setUseWideViewPort=" + use);
+        if (TRACE) Log.d(LOGTAG, "setUseWideViewPort=" + use);
         mAwSettings.setUseWideViewPort(use);
     }
 
@@ -238,7 +238,7 @@
 
     @Override
     public synchronized void setSupportMultipleWindows(boolean support) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setSupportMultipleWindows=" + support);
+        if (TRACE) Log.d(LOGTAG, "setSupportMultipleWindows=" + support);
         mAwSettings.setSupportMultipleWindows(support);
     }
 
@@ -273,7 +273,7 @@
 
     @Override
     public synchronized void setStandardFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setStandardFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setStandardFontFamily=" + font);
         mAwSettings.setStandardFontFamily(font);
     }
 
@@ -284,7 +284,7 @@
 
     @Override
     public synchronized void setFixedFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setFixedFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setFixedFontFamily=" + font);
         mAwSettings.setFixedFontFamily(font);
     }
 
@@ -295,7 +295,7 @@
 
     @Override
     public synchronized void setSansSerifFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setSansSerifFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setSansSerifFontFamily=" + font);
         mAwSettings.setSansSerifFontFamily(font);
     }
 
@@ -306,7 +306,7 @@
 
     @Override
     public synchronized void setSerifFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setSerifFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setSerifFontFamily=" + font);
         mAwSettings.setSerifFontFamily(font);
     }
 
@@ -317,7 +317,7 @@
 
     @Override
     public synchronized void setCursiveFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setCursiveFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setCursiveFontFamily=" + font);
         mAwSettings.setCursiveFontFamily(font);
     }
 
@@ -328,7 +328,7 @@
 
     @Override
     public synchronized void setFantasyFontFamily(String font) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setFantasyFontFamily=" + font);
+        if (TRACE) Log.d(LOGTAG, "setFantasyFontFamily=" + font);
         mAwSettings.setFantasyFontFamily(font);
     }
 
@@ -339,7 +339,7 @@
 
     @Override
     public synchronized void setMinimumFontSize(int size) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setMinimumFontSize=" + size);
+        if (TRACE) Log.d(LOGTAG, "setMinimumFontSize=" + size);
         mAwSettings.setMinimumFontSize(size);
     }
 
@@ -350,7 +350,7 @@
 
     @Override
     public synchronized void setMinimumLogicalFontSize(int size) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setMinimumLogicalFontSize=" + size);
+        if (TRACE) Log.d(LOGTAG, "setMinimumLogicalFontSize=" + size);
         mAwSettings.setMinimumLogicalFontSize(size);
     }
 
@@ -361,7 +361,7 @@
 
     @Override
     public synchronized void setDefaultFontSize(int size) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDefaultFontSize=" + size);
+        if (TRACE) Log.d(LOGTAG, "setDefaultFontSize=" + size);
         mAwSettings.setDefaultFontSize(size);
     }
 
@@ -372,7 +372,7 @@
 
     @Override
     public synchronized void setDefaultFixedFontSize(int size) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDefaultFixedFontSize=" + size);
+        if (TRACE) Log.d(LOGTAG, "setDefaultFixedFontSize=" + size);
         mAwSettings.setDefaultFixedFontSize(size);
     }
 
@@ -383,7 +383,7 @@
 
     @Override
     public synchronized void setLoadsImagesAutomatically(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setLoadsImagesAutomatically=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setLoadsImagesAutomatically=" + flag);
         mAwSettings.setLoadsImagesAutomatically(flag);
     }
 
@@ -394,7 +394,7 @@
 
     @Override
     public synchronized void setBlockNetworkImage(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setBlockNetworkImage=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setBlockNetworkImage=" + flag);
         mAwSettings.setImagesEnabled(!flag);
     }
 
@@ -405,7 +405,7 @@
 
     @Override
     public synchronized void setBlockNetworkLoads(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setBlockNetworkLoads=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setBlockNetworkLoads=" + flag);
         mAwSettings.setBlockNetworkLoads(flag);
     }
 
@@ -416,31 +416,31 @@
 
     @Override
     public synchronized void setJavaScriptEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setJavaScriptEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setJavaScriptEnabled=" + flag);
         mAwSettings.setJavaScriptEnabled(flag);
     }
 
     @Override
     public void setAllowUniversalAccessFromFileURLs(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAllowUniversalAccessFromFileURLs=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setAllowUniversalAccessFromFileURLs=" + flag);
         mAwSettings.setAllowUniversalAccessFromFileURLs(flag);
     }
 
     @Override
     public void setAllowFileAccessFromFileURLs(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAllowFileAccessFromFileURLs=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setAllowFileAccessFromFileURLs=" + flag);
         mAwSettings.setAllowFileAccessFromFileURLs(flag);
     }
 
     @Override
     public synchronized void setPluginsEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setPluginsEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setPluginsEnabled=" + flag);
         mAwSettings.setPluginsEnabled(flag);
     }
 
     @Override
     public synchronized void setPluginState(PluginState state) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setPluginState=" + state);
+        if (TRACE) Log.d(LOGTAG, "setPluginState=" + state);
         mAwSettings.setPluginState(state);
     }
 
@@ -456,13 +456,13 @@
 
     @Override
     public synchronized void setAppCacheEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAppCacheEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setAppCacheEnabled=" + flag);
         mAwSettings.setAppCacheEnabled(flag);
     }
 
     @Override
     public synchronized void setAppCachePath(String appCachePath) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setAppCachePath=" + appCachePath);
+        if (TRACE) Log.d(LOGTAG, "setAppCachePath=" + appCachePath);
         mAwSettings.setAppCachePath(appCachePath);
     }
 
@@ -473,13 +473,13 @@
 
     @Override
     public synchronized void setDatabaseEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDatabaseEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setDatabaseEnabled=" + flag);
         mAwSettings.setDatabaseEnabled(flag);
     }
 
     @Override
     public synchronized void setDomStorageEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDomStorageEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setDomStorageEnabled=" + flag);
         mAwSettings.setDomStorageEnabled(flag);
     }
 
@@ -501,7 +501,7 @@
 
     @Override
     public synchronized void setGeolocationEnabled(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setGeolocationEnabled=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setGeolocationEnabled=" + flag);
         mAwSettings.setGeolocationEnabled(flag);
     }
 
@@ -532,7 +532,7 @@
 
     @Override
     public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setJavaScriptCanOpenWindowsAutomatically=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setJavaScriptCanOpenWindowsAutomatically=" + flag);
         mAwSettings.setJavaScriptCanOpenWindowsAutomatically(flag);
     }
 
@@ -543,7 +543,7 @@
 
     @Override
     public synchronized void setDefaultTextEncodingName(String encoding) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setDefaultTextEncodingName=" + encoding);
+        if (TRACE) Log.d(LOGTAG, "setDefaultTextEncodingName=" + encoding);
         mAwSettings.setDefaultTextEncodingName(encoding);
     }
 
@@ -554,7 +554,7 @@
 
     @Override
     public synchronized void setUserAgentString(String ua) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setUserAgentString=" + ua);
+        if (TRACE) Log.d(LOGTAG, "setUserAgentString=" + ua);
         mAwSettings.setUserAgentString(ua);
     }
 
@@ -565,7 +565,7 @@
 
     @Override
     public void setNeedInitialFocus(boolean flag) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setNeedInitialFocus=" + flag);
+        if (TRACE) Log.d(LOGTAG, "setNeedInitialFocus=" + flag);
         mAwSettings.setShouldFocusFirstNode(flag);
     }
 
@@ -576,7 +576,7 @@
 
     @Override
     public void setCacheMode(int mode) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setCacheMode=" + mode);
+        if (TRACE) Log.d(LOGTAG, "setCacheMode=" + mode);
         mAwSettings.setCacheMode(mode);
     }
 
@@ -587,7 +587,7 @@
 
     @Override
     public void setMediaPlaybackRequiresUserGesture(boolean require) {
-        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setMediaPlaybackRequiresUserGesture=" + require);
+        if (TRACE) Log.d(LOGTAG, "setMediaPlaybackRequiresUserGesture=" + require);
         mAwSettings.setMediaPlaybackRequiresUserGesture(require);
     }
 
diff --git a/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java b/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
index 8d92630..24c0ebc 100644
--- a/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
+++ b/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
@@ -95,7 +95,7 @@
     // TAG is chosen for consistency with classic webview tracing.
     private static final String TAG = "WebViewCallback";
     // Enables API callback tracing
-    private static final boolean TRACE = android.webkit.DebugFlags.TRACE_CALLBACK;
+    private static final boolean TRACE = false;
     // The WebView instance that this adapter is serving.
     private final WebView mWebView;
     // The WebViewClient instance that was passed to WebView.setWebViewClient().