當前位置: 首頁>>代碼示例>>Java>>正文


Java WebStorage.QuotaUpdater方法代碼示例

本文整理匯總了Java中android.webkit.WebStorage.QuotaUpdater方法的典型用法代碼示例。如果您正苦於以下問題:Java WebStorage.QuotaUpdater方法的具體用法?Java WebStorage.QuotaUpdater怎麽用?Java WebStorage.QuotaUpdater使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.webkit.WebStorage的用法示例。


在下文中一共展示了WebStorage.QuotaUpdater方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
/**
 * Handle database quota exceeded notification.
 *
 * @param url
 * @param databaseIdentifier
 * @param currentQuota
 * @param estimatedSize
 * @param totalUsedQuota
 * @param quotaUpdater
 */
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
        long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
{
    LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d  currentQuota: %d  totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota);

    if (estimatedSize < MAX_QUOTA)
    {
        //increase for 1Mb
        long newQuota = estimatedSize;
        LOG.d(LOG_TAG, "calling quotaUpdater.updateQuota newQuota: %d", newQuota);
        quotaUpdater.updateQuota(newQuota);
    }
    else
    {
        // Set the quota to whatever it is and force an error
        // TODO: get docs on how to handle this properly
        quotaUpdater.updateQuota(currentQuota);
    }
}
 
開發者ID:psydrake,項目名稱:pandacoinBalance,代碼行數:31,代碼來源:InAppChromeClient.java

示例2: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
/**
 * Handle database quota exceeded notification.
 *
 * @param url
 * @param databaseIdentifier
 * @param currentQuota
 * @param estimatedSize
 * @param totalUsedQuota
 * @param quotaUpdater
 */
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
        long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
{
    LOG.d(TAG, "onExceededDatabaseQuota estimatedSize: %d  currentQuota: %d  totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota);

    if (estimatedSize < MAX_QUOTA)
    {
        //increase for 1Mb
        long newQuota = estimatedSize;
        LOG.d(TAG, "calling quotaUpdater.updateQuota newQuota: %d", newQuota);
        quotaUpdater.updateQuota(newQuota);
    }
    else
    {
        // Set the quota to whatever it is and force an error
        // TODO: get docs on how to handle this properly
        quotaUpdater.updateQuota(currentQuota);
    }
}
 
開發者ID:thedracle,項目名稱:cordova-android-chromeview,代碼行數:31,代碼來源:CordovaChromeClient.java

示例3: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
/** 當超出數據庫限額時的處理 */
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier,
        long currentQuota, long estimatedSize, long totalUsedQuota,
        WebStorage.QuotaUpdater quotaUpdater) {
    XLog.d(CLASS_NAME,
            "onExceededDatabaseQuota estimatedSize: %d  currentQuota: %d  totalUsedQuota: %d",
            estimatedSize, currentQuota, totalUsedQuota);
    if (estimatedSize < MAX_QUOTA) {
        // increase for 1Mb
        long newQuota = estimatedSize;
        XLog.d(CLASS_NAME, "calling quotaUpdater.updateQuota newQuota: %d",
                newQuota);
        quotaUpdater.updateQuota(newQuota);
    } else {
        // TODO: get docs on how to handle this properly
        quotaUpdater.updateQuota(currentQuota);
    }
}
 
開發者ID:polyvi,項目名稱:openxface-android,代碼行數:20,代碼來源:InAppBrowserClient.java

示例4: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
/**
 * Handle database quota exceeded notification.
 */
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
        long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
{
    LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d  currentQuota: %d  totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota);
    quotaUpdater.updateQuota(MAX_QUOTA);
}
 
開發者ID:Andy-Ta,項目名稱:COB,代碼行數:11,代碼來源:SystemWebChromeClient.java

示例5: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Deprecated
    public void onExceededDatabaseQuota(String url, String databaseIdentifier,
                                        long quota, long estimatedDatabaseSize, long totalQuota,
                                        WebStorage.QuotaUpdater quotaUpdater) {
        // This default implementation passes the current quota back to WebCore.
        // WebCore will interpret this that new quota was declined.
        //注掉
//        quotaUpdater.updateQuota(quota);
        if (this.mRealWebChromeClient != null){
            this.mRealWebChromeClient.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
            return;
        }
        super.onExceededDatabaseQuota(url,databaseIdentifier,quota,estimatedDatabaseSize,totalQuota,quotaUpdater);

    }
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:16,代碼來源:WebChromeClientWrapper.java

