diff options
author | 2022-12-29 12:07:56 +0000 | |
---|---|---|
committer | 2023-01-12 23:18:40 +0000 | |
commit | 23e8ae9cf2793b83e220adec4cf6dec35e090e53 (patch) | |
tree | 7fab247ee09974faf18ed0fea15ba7a91fc3e18c /libs/input/KeyCharacterMap.cpp | |
parent | 4079d69adeb0c9a55e8b2651775470a8dc2ab0bb (diff) |
Clear applied layout overlay if new layout overlay is null.
Need to allow resetting of key character map by setting overlay
map to null. This is required when moving from a IME setting
that has a KCM to another IME setting that has none.
Test: atest KeyboardLayoutChangeTest
Bug: 20805588
Change-Id: I62dc65970b61628486aff698a8ab8ccb31c109d6
Diffstat (limited to 'libs/input/KeyCharacterMap.cpp')
-rw-r--r-- | libs/input/KeyCharacterMap.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp index fa5c41f657..6bfac40932 100644 --- a/libs/input/KeyCharacterMap.cpp +++ b/libs/input/KeyCharacterMap.cpp @@ -255,6 +255,13 @@ void KeyCharacterMap::combine(const KeyCharacterMap& overlay) { mLayoutOverlayApplied = true; } +void KeyCharacterMap::clearLayoutOverlay() { + if (mLayoutOverlayApplied) { + reloadBaseFromFile(); + mLayoutOverlayApplied = false; + } +} + KeyCharacterMap::KeyboardType KeyCharacterMap::getKeyboardType() const { return mType; } |