Revert^2 "Fix display settings persistence with LRU cache."
This reverts commit 029845d4: Fix display settings persistence with LRU cache. Rotation and density settings for external or simulated displays were not being persisted across reboots. This was caused by an overly aggressive cleanup mechanism that would remove settings for displays that were only temporarily disconnected, such as during a device reboot. This change replaces the ArrayMap in DisplayWindowSettingsProvider with an LruCache to manage display settings. This aligns with the persistence strategy used by DisplayManager's DisplayTopologyXmlStore, ensuring that the settings for the 100 most recently used displays are retained. When the cache limit is reached, the least recently used setting is evicted. This prevents the settings file from growing indefinitely while correctly preserving settings for active and recently used displays across reboots. The previous removeStaleDisplaySettingsLocked method is now obsolete and has been removed. Reason for revert: Relaunch with null check fix Bug: 397398590 Bug: 422386919 Flag: EXEMPT bug fix Test: atest CtsVirtualDevicesAppLaunchTestCases:VirtualDeviceHomeTest Test: atest WmTests:DisplayWindowSettingsProviderTests Change-Id: Iaa95e4a7eb676d539a71bdbe4f4f607cd81128de
Loading
Please register or sign in to comment