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
3 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
|||
|
||||
@Override
|
||||
public boolean dismissMoreKeysPanel() {
|
||||
if (mIsDismissing) return false;
|
||||
if (mIsDismissing || mController == null) return false;
|
||||
mIsDismissing = true;
|
||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||
mIsDismissing = false;
|
||||
|
|
|
@ -167,7 +167,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
|
|||
|
||||
@Override
|
||||
public boolean dismissMoreKeysPanel() {
|
||||
if (mIsDismissing) return false;
|
||||
if (mIsDismissing || mController == null) return false;
|
||||
mIsDismissing = true;
|
||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||
mIsDismissing = false;
|
||||
|
|
|
@ -884,5 +884,6 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
|||
super.onDetachedFromWindow();
|
||||
mHandler.cancelAllMessages();
|
||||
hidePreview();
|
||||
dismissMoreSuggestions();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue