diff options
Diffstat (limited to 'zh-cn/devices/tech/perf/compatibility-wal.html')
-rw-r--r-- | zh-cn/devices/tech/perf/compatibility-wal.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zh-cn/devices/tech/perf/compatibility-wal.html b/zh-cn/devices/tech/perf/compatibility-wal.html index 672c54d3..a8cd2970 100644 --- a/zh-cn/devices/tech/perf/compatibility-wal.html +++ b/zh-cn/devices/tech/perf/compatibility-wal.html @@ -22,7 +22,7 @@ limitations under the License. --> -<h1 id="compatibility_wal_write_ahead_logging_for_apps" class="page-title">应用的兼容性 WAL(预写日志记录)</h1> +<h1 id="compatibility_wal_write-ahead_logging_for_apps" class="page-title">应用的兼容性 WAL(预写日志记录)</h1> <p>Android 9 引入了 <a href="https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html" class="external">SQLiteDatabase</a> 的一种特殊模式,称为“兼容性 WAL(预写日志记录)”,它允许数据库使用 <code>journal_mode=WAL</code>,同时保留每个数据库最多创建一个连接的行为。</p> @@ -39,7 +39,7 @@ <aside class="note"><strong>注意</strong>:<span>对于使用 <a href="https://developer.android.com/topic/libraries/architecture/room">Room</a> 的应用,系统会默认启用完全预写日志记录模式(而非兼容性 WAL)。这适用于运行 API 16 或更高版本且未被归为<a href="https://developer.android.com/reference/android/app/ActivityManager.html#isLowRamDevice()">低内存设备</a>的设备。要了解详情,请参阅 <a href="https://developer.android.com/reference/androidx/room/RoomDatabase.JournalMode#AUTOMATIC"><code>RoomDatabase.JournalMode AUTOMATIC</code></a>。</span></aside> <h2 id="disabling_compatibility_wal">停用兼容性 WAL</h2> -<p>要停用兼容性 WAL 模式,请覆盖 <a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml" class="external"><code>db_compatibility_wal_supported</code></a> 配置资源。</p> +<p>要停用兼容性 WAL 模式,请覆盖 <a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml#1844" class="external"><code>db_compatibility_wal_supported</code></a> 配置资源。</p> <p>例如:</p> <pre class="prettyprint"><code><bool name="db_compatibility_wal_supported">false</bool> |