Calling the Quota method over and over is bad, use the estimated size

This commit is contained in:
Joe Bowser 2010-08-06 13:59:28 -07:00
parent b18657cf72
commit f15555ee34

View File

@ -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);
}