From f15555ee34512963b2459a1ae3244aec4b52d4bf Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Fri, 6 Aug 2010 13:59:28 -0700 Subject: [PATCH] Calling the Quota method over and over is bad, use the estimated size --- framework/src/com/phonegap/DroidGap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 55376327..1011a7fb 100644 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -254,11 +254,11 @@ public class DroidGap extends Activity { long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) { Log.d(TAG, "event raised onExceededDatabaseQuota estimatedSize: " + Long.toString(estimatedSize) + " currentQuota: " + Long.toString(currentQuota) + " totalUsedQuota: " + Long.toString(totalUsedQuota)); - + if( estimatedSize < MAX_QUOTA) { //increase for 1Mb - long newQuota = currentQuota + 1024*1024; + long newQuota = estimatedSize; Log.d(TAG, "calling quotaUpdater.updateQuota newQuota: " + Long.toString(newQuota) ); quotaUpdater.updateQuota(newQuota); }