diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2014-10-29 19:05:36 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2014-10-30 18:28:40 +0900 |
| commit | be708c4e59ba16cf735440b99aa682baa3319ec5 (patch) | |
| tree | 6a527db0af0e55b744446e5360e21ad81507fe69 /java/src/com/android/inputmethod/keyboard/KeyboardView.java | |
| parent | d9b1327c218c813e5556d5894621c82bd0a99297 (diff) | |
Consolidate TimerHandler.Callbacks with PointerTracker.DrawingProxy
Change-Id: I654f7483d1c013ac2685a45af4eb2af15fa219ad
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardView.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 6feb1e7ad..b07693c76 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -41,6 +41,8 @@ import com.android.inputmethod.latin.utils.TypefaceUtils; import java.util.HashSet; +import javax.annotation.Nullable; + /** * A view that renders a virtual {@link Keyboard}. * @@ -557,9 +559,10 @@ public class KeyboardView extends View { * @param key key in the attached {@link Keyboard}. * @see #invalidateAllKeys */ - public void invalidateKey(final Key key) { - if (mInvalidateAllKeys) return; - if (key == null) return; + public void invalidateKey(@Nullable final Key key) { + if (key == null || mInvalidateAllKeys) { + return; + } mInvalidatedKeys.add(key); final int x = key.getX() + getPaddingLeft(); final int y = key.getY() + getPaddingTop(); |
