Search in sources :

Example 6 with WebSettingsClassic

use of android.webkit.WebSettingsClassic in project android_frameworks_base by ParanoidAndroid.

the class ProfiledWebView method setUseMinimalMemory.

public void setUseMinimalMemory(boolean minimal) {
    WebSettingsClassic settings = getWebViewClassic().getSettings();
    settings.setProperty("use_minimal_memory", minimal ? "true" : "false");
}
Also used : WebSettingsClassic(android.webkit.WebSettingsClassic)

Example 7 with WebSettingsClassic

use of android.webkit.WebSettingsClassic in project android_frameworks_base by ParanoidAndroid.

the class ProfiledWebView method animFramerate.

private double animFramerate() {
    WebSettingsClassic settings = getWebViewClassic().getSettings();
    String updatesString = settings.getProperty("tree_updates");
    int updates = (updatesString == null) ? -1 : Integer.parseInt(updatesString);
    long animationTime;
    if (mAnimationTime == 0 || mAnimationTime - mLoadTime < ANIM_SAFETY_THRESHOLD) {
        animationTime = System.currentTimeMillis() - mLoadTime;
    } else {
        animationTime = mAnimationTime - mLoadTime;
    }
    return updates * 1000.0 / animationTime;
}
Also used : WebSettingsClassic(android.webkit.WebSettingsClassic)

Aggregations

WebSettingsClassic (android.webkit.WebSettingsClassic)7 CountDownTimer (android.os.CountDownTimer)1 WebViewClassic (android.webkit.WebViewClassic)1