From d3a4c5132422b189c8dbb94dbbe84a9b9761b0a8 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 22 Oct 2014 14:04:07 +0900 Subject: Fix Javadoc and null analysis related warnings This CL also adds @SuppressWarning("unused" to java-overridable package. Bug: 18003991 Change-Id: If70527e30654384705d7a814f5efd181d9f539e1 --- .../android/inputmethod/latin/settings/SettingsValues.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/settings/SettingsValues.java') diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 5b99652b8..da8810fae 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -37,6 +37,8 @@ import com.android.inputmethod.latin.utils.TargetPackageInfoGetterTask; import java.util.Arrays; import java.util.Locale; +import javax.annotation.Nonnull; + /** * When you call the constructor of this class, you may want to change the current system locale by * using {@link com.android.inputmethod.latin.utils.RunInLocale}. @@ -85,6 +87,7 @@ public class SettingsValues { public final int mScreenMetrics; // From the input box + @Nonnull public final InputAttributes mInputAttributes; // Deduced settings @@ -115,7 +118,7 @@ public class SettingsValues { public final float mKeyPreviewDismissEndYScale; public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res, - final InputAttributes inputAttributes) { + @Nonnull final InputAttributes inputAttributes) { mLocale = res.getConfiguration().locale; // Get the resources mDelayInMillisecondsToUpdateOldSuggestions = @@ -123,12 +126,7 @@ public class SettingsValues { mSpacingAndPunctuations = new SpacingAndPunctuations(res); // Store the input attributes - if (null == inputAttributes) { - mInputAttributes = new InputAttributes( - null, false /* isFullscreenMode */, context.getPackageName()); - } else { - mInputAttributes = inputAttributes; - } + mInputAttributes = inputAttributes; // Get the settings preferences mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); -- cgit v1.2.3-83-g751a