替代已弃用的 onExceededDatabaseQuota()

Alternative to deprecated onExceededDatabaseQuota()

我的应用正在创建数据库的 WebView 中执行一些 Javascript 代码。在某些情况下,当数据库增长超过一定大小时,我会收到此 Javascript 错误:

there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space

historical workaround for this has been to override WebChromeClient.onExceededDatabaseQuota() 允许本机应用程序代码根据需要增加配额。但是,自 API 级别 19 以来,这已被弃用,并且不再被调用。 Javadoc 说:

WebView now uses the HTML5 / JavaScript Quota Management API.

我的 Android 应用程序代码可以访问这个新的配额管理 API 吗?有没有其他方法可以让我的 WebView 增加存储配额?

事实证明,模拟器的内部存储实际上 space 所剩无几。在我编辑 AVD 以提供更多 space 后,错误消失了。