Remove references to android.util.Config
The semantics of Config.DEBUG will be changing soon, and all other Config.* fields will become deprecated/hidden. BUG=1780938
This commit is contained in:
@@ -24,7 +24,6 @@ import android.net.WebAddress;
|
||||
import android.net.http.SslCertificate;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
|
||||
@@ -120,7 +119,7 @@ class BrowserFrame extends Handler {
|
||||
mDatabase = WebViewDatabase.getInstance(context);
|
||||
mWebViewCore = w;
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "BrowserFrame constructor: this=" + this);
|
||||
}
|
||||
}
|
||||
@@ -331,7 +330,7 @@ class BrowserFrame extends Handler {
|
||||
switch (msg.what) {
|
||||
case FRAME_COMPLETED: {
|
||||
if (mSettings.getSavePassword() && hasPasswordField()) {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertNotNull(mCallbackProxy.getBackForwardList()
|
||||
.getCurrentItem());
|
||||
}
|
||||
@@ -480,7 +479,7 @@ class BrowserFrame extends Handler {
|
||||
}
|
||||
if (mSettings.getSavePassword() && hasPasswordField()) {
|
||||
try {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertNotNull(mCallbackProxy.getBackForwardList()
|
||||
.getCurrentItem());
|
||||
}
|
||||
@@ -528,7 +527,7 @@ class BrowserFrame extends Handler {
|
||||
// is this resource the main-frame top-level page?
|
||||
boolean isMainFramePage = mIsMainFrame;
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "startLoadingResource: url=" + url + ", method="
|
||||
+ method + ", postData=" + postData + ", isHighPriority="
|
||||
+ isHighPriority + ", isMainFramePage=" + isMainFramePage);
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.webkit;
|
||||
import android.content.Context;
|
||||
import android.net.http.Headers;
|
||||
import android.os.FileUtils;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -322,7 +321,7 @@ public final class CacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "getCacheFile for url " + url);
|
||||
}
|
||||
|
||||
@@ -416,7 +415,7 @@ public final class CacheManager {
|
||||
|
||||
mDataBase.addCache(url, cacheRet);
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "saveCacheFile for url " + url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Browser;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -822,7 +821,7 @@ class CallbackProxy extends Handler {
|
||||
String password, Message resumeMsg) {
|
||||
// resumeMsg should be null at this point because we want to create it
|
||||
// within the CallbackProxy.
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
junit.framework.Assert.assertNull(resumeMsg);
|
||||
}
|
||||
resumeMsg = obtainMessage(NOTIFY);
|
||||
|
||||
@@ -18,7 +18,6 @@ package android.webkit;
|
||||
|
||||
import android.net.ParseException;
|
||||
import android.net.WebAddress;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -263,7 +262,7 @@ public final class CookieManager {
|
||||
if (!mAcceptCookie || uri == null) {
|
||||
return;
|
||||
}
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "setCookie: uri: " + uri + " value: " + value);
|
||||
}
|
||||
|
||||
@@ -428,12 +427,12 @@ public final class CookieManager {
|
||||
}
|
||||
}
|
||||
if (ret.length() > 0) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "getCookie: uri: " + uri + " value: " + ret);
|
||||
}
|
||||
return ret.toString();
|
||||
} else {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "getCookie: uri: " + uri
|
||||
+ " But can't find cookie.");
|
||||
}
|
||||
@@ -589,7 +588,7 @@ public final class CookieManager {
|
||||
Iterator<ArrayList<Cookie>> listIter = cookieLists.iterator();
|
||||
while (listIter.hasNext() && count < MAX_RAM_COOKIES_COUNT) {
|
||||
ArrayList<Cookie> list = listIter.next();
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Iterator<Cookie> iter = list.iterator();
|
||||
while (iter.hasNext() && count < MAX_RAM_COOKIES_COUNT) {
|
||||
Cookie cookie = iter.next();
|
||||
@@ -609,7 +608,7 @@ public final class CookieManager {
|
||||
|
||||
ArrayList<Cookie> retlist = new ArrayList<Cookie>();
|
||||
if (mapSize >= MAX_RAM_DOMAIN_COUNT || count >= MAX_RAM_COOKIES_COUNT) {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Log.v(LOGTAG, count + " cookies used " + byteCount
|
||||
+ " bytes with " + mapSize + " domains");
|
||||
}
|
||||
@@ -617,7 +616,7 @@ public final class CookieManager {
|
||||
int toGo = mapSize / 10 + 1;
|
||||
while (toGo-- > 0){
|
||||
String domain = domains[toGo].toString();
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "delete domain: " + domain
|
||||
+ " from RAM cache");
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.webkit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.webkit.CookieManager.Cookie;
|
||||
|
||||
@@ -162,7 +161,7 @@ public final class CookieSyncManager extends WebSyncManager {
|
||||
}
|
||||
|
||||
protected void syncFromRamToFlash() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash STARTS");
|
||||
}
|
||||
|
||||
@@ -179,7 +178,7 @@ public final class CookieSyncManager extends WebSyncManager {
|
||||
CookieManager.getInstance().deleteLRUDomain();
|
||||
syncFromRamToFlash(lruList);
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash DONE");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package android.webkit;
|
||||
|
||||
import android.net.http.EventHandler;
|
||||
import android.net.http.RequestHandle;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.webkit.CacheManager.CacheResult;
|
||||
|
||||
@@ -121,7 +120,7 @@ class FrameLoader {
|
||||
} else if (handleLocalFile(url, mListener, mSettings)) {
|
||||
return true;
|
||||
}
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "FrameLoader.executeLoad: url protocol not supported:"
|
||||
+ mListener.url());
|
||||
}
|
||||
@@ -181,7 +180,7 @@ class FrameLoader {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "FrameLoader: http " + mMethod + " load for: "
|
||||
+ mListener.url());
|
||||
}
|
||||
@@ -212,7 +211,7 @@ class FrameLoader {
|
||||
* setup a load from the byte stream in a CacheResult.
|
||||
*/
|
||||
private void startCacheLoad(CacheResult result) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "FrameLoader: loading from cache: "
|
||||
+ mListener.url());
|
||||
}
|
||||
@@ -286,7 +285,7 @@ class FrameLoader {
|
||||
// of it's state. If it is not in the cache, then go to the
|
||||
// network.
|
||||
case WebSettings.LOAD_CACHE_ELSE_NETWORK: {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "FrameLoader: checking cache: "
|
||||
+ mListener.url());
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package android.webkit;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
|
||||
final class JWebCoreJavaBridge extends Handler {
|
||||
@@ -156,7 +155,7 @@ final class JWebCoreJavaBridge extends Handler {
|
||||
* @param timemillis The relative time when the timer should fire
|
||||
*/
|
||||
private void setSharedTimer(long timemillis) {
|
||||
if (Config.LOGV) Log.v(LOGTAG, "setSharedTimer " + timemillis);
|
||||
if (WebView.LOGV_ENABLED) Log.v(LOGTAG, "setSharedTimer " + timemillis);
|
||||
|
||||
if (timemillis <= 0) {
|
||||
// we don't accumulate the sharedTimer unless it is a delayed
|
||||
@@ -180,7 +179,7 @@ final class JWebCoreJavaBridge extends Handler {
|
||||
* Stop the shared timer.
|
||||
*/
|
||||
private void stopSharedTimer() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "stopSharedTimer removing all timers");
|
||||
}
|
||||
removeMessages(TIMER_MESSAGE);
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.net.http.SslCertificate;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.webkit.CacheManager.CacheResult;
|
||||
|
||||
@@ -134,7 +133,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
|
||||
LoadListener(Context context, BrowserFrame frame, String url,
|
||||
int nativeLoader, boolean synchronous, boolean isMainPageLoader) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener constructor url=" + url);
|
||||
}
|
||||
mContext = context;
|
||||
@@ -285,7 +284,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* directly
|
||||
*/
|
||||
public void headers(Headers headers) {
|
||||
if (Config.LOGV) Log.v(LOGTAG, "LoadListener.headers");
|
||||
if (WebView.LOGV_ENABLED) Log.v(LOGTAG, "LoadListener.headers");
|
||||
sendMessageInternal(obtainMessage(MSG_CONTENT_HEADERS, headers));
|
||||
}
|
||||
|
||||
@@ -432,7 +431,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
*/
|
||||
public void status(int majorVersion, int minorVersion,
|
||||
int code, /* Status-Code value */ String reasonPhrase) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener: from: " + mUrl
|
||||
+ " major: " + majorVersion
|
||||
+ " minor: " + minorVersion
|
||||
@@ -489,7 +488,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* directly
|
||||
*/
|
||||
public void error(int id, String description) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.error url:" +
|
||||
url() + " id:" + id + " description:" + description);
|
||||
}
|
||||
@@ -517,7 +516,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* mDataBuilder is a thread-safe structure.
|
||||
*/
|
||||
public void data(byte[] data, int length) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.data(): url: " + url());
|
||||
}
|
||||
|
||||
@@ -555,7 +554,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* directly
|
||||
*/
|
||||
public void endData() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.endData(): url: " + url());
|
||||
}
|
||||
sendMessageInternal(obtainMessage(MSG_CONTENT_FINISHED));
|
||||
@@ -608,7 +607,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
// before calling it.
|
||||
if (mCacheLoader != null) {
|
||||
mCacheLoader.load();
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener cache load url=" + url());
|
||||
}
|
||||
return;
|
||||
@@ -658,7 +657,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
CacheManager.HEADER_KEY_IFNONEMATCH) &&
|
||||
!headers.containsKey(
|
||||
CacheManager.HEADER_KEY_IFMODIFIEDSINCE)) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "FrameLoader: HTTP URL in cache " +
|
||||
"and usable: " + url());
|
||||
}
|
||||
@@ -677,7 +676,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* directly
|
||||
*/
|
||||
public void handleSslErrorRequest(SslError error) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG,
|
||||
"LoadListener.handleSslErrorRequest(): url:" + url() +
|
||||
" primary error: " + error.getPrimaryError() +
|
||||
@@ -743,7 +742,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* are null, cancel the request.
|
||||
*/
|
||||
void handleAuthResponse(String username, String password) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.handleAuthResponse: url: " + mUrl
|
||||
+ " username: " + username
|
||||
+ " password: " + password);
|
||||
@@ -840,7 +839,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
}
|
||||
|
||||
void attachRequestHandle(RequestHandle requestHandle) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.attachRequestHandle(): " +
|
||||
"requestHandle: " + requestHandle);
|
||||
}
|
||||
@@ -848,7 +847,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
}
|
||||
|
||||
void detachRequestHandle() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.detachRequestHandle(): " +
|
||||
"requestHandle: " + mRequestHandle);
|
||||
}
|
||||
@@ -887,7 +886,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
*/
|
||||
static boolean willLoadFromCache(String url) {
|
||||
boolean inCache = CacheManager.getCacheFile(url, null) != null;
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "willLoadFromCache: " + url + " in cache: " +
|
||||
inCache);
|
||||
}
|
||||
@@ -1057,7 +1056,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* EventHandler's method call.
|
||||
*/
|
||||
public void cancel() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
if (mRequestHandle == null) {
|
||||
Log.v(LOGTAG, "LoadListener.cancel(): no requestHandle");
|
||||
} else {
|
||||
@@ -1189,7 +1188,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
tearDown();
|
||||
}
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.onRedirect(): redirect to: " +
|
||||
redirectTo);
|
||||
}
|
||||
@@ -1203,7 +1202,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
Pattern.compile("^((?:[xX]-)?[a-zA-Z\\*]+/[\\w\\+\\*-]+[\\.[\\w\\+-]+]*)$");
|
||||
|
||||
private void parseContentTypeHeader(String contentType) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "LoadListener.parseContentTypeHeader: " +
|
||||
"contentType: " + contentType);
|
||||
}
|
||||
@@ -1390,7 +1389,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
*/
|
||||
private String guessMimeTypeFromExtension() {
|
||||
// PENDING: need to normalize url
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "guessMimeTypeFromExtension: mURL = " + mUrl);
|
||||
}
|
||||
|
||||
@@ -1425,7 +1424,7 @@ class LoadListener extends Handler implements EventHandler {
|
||||
* Cycle through our messages for synchronous loads.
|
||||
*/
|
||||
/* package */ void loadSynchronousMessages() {
|
||||
if (Config.DEBUG && !mSynchronous) {
|
||||
if (WebView.DEBUG && !mSynchronous) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
// Note: this can be called twice if it is a synchronous network load,
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.content.Context;
|
||||
import android.net.http.*;
|
||||
import android.os.*;
|
||||
import android.util.Log;
|
||||
import android.util.Config;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
@@ -133,7 +132,7 @@ class Network {
|
||||
* XXX: Must be created in the same thread as WebCore!!!!!
|
||||
*/
|
||||
private Network(Context context) {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertTrue(Thread.currentThread().
|
||||
getName().equals(WebViewCore.THREAD_NAME));
|
||||
}
|
||||
@@ -233,7 +232,7 @@ class Network {
|
||||
* connecting through the proxy.
|
||||
*/
|
||||
public synchronized void setProxyUsername(String proxyUsername) {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertTrue(isValidProxySet());
|
||||
}
|
||||
|
||||
@@ -253,7 +252,7 @@ class Network {
|
||||
* connecting through the proxy.
|
||||
*/
|
||||
public synchronized void setProxyPassword(String proxyPassword) {
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertTrue(isValidProxySet());
|
||||
}
|
||||
|
||||
@@ -267,7 +266,7 @@ class Network {
|
||||
* @return True iff succeeds.
|
||||
*/
|
||||
public boolean saveState(Bundle outState) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "Network.saveState()");
|
||||
}
|
||||
|
||||
@@ -281,7 +280,7 @@ class Network {
|
||||
* @return True iff succeeds.
|
||||
*/
|
||||
public boolean restoreState(Bundle inState) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "Network.restoreState()");
|
||||
}
|
||||
|
||||
@@ -301,7 +300,7 @@ class Network {
|
||||
* @param loader The loader that resulted in SSL errors.
|
||||
*/
|
||||
public void handleSslErrorRequest(LoadListener loader) {
|
||||
if (Config.DEBUG) Assert.assertNotNull(loader);
|
||||
if (WebView.DEBUG) Assert.assertNotNull(loader);
|
||||
if (loader != null) {
|
||||
mSslErrorHandler.handleSslErrorRequest(loader);
|
||||
}
|
||||
@@ -314,7 +313,7 @@ class Network {
|
||||
* authentication request.
|
||||
*/
|
||||
public void handleAuthRequest(LoadListener loader) {
|
||||
if (Config.DEBUG) Assert.assertNotNull(loader);
|
||||
if (WebView.DEBUG) Assert.assertNotNull(loader);
|
||||
if (loader != null) {
|
||||
mHttpAuthHandler.handleAuthRequest(loader);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.net.http.SslError;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.LinkedList;
|
||||
@@ -121,7 +120,7 @@ public class SslErrorHandler extends Handler {
|
||||
* Handles SSL error(s) on the way up to the user.
|
||||
*/
|
||||
/* package */ synchronized void handleSslErrorRequest(LoadListener loader) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "SslErrorHandler.handleSslErrorRequest(): " +
|
||||
"url=" + loader.url());
|
||||
}
|
||||
@@ -158,14 +157,14 @@ public class SslErrorHandler extends Handler {
|
||||
|
||||
SslError error = loader.sslError();
|
||||
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertNotNull(error);
|
||||
}
|
||||
|
||||
int primary = error.getPrimaryError();
|
||||
String host = loader.host();
|
||||
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertTrue(host != null && primary != 0);
|
||||
}
|
||||
|
||||
@@ -206,11 +205,11 @@ public class SslErrorHandler extends Handler {
|
||||
*/
|
||||
/* package */ synchronized void handleSslErrorResponse(boolean proceed) {
|
||||
LoadListener loader = mLoaderQueue.poll();
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertNotNull(loader);
|
||||
}
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "SslErrorHandler.handleSslErrorResponse():"
|
||||
+ " proceed: " + proceed
|
||||
+ " url:" + loader.url());
|
||||
@@ -222,7 +221,7 @@ public class SslErrorHandler extends Handler {
|
||||
int primary = loader.sslError().getPrimaryError();
|
||||
String host = loader.host();
|
||||
|
||||
if (Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
Assert.assertTrue(host != null && primary != 0);
|
||||
}
|
||||
boolean hasKey = mSslPrefTable.containsKey(host);
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.net.http.EventHandler;
|
||||
import android.net.http.Headers;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -114,7 +113,7 @@ abstract class StreamLoader extends Handler {
|
||||
* @see android.os.Handler#handleMessage(android.os.Message)
|
||||
*/
|
||||
public void handleMessage(Message msg) {
|
||||
if (Config.DEBUG && mHandler.isSynchronous()) {
|
||||
if (WebView.DEBUG && mHandler.isSynchronous()) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
switch(msg.what) {
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.regex.Pattern;
|
||||
import android.net.Uri;
|
||||
import android.net.ParseException;
|
||||
import android.net.WebAddress;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
|
||||
public final class URLUtil {
|
||||
@@ -62,7 +61,7 @@ public final class URLUtil {
|
||||
webAddress = new WebAddress(inUrl);
|
||||
} catch (ParseException ex) {
|
||||
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "smartUrlFilter: failed to parse url = " + inUrl);
|
||||
}
|
||||
return retVal;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package android.webkit;
|
||||
|
||||
import android.util.Config;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -138,7 +137,7 @@ public class WebBackForwardList implements Cloneable, Serializable {
|
||||
// when removing the first item, we can assert that the index is 0.
|
||||
// This lets us change the current index without having to query the
|
||||
// native BackForwardList.
|
||||
if (Config.DEBUG && (index != 0)) {
|
||||
if (WebView.DEBUG && (index != 0)) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
final WebHistoryItem h = mArray.remove(index);
|
||||
|
||||
@@ -1097,7 +1097,7 @@ public class WebSettings {
|
||||
/*package*/
|
||||
synchronized void syncSettingsAndCreateHandler(BrowserFrame frame) {
|
||||
mBrowserFrame = frame;
|
||||
if (android.util.Config.DEBUG) {
|
||||
if (WebView.DEBUG) {
|
||||
junit.framework.Assert.assertTrue(frame.mNativeFrame != 0);
|
||||
}
|
||||
nativeSync(frame.mNativeFrame);
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Process;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
|
||||
abstract class WebSyncManager implements Runnable {
|
||||
@@ -48,7 +47,7 @@ abstract class WebSyncManager implements Runnable {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
if (msg.what == SYNC_MESSAGE) {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "*** WebSyncManager sync ***");
|
||||
}
|
||||
syncFromRamToFlash();
|
||||
@@ -95,7 +94,7 @@ abstract class WebSyncManager implements Runnable {
|
||||
* sync() forces sync manager to sync now
|
||||
*/
|
||||
public void sync() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "*** WebSyncManager sync ***");
|
||||
}
|
||||
if (mHandler == null) {
|
||||
@@ -110,7 +109,7 @@ abstract class WebSyncManager implements Runnable {
|
||||
* resetSync() resets sync manager's timer
|
||||
*/
|
||||
public void resetSync() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "*** WebSyncManager resetSync ***");
|
||||
}
|
||||
if (mHandler == null) {
|
||||
@@ -125,7 +124,7 @@ abstract class WebSyncManager implements Runnable {
|
||||
* startSync() requests sync manager to start sync
|
||||
*/
|
||||
public void startSync() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "*** WebSyncManager startSync ***, Ref count:" +
|
||||
mStartSyncRefCount);
|
||||
}
|
||||
@@ -143,7 +142,7 @@ abstract class WebSyncManager implements Runnable {
|
||||
* the queue to break the sync loop
|
||||
*/
|
||||
public void stopSync() {
|
||||
if (Config.LOGV) {
|
||||
if (WebView.LOGV_ENABLED) {
|
||||
Log.v(LOGTAG, "*** WebSyncManager stopSync ***, Ref count:" +
|
||||
mStartSyncRefCount);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ import android.text.IClipboard;
|
||||
import android.text.Selection;
|
||||
import android.text.Spannable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Config;
|
||||
import android.util.EventLog;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@@ -110,7 +109,7 @@ public class WebView extends AbsoluteLayout
|
||||
// keep debugging parameters near the top of the file
|
||||
static final String LOGTAG = "webview";
|
||||
static final boolean DEBUG = false;
|
||||
static final boolean LOGV_ENABLED = DEBUG ? Config.LOGD : Config.LOGV;
|
||||
static final boolean LOGV_ENABLED = DEBUG;
|
||||
|
||||
private class ExtendedZoomControls extends FrameLayout {
|
||||
public ExtendedZoomControls(Context context, AttributeSet attrs) {
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Process;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.util.SparseBooleanArray;
|
||||
import android.view.KeyEvent;
|
||||
@@ -43,7 +42,7 @@ final class WebViewCore {
|
||||
|
||||
private static final String LOGTAG = "webcore";
|
||||
static final boolean DEBUG = false;
|
||||
static final boolean LOGV_ENABLED = DEBUG ? Config.LOGD : Config.LOGV;
|
||||
static final boolean LOGV_ENABLED = DEBUG;
|
||||
|
||||
static {
|
||||
// Load libwebcore during static initialization. This happens in the
|
||||
|
||||
Reference in New Issue
Block a user