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
Loading
Please register or sign in to comment