Skip to content
Snippets Groups Projects
Commit a7c41996 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Preventing infinite call of dismissMoreKeysPanel" into ics-mr1

parents ba1c5d44 0cf7a45a
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy; ...@@ -27,7 +27,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy; import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
/** /**
* A view that renders a virtual {@link MiniKeyboard}. It handles rendering of keys and detecting * A view that renders a virtual {@link MiniKeyboard}. It handles rendering of keys and detecting
* key presses and touch movements. * key presses and touch movements.
...@@ -115,7 +114,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel { ...@@ -115,7 +114,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
@Override @Override
public DrawingProxy getDrawingProxy() { public DrawingProxy getDrawingProxy() {
return this; return this;
} }
@Override @Override
...@@ -174,9 +173,15 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel { ...@@ -174,9 +173,15 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
return x; return x;
} }
private boolean mIsDismissing;
@Override @Override
public boolean dismissMoreKeysPanel() { public boolean dismissMoreKeysPanel() {
return mController.dismissMoreKeysPanel(); if (mIsDismissing) return false;
mIsDismissing = true;
final boolean dismissed = mController.dismissMoreKeysPanel();
mIsDismissing = false;
return dismissed;
} }
@Override @Override
......
...@@ -35,7 +35,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy; ...@@ -35,7 +35,6 @@ import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
import com.android.inputmethod.keyboard.PointerTracker.KeyEventHandler; import com.android.inputmethod.keyboard.PointerTracker.KeyEventHandler;
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy; import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
/** /**
* A view that renders a virtual {@link MoreSuggestions}. It handles rendering of keys and detecting * A view that renders a virtual {@link MoreSuggestions}. It handles rendering of keys and detecting
* key presses and touch movements. * key presses and touch movements.
...@@ -125,7 +124,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel { ...@@ -125,7 +124,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
@Override @Override
public DrawingProxy getDrawingProxy() { public DrawingProxy getDrawingProxy() {
return this; return this;
} }
@Override @Override
...@@ -180,10 +179,15 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel { ...@@ -180,10 +179,15 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
return x; return x;
} }
private boolean mIsDismissing;
@Override @Override
public boolean dismissMoreKeysPanel() { public boolean dismissMoreKeysPanel() {
if (mController == null) return false; if (mIsDismissing) return false;
return mController.dismissMoreKeysPanel(); mIsDismissing = true;
final boolean dismissed = mController.dismissMoreKeysPanel();
mIsDismissing = false;
return dismissed;
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment