summaryrefslogtreecommitdiff
path: root/libs/androidfw/ZipFileRO.cpp
diff options
context:
space:
mode:
author Cosmin Băieș <cosminbaies@google.com> 2024-04-04 21:18:43 +0200
committer Cosmin Băieș <cosminbaies@google.com> 2024-04-11 16:24:18 +0200
commita9ae219b82d26f77b02c96205e5e3d8d067f1e0d (patch)
tree22061eb2d4f07c74759b86d9ff7a2bd6cd0df990 /libs/androidfw/ZipFileRO.cpp
parent08df28f4cdde7171a20f1ba2a323f828780c311a (diff)
Optimize scheduleShowImePostLayout
This adds various small improvements to the logic in ImeInsetsSourceProvider for scheduleShowImePostLayout. The mShowImeRunner is inlined, as there is no need for a runnable for this code. This allows removing the duplicated isReadyToShowIme check. The order of the checks in isReadyToShowIme is slightly tweaked to early return in the most common cases (when no request is scheduled), as well as now including the WindowContainer checks. This method is now renamed to isScheduledAndReadyToShowIme, and checkShowImePostLayout is renamed to checkAndStartShowImePostLayout, to reflect the actual behaviour. The mIsImeLayoutDrawn property is removed, as this didn't actually allow skipping the isReadyToShowIme check, nor protect agains re-entry. The abortShowImePostLayout is called only when we actually abort (hide while we have a scheduled and unhandled show), and no longer after handling a show. The trace for showImePostLayout is also marked ended in the abort, to avoid unfinished traces. Bug: 332898042 Test: atest ImeInsetsSourceProviderTest Change-Id: Id8e8560f961339574f53c95e81e41147eef276d8
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
0 files changed, 0 insertions, 0 deletions