am a7c41996
: Merge "Preventing infinite call of dismissMoreKeysPanel" into ics-mr1
* commit 'a7c419964f46d1c354e81c5688f5da6b43428c9a': Preventing infinite call of dismissMoreKeysPanel
This commit is contained in:
commit
37c6bbb675
2 changed files with 16 additions and 7 deletions
|
@ -27,7 +27,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
|
|||
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
|
||||
import com.android.inputmethod.latin.R;
|
||||
|
||||
|
||||
/**
|
||||
* A view that renders a virtual {@link MiniKeyboard}. It handles rendering of keys and detecting
|
||||
* key presses and touch movements.
|
||||
|
@ -115,7 +114,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
|||
|
||||
@Override
|
||||
public DrawingProxy getDrawingProxy() {
|
||||
return this;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -174,9 +173,15 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
|||
return x;
|
||||
}
|
||||
|
||||
private boolean mIsDismissing;
|
||||
|
||||
@Override
|
||||
public boolean dismissMoreKeysPanel() {
|
||||
return mController.dismissMoreKeysPanel();
|
||||
if (mIsDismissing) return false;
|
||||
mIsDismissing = true;
|
||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||
mIsDismissing = false;
|
||||
return dismissed;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
|
|||
import com.android.inputmethod.keyboard.PointerTracker.KeyEventHandler;
|
||||
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
|
||||
|
||||
|
||||
/**
|
||||
* A view that renders a virtual {@link MoreSuggestions}. It handles rendering of keys and detecting
|
||||
* key presses and touch movements.
|
||||
|
@ -125,7 +124,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
|
|||
|
||||
@Override
|
||||
public DrawingProxy getDrawingProxy() {
|
||||
return this;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -180,10 +179,15 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
|
|||
return x;
|
||||
}
|
||||
|
||||
private boolean mIsDismissing;
|
||||
|
||||
@Override
|
||||
public boolean dismissMoreKeysPanel() {
|
||||
if (mController == null) return false;
|
||||
return mController.dismissMoreKeysPanel();
|
||||
if (mIsDismissing) return false;
|
||||
mIsDismissing = true;
|
||||
final boolean dismissed = mController.dismissMoreKeysPanel();
|
||||
mIsDismissing = false;
|
||||
return dismissed;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue