From 5f00fe09e9a611b647592188316e5999465df4d3 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 20 Oct 2014 14:48:56 +0900 Subject: Fix some compiler warnings This CL fixes the following compiler warnings. - Indirect access to static member - Access to a non-accessible member of an enclosing type - Parameter assignment - Method can be static - Local variable declaration hides another field or variable - Value of local variable is not used - Unused import - Unused private member - Unnecessary 'else' statement - Unnecessary declaration of throw exception - Redundant type arguments - Missing '@Override' annotation - Unused '@SuppressWarning' annotations Bug: 18003991 Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7 --- .../inputmethod/latin/settings/RadioButtonPreference.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java') diff --git a/java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java b/java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java index c173d4706..91444604d 100644 --- a/java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java +++ b/java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java @@ -43,9 +43,7 @@ public class RadioButtonPreference extends Preference { private final View.OnClickListener mClickListener = new View.OnClickListener() { @Override public void onClick(final View v) { - if (mListener != null) { - mListener.onRadioButtonClicked(RadioButtonPreference.this); - } + callListenerOnRadioButtonClicked(); } }; @@ -67,6 +65,12 @@ public class RadioButtonPreference extends Preference { mListener = listener; } + void callListenerOnRadioButtonClicked() { + if (mListener != null) { + mListener.onRadioButtonClicked(this); + } + } + @Override protected void onBindView(final View view) { super.onBindView(view); -- cgit v1.2.3-83-g751a