diff options
| author | 2016-08-09 15:07:06 -0400 | |
|---|---|---|
| committer | 2016-08-09 15:07:06 -0400 | |
| commit | f2c2ae09dac03f5c08e3a04bfab8ee75c1ce8ce9 (patch) | |
| tree | 651c5aa9b44e3b8ec51824f19518adecdd1247c5 | |
| parent | f79753966f4121b8af9010e2b0498cd93033f44e (diff) | |
Document exceptions thrown by KeyCharacterMap APIs
Bug: 30764621
Change-Id: I40bd0961a30b0e593388930e409249b44a58ec1b
| -rw-r--r-- | core/java/android/view/KeyCharacterMap.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/view/KeyCharacterMap.java b/core/java/android/view/KeyCharacterMap.java index 55dd6bb64fe6..c8b89e7ac607 100644 --- a/core/java/android/view/KeyCharacterMap.java +++ b/core/java/android/view/KeyCharacterMap.java @@ -439,6 +439,7 @@ public class KeyCharacterMap implements Parcelable { * @param keyCode The keycode. * @param chars The array of matching characters to consider. * @return The matching associated character, or 0 if none. + * @throws {@link IllegalArgumentException} if the passed array of characters is null. */ public char getMatch(int keyCode, char[] chars) { return getMatch(keyCode, chars, 0); @@ -453,6 +454,7 @@ public class KeyCharacterMap implements Parcelable { * @param chars The array of matching characters to consider. * @param metaState The preferred meta key modifier state. * @return The matching associated character, or 0 if none. + * @throws {@link IllegalArgumentException} if the passed array of characters is null. */ public char getMatch(int keyCode, char[] chars, int metaState) { if (chars == null) { @@ -599,6 +601,7 @@ public class KeyCharacterMap implements Parcelable { * @param chars The sequence of characters to generate. * @return An array of {@link KeyEvent} objects, or null if the given char array * can not be generated using the current key character map. + * @throws {@link IllegalArgumentException} if the passed array of characters is null. */ public KeyEvent[] getEvents(char[] chars) { if (chars == null) { |