diff options
Diffstat (limited to 'src/com')
6 files changed, 9 insertions, 15 deletions
diff --git a/src/com/android/camera/ui/InLineSettingItem.java b/src/com/android/camera/ui/InLineSettingItem.java index 1d64c7a..6f84e6f 100644 --- a/src/com/android/camera/ui/InLineSettingItem.java +++ b/src/com/android/camera/ui/InLineSettingItem.java @@ -35,7 +35,6 @@ import android.widget.TextView; * different types if possible. */ public abstract class InLineSettingItem extends LinearLayout { - protected Context mContext; private Listener mListener; protected ListPreference mPreference; protected int mIndex; @@ -48,7 +47,6 @@ public abstract class InLineSettingItem extends LinearLayout { public InLineSettingItem(Context context, AttributeSet attrs) { super(context, attrs); - mContext = context; } protected void setTitle(ListPreference preference) { diff --git a/src/com/android/camera/ui/InLineSettingRestore.java b/src/com/android/camera/ui/InLineSettingRestore.java index daba811..5262e22 100644 --- a/src/com/android/camera/ui/InLineSettingRestore.java +++ b/src/com/android/camera/ui/InLineSettingRestore.java @@ -33,7 +33,7 @@ public class InLineSettingRestore extends InLineSettingItem { @Override protected void setTitle(ListPreference preference) { ((TextView) findViewById(R.id.title)).setText( - mContext.getString(R.string.pref_restore_detail)); + getContext().getString(R.string.pref_restore_detail)); } protected void updateView() { } diff --git a/src/com/android/camera/ui/IndicatorButton.java b/src/com/android/camera/ui/IndicatorButton.java index 9f1cfd5..b384b4e 100644 --- a/src/com/android/camera/ui/IndicatorButton.java +++ b/src/com/android/camera/ui/IndicatorButton.java @@ -100,7 +100,7 @@ public class IndicatorButton extends AbstractIndicatorButton implements BasicSet @Override protected void initializePopup() { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( + LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); ViewGroup root = (ViewGroup) getRootView().findViewById(R.id.frame_layout); diff --git a/src/com/android/camera/ui/IndicatorControl.java b/src/com/android/camera/ui/IndicatorControl.java index 2a24c2e..03003d8 100644 --- a/src/com/android/camera/ui/IndicatorControl.java +++ b/src/com/android/camera/ui/IndicatorControl.java @@ -40,7 +40,6 @@ public abstract class IndicatorControl extends RelativeLayout implements public static final int MODE_CAMERA = 0; public static final int MODE_VIDEO = 1; - private Context mContext; private OnPreferenceChangedListener mListener; protected OnIndicatorEventListener mOnIndicatorEventListener; protected CameraPicker mCameraPicker; @@ -60,7 +59,6 @@ public abstract class IndicatorControl extends RelativeLayout implements public IndicatorControl(Context context, AttributeSet attrs) { super(context, attrs); - mContext = context; } public void setDegree(int degree) { @@ -84,7 +82,7 @@ public abstract class IndicatorControl extends RelativeLayout implements mPreferenceGroup = group; // Preset the current mode from the title of preference group. String title = group.getTitle(); - if (title.equals(mContext.getString( + if (title.equals(getContext().getString( R.string.pref_camcorder_settings_category))) { mCurrentMode = MODE_VIDEO; } @@ -96,14 +94,14 @@ public abstract class IndicatorControl extends RelativeLayout implements IconListPreference pref = (IconListPreference) mPreferenceGroup.findPreference(keys[i]); if (pref != null) { - addIndicator(mContext, pref); + addIndicator(getContext(), pref); } } } // Add other settings indicator. if (otherSettingKeys != null) { - addOtherSettingIndicator(mContext, + addOtherSettingIndicator(getContext(), R.drawable.ic_menu_overflow, otherSettingKeys); } } @@ -112,7 +110,7 @@ public abstract class IndicatorControl extends RelativeLayout implements ListPreference pref = mPreferenceGroup.findPreference( CameraSettings.KEY_CAMERA_ID); if (pref == null) return; - mCameraPicker = new CameraPicker(mContext); + mCameraPicker = new CameraPicker(getContext()); mCameraPicker.initialize(pref); addView(mCameraPicker); } diff --git a/src/com/android/camera/ui/OtherSettingIndicatorButton.java b/src/com/android/camera/ui/OtherSettingIndicatorButton.java index 69d627a..58dcf6f 100644 --- a/src/com/android/camera/ui/OtherSettingIndicatorButton.java +++ b/src/com/android/camera/ui/OtherSettingIndicatorButton.java @@ -51,7 +51,7 @@ public class OtherSettingIndicatorButton extends AbstractIndicatorButton { @Override protected void initializePopup() { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( + LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); ViewGroup root = (ViewGroup) getRootView().findViewById(R.id.frame_layout); diff --git a/src/com/android/camera/ui/OtherSettingsPopup.java b/src/com/android/camera/ui/OtherSettingsPopup.java index 1357012..4b82c20 100644 --- a/src/com/android/camera/ui/OtherSettingsPopup.java +++ b/src/com/android/camera/ui/OtherSettingsPopup.java @@ -40,7 +40,6 @@ public class OtherSettingsPopup extends AbstractSettingPopup AdapterView.OnItemClickListener { private static final String TAG = "OtherSettingsPopup"; - private Context mContext; private Listener mListener; private ArrayList<ListPreference> mListItem = new ArrayList<ListPreference>(); @@ -53,8 +52,8 @@ public class OtherSettingsPopup extends AbstractSettingPopup LayoutInflater mInflater; OtherSettingsAdapter() { - super(mContext, 0, mListItem); - mInflater = LayoutInflater.from(mContext); + super(OtherSettingsPopup.this.getContext(), 0, mListItem); + mInflater = LayoutInflater.from(getContext()); } private int getSettingLayoutId(ListPreference pref) { @@ -92,7 +91,6 @@ public class OtherSettingsPopup extends AbstractSettingPopup public OtherSettingsPopup(Context context, AttributeSet attrs) { super(context, attrs); - mContext = context; } public void initialize(PreferenceGroup group, String[] keys) { |