Merge "Make InputFilter.AllCaps constructor reject null locales" into oc-mr1-dev
diff --git a/core/java/android/text/InputFilter.java b/core/java/android/text/InputFilter.java
index d773158..a507f2b 100644
--- a/core/java/android/text/InputFilter.java
+++ b/core/java/android/text/InputFilter.java
@@ -16,7 +16,9 @@
package android.text;
-import android.annotation.Nullable;
+import android.annotation.NonNull;
+
+import com.android.internal.util.Preconditions;
import java.util.Locale;
@@ -64,7 +66,8 @@
* Constructs a locale-specific AllCaps filter, to make sure capitalization rules of that
* locale are used for transforming the sequence.
*/
- public AllCaps(@Nullable Locale locale) {
+ public AllCaps(@NonNull Locale locale) {
+ Preconditions.checkNotNull(locale);
mLocale = locale;
}