Remove dead window preservation
The logic was never executed for a long time. At least since 2016 the condition "mAttrs.token != mClient.asBinder()" is added in WindowState#shouldKeepVisibleDeadAppWindow. Because the logic only cares activity window, but the token is ActivityRecord.Token, while mClient.asBinder() is the IWindow from ViewRootImpl.W, the condition is never satisfied. Also current code won't keep dead process's ActivityRecord which doesn't have a saved state. The original purpose is avoid thrashing to restart process when there are multiple visible activities but the RAM is not enough so low memory killer is triggered. Since the modern devices are more powerful, the logic can be removed as it's been years since no one found out that doesn't work. Bug: 163976519 Test: CtsWindowManagerDeviceTestCases Change-Id: I987828d278ec6fa7bb282e8a17af896e355048b8
Loading
Please register or sign in to comment