mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Dismiss more suggestions panel when suggestions strip is closed
This change fixes possible NPE as well. Bug: 6658028 Change-Id: I8706808d1002b7b0b95930fd9b08568f08645da6
This commit is contained in:
parent
5caaf1b9e9
commit
32f4ceb243
@ -159,7 +159,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dismissMoreKeysPanel() {
|
public boolean dismissMoreKeysPanel() {
|
||||||
if (mIsDismissing) return false;
|
if (mIsDismissing || mController == null) return false;
|
||||||
mIsDismissing = true;
|
mIsDismissing = true;
|
||||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||||
mIsDismissing = false;
|
mIsDismissing = false;
|
||||||
|
@ -167,7 +167,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dismissMoreKeysPanel() {
|
public boolean dismissMoreKeysPanel() {
|
||||||
if (mIsDismissing) return false;
|
if (mIsDismissing || mController == null) return false;
|
||||||
mIsDismissing = true;
|
mIsDismissing = true;
|
||||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||||
mIsDismissing = false;
|
mIsDismissing = false;
|
||||||
|
@ -884,5 +884,6 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
|||||||
super.onDetachedFromWindow();
|
super.onDetachedFromWindow();
|
||||||
mHandler.cancelAllMessages();
|
mHandler.cancelAllMessages();
|
||||||
hidePreview();
|
hidePreview();
|
||||||
|
dismissMoreSuggestions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user