Remove pointless parent class EmailPreferenceFragment

Change-Id: Ia384d92632100c2adfb22c22c03d4755250e388e
This commit is contained in:
Tony Mantler 2013-08-27 14:20:23 -07:00
parent 801bb02408
commit 7be030ec8e
3 changed files with 7 additions and 41 deletions

View File

@ -35,6 +35,7 @@ import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceFragment;
import android.provider.CalendarContract;
import android.provider.ContactsContract;
import android.provider.Settings;
@ -76,7 +77,7 @@ import java.util.Map;
* TODO: Can we defer calling addPreferencesFromResource() until after we load the account? This
* could reduce flicker.
*/
public class AccountSettingsFragment extends EmailPreferenceFragment
public class AccountSettingsFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
// Keys used for arguments bundle
@ -200,6 +201,8 @@ public class AccountSettingsFragment extends EmailPreferenceFragment
}
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.account_settings_preferences);

View File

@ -1,39 +0,0 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.email.activity.setup;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.view.Menu;
import android.view.MenuInflater;
public class EmailPreferenceFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
//***
//if (!UiUtilities.useTwoPane(getActivity())) {
// menu.clear();
//}
}
}

View File

@ -22,6 +22,7 @@ import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.text.TextUtils;
import android.view.Menu;
@ -34,7 +35,7 @@ import com.android.email.provider.EmailProvider;
import com.android.mail.preferences.MailPrefs;
import com.android.mail.ui.settings.ClearPictureApprovalsDialogFragment;
public class GeneralPreferences extends EmailPreferenceFragment implements
public class GeneralPreferences extends PreferenceFragment implements
OnPreferenceChangeListener {
private static final String PREFERENCE_KEY_AUTO_ADVANCE = "auto_advance";
@ -67,6 +68,7 @@ public class GeneralPreferences extends EmailPreferenceFragment implements
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
mMailPrefs = MailPrefs.get(getActivity());
getPreferenceManager().setSharedPreferencesName(Preferences.PREFERENCES_FILE);