In I021ff2a97a60396fb1b6e4940d91d3cd6ccb6196, new API for
InputFilter.AllCaps was added. It accepted null as input. This CL
changes that so null locales would be rejected.
Test: bit CtsTextTestCases:android.text.cts.InputFilter_AllCapsTest
Fixes:
64261334
Bug:
37222101
Change-Id: Ic87942c3f341f71bc3c1c833b52ea3e751461e47
package android.text;
-import android.annotation.Nullable;
+import android.annotation.NonNull;
+
+import com.android.internal.util.Preconditions;
import java.util.Locale;
* 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;
}