当前位置: 首页>>代码示例>>Java>>正文


Java QuotaUpdater类代码示例

本文整理汇总了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);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:25,代码来源:cy.java

示例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);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:20,代码来源:CordovaChromeClient.java

示例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);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:18,代码来源:InAppBrowser.java

示例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;
    }
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:31,代码来源:zzju.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:12,代码来源:zzju.java

示例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);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:12,代码来源:cy.java

示例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);
}
 
开发者ID:mengdd,项目名称:HelloWebView,代码行数:8,代码来源:MainActivity.java

示例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);
    }
}
 
开发者ID:AppCanOpenSource,项目名称:appcan-android,代码行数:11,代码来源:CBrowserMainFrame7.java

示例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);
}
 
开发者ID:chreck,项目名称:movento-webview,代码行数:6,代码来源:TiWebChromeClient.java

示例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);
}
 
开发者ID:v7lin,项目名称:Android_Skin_3.x,代码行数:7,代码来源:CompatWebChromeClient.java

示例11: onReachedMaxAppCacheSize

import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota,
                                     QuotaUpdater quotaUpdater) {
    quotaUpdater.updateQuota(requiredStorage * 2);
}
 
开发者ID:mengdd,项目名称:HelloWebView,代码行数:6,代码来源:MainActivity.java

示例12: onReachedMaxAppCacheSize

import android.webkit.WebStorage.QuotaUpdater; //导入依赖的package包/类
/**
 * 在回调函数中设置离线应用最大缓存限制
 */
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota,
        QuotaUpdater quotaUpdater) {
    quotaUpdater.updateQuota(requiredStorage * 2);
}
 
开发者ID:polyvi,项目名称:openxface-android,代码行数:9,代码来源:XWebChromeClient.java


注:本文中的android.webkit.WebStorage.QuotaUpdater类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。