Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e5c150e authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Centralized debug flags and enabled more granular control of debug settings.

parent 93e50888
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ class BrowserFrame extends Handler {
        mDatabase = WebViewDatabase.getInstance(context);
        mWebViewCore = w;

        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.BROWSER_FRAME) {
            Log.v(LOGTAG, "BrowserFrame constructor: this=" + this);
        }
    }
@@ -343,7 +343,7 @@ class BrowserFrame extends Handler {
        switch (msg.what) {
            case FRAME_COMPLETED: {
                if (mSettings.getSavePassword() && hasPasswordField()) {
                    if (WebView.DEBUG) {
                    if (DebugFlags.BROWSER_FRAME) {
                        Assert.assertNotNull(mCallbackProxy.getBackForwardList()
                                .getCurrentItem());
                    }
@@ -492,7 +492,7 @@ class BrowserFrame extends Handler {
            }
            if (mSettings.getSavePassword() && hasPasswordField()) {
                try {
                    if (WebView.DEBUG) {
                    if (DebugFlags.BROWSER_FRAME) {
                        Assert.assertNotNull(mCallbackProxy.getBackForwardList()
                                .getCurrentItem());
                    }
@@ -540,7 +540,7 @@ class BrowserFrame extends Handler {
        // is this resource the main-frame top-level page?
        boolean isMainFramePage = mIsMainFrame;

        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.BROWSER_FRAME) {
            Log.v(LOGTAG, "startLoadingResource: url=" + url + ", method="
                    + method + ", postData=" + postData + ", isHighPriority="
                    + isHighPriority + ", isMainFramePage=" + isMainFramePage);
+2 −2
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ public final class CacheManager {
            }
        }

        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.CACHE_MANAGER) {
            Log.v(LOGTAG, "getCacheFile for url " + url);
        }

@@ -422,7 +422,7 @@ public final class CacheManager {

        mDataBase.addCache(url, cacheRet);

        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.CACHE_MANAGER) {
            Log.v(LOGTAG, "saveCacheFile for url " + url);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -852,7 +852,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 (WebView.DEBUG) {
        if (DebugFlags.CALLBACK_PROXY) {
            junit.framework.Assert.assertNull(resumeMsg);
        }
        resumeMsg = obtainMessage(NOTIFY);
+6 −6
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ public final class CookieManager {
        if (!mAcceptCookie || uri == null) {
            return;
        }
        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.COOKIE_MANAGER) {
            Log.v(LOGTAG, "setCookie: uri: " + uri + " value: " + value);
        }

@@ -427,12 +427,12 @@ public final class CookieManager {
            }
        }
        if (ret.length() > 0) {
            if (WebView.LOGV_ENABLED) {
            if (DebugFlags.COOKIE_MANAGER) {
                Log.v(LOGTAG, "getCookie: uri: " + uri + " value: " + ret);
            }
            return ret.toString();
        } else {
            if (WebView.LOGV_ENABLED) {
            if (DebugFlags.COOKIE_MANAGER) {
                Log.v(LOGTAG, "getCookie: uri: " + uri
                        + " But can't find cookie.");
            }
@@ -588,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 (WebView.DEBUG) {
                if (DebugFlags.COOKIE_MANAGER) {
                    Iterator<Cookie> iter = list.iterator();
                    while (iter.hasNext() && count < MAX_RAM_COOKIES_COUNT) {
                        Cookie cookie = iter.next();
@@ -608,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 (WebView.DEBUG) {
            if (DebugFlags.COOKIE_MANAGER) {
                Log.v(LOGTAG, count + " cookies used " + byteCount
                        + " bytes with " + mapSize + " domains");
            }
@@ -616,7 +616,7 @@ public final class CookieManager {
            int toGo = mapSize / 10 + 1;
            while (toGo-- > 0){
                String domain = domains[toGo].toString();
                if (WebView.LOGV_ENABLED) {
                if (DebugFlags.COOKIE_MANAGER) {
                    Log.v(LOGTAG, "delete domain: " + domain
                            + " from RAM cache");
                }
+2 −2
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ public final class CookieSyncManager extends WebSyncManager {
    }

    protected void syncFromRamToFlash() {
        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.COOKIE_SYNC_MANAGER) {
            Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash STARTS");
        }

@@ -187,7 +187,7 @@ public final class CookieSyncManager extends WebSyncManager {
                CookieManager.getInstance().deleteLRUDomain();
        syncFromRamToFlash(lruList);

        if (WebView.LOGV_ENABLED) {
        if (DebugFlags.COOKIE_SYNC_MANAGER) {
            Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash DONE");
        }
    }
Loading