summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Johannes Gallmann <gallmann@google.com> 2022-12-27 18:23:40 +0100
committer Johannes Gallmann <gallmann@google.com> 2022-12-28 13:58:24 +0100
commit9619ee3ad8ad45c3c0a29cfcd8dacbfa9f039c07 (patch)
tree9f0448d82cb31fc2bf5f92262a38026b5f61331f /libs/androidfw/StringPool.cpp
parente076cf2df65ce9b5ce5cd3e70248d3efb1acbfc6 (diff)
Fix inline reply notification not aligned to IME
When inline replying within a notification, the notification's bottom should align to the opened IME. This was broken due to multiple problems: 1. When calculating the position of the notification within the stack, there was only a default padding between notifications considered. However, there are cases when a larger gap is added between notifications. (See `StackScrollAlgorithm.childNeedsGapHeight()`) 2. The scrimTopPadding is also not considered in the same calculation. 3. In the split shade mode, it needs to be taken into account that the top of the NotificationStackScrollLayout is not at 0. Therefore this offset needs to be subtracted in the `getImeInset()` function. 4. `mBottomInset` was set to `inset.getInset(WindowInset.Type.ime()).bottom + inset.getSystemWindowInsetBottom()`. The `+ inset.getSystemWindowInsetBottom()` part compensated for the aforementioned three miscalculations in some lucky cases. After fixing the three miscalculations, this is not needed anymore. Bug: 233683829 Test: Manual, i.e. posting multiple notifications (in separate groups) with an inline reply option and ensuring that the bottom of the notification is aligned to the top of the IME. I tested this on split shade and normal shade. Change-Id: Iceaf0ac540ed367cb49eb3aca7bdec7b7cabb1cb
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions