本文整理汇总了Java中android.webkit.WebStorage.QuotaUpdater类的典型用法代码示例。如果您正苦于以下问题:Java QuotaUpdater类的具体用法?Java QuotaUpdater怎么用?Java QuotaUpdater使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
QuotaUpdater类属于android.webkit.WebStorage包,在下文中一共展示了QuotaUpdater类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public final void onExceededDatabaseQuota(String paramString1, String paramString2, long paramLong1, long paramLong2, long paramLong3, WebStorage.QuotaUpdater paramQuotaUpdater)
{
long l1 = 5242880L - paramLong3;
if (l1 <= 0L)
{
paramQuotaUpdater.updateQuota(paramLong1);
return;
}
long l2;
if (paramLong1 == 0L)
{
if ((paramLong2 <= l1) && (paramLong2 <= 1048576L))
l2 = paramLong2;
else
l2 = 0L;
}
else if (paramLong2 == 0L)
l2 = Math.min(paramLong1 + Math.min(131072L, l1), 1048576L);
else if (paramLong2 <= Math.min(1048576L - paramLong1, l1))
l2 = paramLong1 + paramLong2;
else
l2 = paramLong1;
paramQuotaUpdater.updateQuota(l2);
}
示例2: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public void onExceededDatabaseQuota(String paramString1, String paramString2, long paramLong1, long paramLong2, long paramLong3, WebStorage.QuotaUpdater paramQuotaUpdater)
{
String str1 = this.TAG;
Object[] arrayOfObject1 = new Object[3];
arrayOfObject1[0] = Long.valueOf(paramLong2);
arrayOfObject1[1] = Long.valueOf(paramLong1);
arrayOfObject1[2] = Long.valueOf(paramLong3);
LOG.d(str1, "DroidGap: onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", arrayOfObject1);
if (paramLong2 < this.MAX_QUOTA)
{
String str2 = this.TAG;
Object[] arrayOfObject2 = new Object[1];
arrayOfObject2[0] = Long.valueOf(paramLong2);
LOG.d(str2, "calling quotaUpdater.updateQuota newQuota: %d", arrayOfObject2);
paramQuotaUpdater.updateQuota(paramLong2);
return;
}
paramQuotaUpdater.updateQuota(paramLong1);
}
示例3: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public void onExceededDatabaseQuota(String paramString1, String paramString2, long paramLong1, long paramLong2, long paramLong3, WebStorage.QuotaUpdater paramQuotaUpdater)
{
Object[] arrayOfObject1 = new Object[3];
arrayOfObject1[0] = Long.valueOf(paramLong2);
arrayOfObject1[1] = Long.valueOf(paramLong1);
arrayOfObject1[2] = Long.valueOf(paramLong3);
LOG.d("InAppBrowser", "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", arrayOfObject1);
if (paramLong2 < InAppBrowser.this.MAX_QUOTA)
{
Object[] arrayOfObject2 = new Object[1];
arrayOfObject2[0] = Long.valueOf(paramLong2);
LOG.d("InAppBrowser", "calling quotaUpdater.updateQuota newQuota: %d", arrayOfObject2);
paramQuotaUpdater.updateQuota(paramLong2);
return;
}
paramQuotaUpdater.updateQuota(paramLong1);
}
示例4: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public final void onExceededDatabaseQuota(String paramString1, String paramString2, long paramLong1, long paramLong2, long paramLong3, WebStorage.QuotaUpdater paramQuotaUpdater)
{
long l = 5242880L - paramLong3;
if (l <= 0L)
{
paramQuotaUpdater.updateQuota(paramLong1);
return;
}
if (paramLong1 == 0L)
{
if ((paramLong2 <= l) && (paramLong2 <= 1048576L)) {}
for (;;)
{
paramQuotaUpdater.updateQuota(paramLong2);
return;
paramLong2 = 0L;
}
}
if (paramLong2 == 0L) {
paramLong1 = Math.min(paramLong1 + Math.min(131072L, l), 1048576L);
}
for (;;)
{
paramLong2 = paramLong1;
break;
if (paramLong2 <= Math.min(1048576L - paramLong1, l)) {
paramLong1 += paramLong2;
}
}
}
示例5: onReachedMaxAppCacheSize
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public final void onReachedMaxAppCacheSize(long paramLong1, long paramLong2, WebStorage.QuotaUpdater paramQuotaUpdater)
{
long l1 = 5242880L - paramLong2;
long l2 = 131072L + paramLong1;
if (l1 < l2)
{
paramQuotaUpdater.updateQuota(0L);
return;
}
paramQuotaUpdater.updateQuota(l2);
}
示例6: onReachedMaxAppCacheSize
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
public final void onReachedMaxAppCacheSize(long paramLong1, long paramLong2, WebStorage.QuotaUpdater paramQuotaUpdater)
{
long l1 = 5242880L - paramLong2;
long l2 = paramLong1 + 131072L;
if (l1 < l2)
{
paramQuotaUpdater.updateQuota(0L);
return;
}
paramQuotaUpdater.updateQuota(l2);
}
示例7: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onExceededDatabaseQuota(String url,
String databaseIdentifier, long quota,
long estimatedDatabaseSize, long totalQuota,
QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(estimatedDatabaseSize * 2);
}
示例8: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, long totalUsedQuota,
QuotaUpdater quotaUpdater) {
if (estimatedSize < MAX_QUOTA) {
long newQuota = estimatedSize;
quotaUpdater.updateQuota(newQuota * 2);
} else {
quotaUpdater.updateQuota(currentQuota);
}
}
示例9: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, long totalUsedQuota, QuotaUpdater quotaUpdater)
{
quotaUpdater.updateQuota(estimatedSize * 2);
}
示例10: onExceededDatabaseQuota
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota, long estimatedDatabaseSize, long totalQuota, QuotaUpdater quotaUpdater) {
// super.onExceededDatabaseQuota(url, databaseIdentifier, quota, estimatedDatabaseSize, totalQuota, quotaUpdater);
// 扩充数据库的容量(在WebChromeClinet中实现)
quotaUpdater.updateQuota(estimatedDatabaseSize * 2);
}
示例11: onReachedMaxAppCacheSize
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota,
QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(requiredStorage * 2);
}
示例12: onReachedMaxAppCacheSize
import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
/**
* 在回调函数中设置离线应用最大缓存限制
*/
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota,
QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(requiredStorage * 2);
}