summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Mark Punzalan <markpun@google.com> 2022-09-22 09:57:11 +0000
committer Mark Punzalan <markpun@google.com> 2022-10-06 18:23:30 +0000
commitf15a444d185d68e381e73d530546173a3d2ffa76 (patch)
tree8385c928761216d345998ccd8544549e761ed9a9 /libs/input/PointerController.cpp
parenta20c6a4cf8857d19394643cbb51b3614ac8979ac (diff)
Remove active translation on Activity destroyed
When a translated Activity is destroyed or translation is finished (e.g., finishTranslation() call), we also have to remove the entry in the active translations we are keeping track in TranslationManagerService. Prior to this change, we were not removing the entry in the Activity destroyed case, and this caused problems when a new callback is registered (e.g., Gboard) because it would incorrectly get an onStarted() call for the now-inactive translation. This can happen relatively frequently when the device has a work profile, since switching to apps across profiles re-creates the IME, and in the case of Gboard, it registers a callback every time. Also added additional logging on Activity destroyed and when callbacks are registered and triggered. Bug: 245911471 Test: atest UiTranslationManagerTest Change-Id: If1881fd4588725021d38e5b9336c3e69bca17039 Merged-In: If1881fd4588725021d38e5b9336c3e69bca17039
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions