Skip to content
Commit 5167131c authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Improve shouldRestoreImeVisibility perf

shouldRestoreImeVisibility(token) used to check if the task window
token should restore IME visibliity by checking the tasksnapshot.

Previously by default it calls mAtmService.getTaskSnapshot() to load
tasksnapshot from the disk if the does not exist, which caused
additional bitmap allocation to see if the tasksnapshot is not active.

Since we only check the IME surface from the tasksnapshot when
the task is still running. Also, after the next booted, tapping
the tasksnapshot from the overview will be refreshed with
splashscreen that we don't trying to restore IME visiblity
for that case.

Use WMS#getTaskSnapshot with specifying restoreFromDisk parameter as
false to get the active tasksnapshot from memory.

Fix: 195347355
Test: Enable systrace on device from developer option,
      launch an App with showing IME, swiping up to the overview
      and then tapping the original task again, expect no
      additional EGLContext created in the systrace.
Change-Id: I0abb5d6d77fdb200c737e7582923ced9ee98ad05
parent e421c1c2
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