summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2022-02-03 14:11:12 -0800
committerMady Mellor <madym@google.com>2022-02-10 15:08:39 -0800
commitd5861c1b2ee28ad192502e82a52a427cb413f321 (patch)
tree5beed3c7c01b6836abd3c54e5821de44768af8fa /core/java/android/inputmethodservice/InputMethodService.java
parentdb33f67f8ddbfb29acbe6fb57763cc2f029ec83b (diff)
Fix crash when overflow is selected and last bubble is removed
When the last bubble is removed we clean up the views associated with the bubbles, including the overflow view. BubbleOverflow#getExpandedView would create the view if it didn't exist but it wouldn't be initialized which means it wouldn't have the Bubble Positioner set on it. When a bubble is removed some code runs that would do stuff to the last expanded view, if it's non-null. If the overflow was the last bubble expanded, rather than skipping that code because the expandedView is null (because all the bubbles are gone), it was actually recreating the overflow expandedView but it wouldn't be initialized at that time resulting in the NPE. This fixes the issue by modifying BubbleOverflow's getExpandedView to only return the view, not do any view creation. Additionally this change removes some redundant code in BubbleStackView. Bug: 214399371 Test: atest BubbleOverflowTest Change-Id: Ib8d94fc7ea1163e79146e1439ec3f404d3caa303
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions