本文整理匯總了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例15: onReachedMaxAppCacheSize
import android.webkit.WebStorage; //導入方法依賴的package包/類
@Override
//擴容
public void onReachedMaxAppCacheSize(long requiredStorage, long quota, WebStorage.QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(requiredStorage*2);
}