Skip to content
Commit aee6d8ae authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent fcb2bb51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment