Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fdb2dbf authored by Lee Shombert's avatar Lee Shombert
Browse files

Prepare for testing mainline module caches

The existing setTestMode(boolean) API is repurposed so that when the
test mode is enabled, all existing caches are put in test mode.  When
test mode is disabled, all existing caches are taken out of test mode.
(The "disabled" behavior is pre-existing.)  Also, any new cache is
created in the current test mode.

This behavior is consistent with the existing use case that is not
part of PIC unit tests.

The intent is to expose setTestMode as a mainline module API.

This makes setTestMode() a viable alternative to disableForTestMode(),
which is widely used but is sticky in a process.

Flag: android.app.pic_test_mode
Bug: 396173886
Test: atest
 * FrameworksCoreTests:PropertyInvalidatedCacheTests
 * FrameworksCoreTests:IpcDataCacheTest
 * CtsOsTestCases:IpcDataCacheTest
Change-Id: I1ad00f62d408b7261137bbd6bc47c394f0ee348f
parent d6850415
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment