mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Calling the Quota method over and over is bad, use the estimated size
This commit is contained in:
parent
b18657cf72
commit
f15555ee34
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user