Bug 1041632 - Part 5: eliminate enclosing instance member access in FormAssistPopup. r=ckitching
authorRichard Newman <rnewman@mozilla.com>
Mon, 21 Jul 2014 10:20:22 -0700
changeset 195368 0f90d365211db06383e134042e8daa38fba5cce2
parent 195367 f2cd4cc933c55f288e0d2fa186d7ad877bea535e
child 195369 e014881a4d8d32e6c6a45a368519d08401a764c7
push id46575
push userkwierso@gmail.com
push dateTue, 22 Jul 2014 00:35:21 +0000
treeherdermozilla-inbound@fee5c4bdd713 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckitching
bugs1041632
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1041632 - Part 5: eliminate enclosing instance member access in FormAssistPopup. r=ckitching
mobile/android/base/FormAssistPopup.java
--- a/mobile/android/base/FormAssistPopup.java
+++ b/mobile/android/base/FormAssistPopup.java
@@ -33,18 +33,18 @@ import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import java.util.Arrays;
 import java.util.Collection;
 
 public class FormAssistPopup extends RelativeLayout implements GeckoEventListener {
-    private Context mContext;
-    private Animation mAnimation;
+    private final Context mContext;
+    private final Animation mAnimation;
 
     private ListView mAutoCompleteList;
     private RelativeLayout mValidationMessage;
     private TextView mValidationMessageText;
     private ImageView mValidationMessageArrow;
     private ImageView mValidationMessageArrowInverted;
 
     private double mX;
@@ -358,17 +358,17 @@ public class FormAssistPopup extends Rel
 
     private class AutoCompleteListAdapter extends ArrayAdapter<Pair<String, String>> {
         private LayoutInflater mInflater;
         private int mTextViewResourceId;
 
         public AutoCompleteListAdapter(Context context, int textViewResourceId) {
             super(context, textViewResourceId);
 
-            mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
             mTextViewResourceId = textViewResourceId;
         }
 
         // This method takes an array of autocomplete suggestions with label/value properties
         // and adds label/value Pair objects to the array that backs the adapter.
         public void populateSuggestionsList(JSONArray suggestions) {
             try {
                 for (int i = 0; i < suggestions.length(); i++) {