示例6: onReachedMaxAppCacheSize

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Deprecated
public void onReachedMaxAppCacheSize(long requiredStorage, long quota,
                                     WebStorage.QuotaUpdater quotaUpdater) {
    if (this.mRealWebChromeClient != null){
        this.mRealWebChromeClient.onReachedMaxAppCacheSize(requiredStorage, quota, quotaUpdater);
        return;
    }
    super.onReachedMaxAppCacheSize(requiredStorage,quota,quotaUpdater);
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:10,代碼來源:WebChromeClientWrapper.java

示例7: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota, long estimatedDatabaseSize, long totalQuota, WebStorage.QuotaUpdater quotaUpdater) {


    if (AgentWebUtils.isOverriedMethod(mWebChromeClient, "onExceededDatabaseQuota", ChromePath + ".onExceededDatabaseQuota", String.class, String.class, long.class, long.class, long.class, WebStorage.QuotaUpdater.class)) {

        super.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
        return;
    }
    quotaUpdater.updateQuota(totalQuota * 2);
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:12,代碼來源:DefaultChromeClient.java

示例8: onReachedMaxAppCacheSize

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota, WebStorage.QuotaUpdater quotaUpdater) {


    if (AgentWebUtils.isOverriedMethod(mWebChromeClient, "onReachedMaxAppCacheSize", ChromePath + ".onReachedMaxAppCacheSize", long.class, long.class, WebStorage.QuotaUpdater.class)) {

        super.onReachedMaxAppCacheSize(requiredStorage, quota, quotaUpdater);
        return;
    }
    quotaUpdater.updateQuota(requiredStorage * 2);
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:12,代碼來源:DefaultChromeClient.java

示例9: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long
        currentQuota, long estimatedSize, long totalUsedQuota, WebStorage.QuotaUpdater
        quotaUpdater) {
    Log.d(TAG, "onExceededDatabaseQuota() called with: url = [" + url + "], " +
            "databaseIdentifier = [" + databaseIdentifier + "], currentQuota = [" +
            currentQuota + "], estimatedSize = [" + estimatedSize + "], " +
            "totalUsedQuota = [" + totalUsedQuota + "], quotaUpdater = [" +
            quotaUpdater + "]");
    quotaUpdater.updateQuota(5 * 1024 * 1024);
}
 
開發者ID:fendoudebb,項目名稱:PlayAndroid,代碼行數:12,代碼來源:WebViewActivity.java

示例10: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
/**
 * Handle database quota exceeded notification.
 */
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
        long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
{
    LOG.d(TAG, "onExceededDatabaseQuota estimatedSize: %d  currentQuota: %d  totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota);
    quotaUpdater.updateQuota(MAX_QUOTA);
}
 
開發者ID:aabognah,項目名稱:LoRaWAN-Smart-Parking,代碼行數:11,代碼來源:CordovaChromeClient.java

示例11: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota,
        long estimatedDatabaseSize, long totalQuota, WebStorage.QuotaUpdater quotaUpdater) {
    if (originalWebChromeClient != null) {
        originalWebChromeClient.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
    } else {
        super.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
    }
}
 
開發者ID:bitbar,項目名稱:robotium-extensions,代碼行數:10,代碼來源:ProxyWebChromeClient.java

示例12: onReachedMaxAppCacheSize

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota, WebStorage.QuotaUpdater quotaUpdater) {
    if (originalWebChromeClient != null) {
        originalWebChromeClient.onReachedMaxAppCacheSize(requiredStorage, quota, quotaUpdater);
    } else {
        super.onReachedMaxAppCacheSize(requiredStorage, quota, quotaUpdater);
    }
}
 
開發者ID:bitbar,項目名稱:robotium-extensions,代碼行數:9,代碼來源:ProxyWebChromeClient.java

示例13: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota, long estimatedDatabaseSize, long totalQuota, WebStorage.QuotaUpdater quotaUpdater) {
    super.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
    if(client != null) {
        client.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
    }
}
 
開發者ID:yyter,項目名稱:SafeWebView,代碼行數:8,代碼來源:SafeWebView.java

示例14: onExceededDatabaseQuota

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota,
		long estimatedDatabaseSize, long totalQuota, WebStorage.QuotaUpdater quotaUpdater) {
	if (originalWebChromeClient != null) {
		originalWebChromeClient.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
	} 
}
 
開發者ID:VikingDen,項目名稱:robotium-tech,代碼行數:8,代碼來源:RobotiumWebClient.java

示例15: onReachedMaxAppCacheSize

import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
//擴容
public void onReachedMaxAppCacheSize(long requiredStorage, long quota, WebStorage.QuotaUpdater quotaUpdater) {
    quotaUpdater.updateQuota(requiredStorage*2);
}
 
開發者ID:lennyup,項目名稱:react-native-udesk,代碼行數:6,代碼來源:UdeskWebChromeClient.java


注:本文中的android.webkit.WebStorage.QuotaUpdater方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。