@TargetApi(Build.VERSION_CODES.HONEYCOMB)
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_sketch_properties);

    // StackOverflow: http://stackoverflow.com/a/27455330/1628609
    LinearLayout root =
        (LinearLayout) findViewById(android.R.id.list).getParent().getParent().getParent();
    toolbar = (Toolbar) LayoutInflater.from(this).inflate(R.layout.settings_toolbar, root, false);
    root.addView(toolbar, 0);

    toolbar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });

    initOptionsMenu(toolbar.getMenu());
    toolbar.setOnMenuItemClickListener(this);

    toolbar.setTitle(getGlobalState().getSketchName());

    getGlobalState().setProperties(this);

    getWindow()
        .getDecorView()
        .setBackgroundColor(getResources().getColor(R.color.activity_background));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mInstance = this;

    Globals.checkLocale(this);

    currentPlugin = "(none)";

    String filename = MenuActivity.mupen64plus_cfg.get("UI-Console", "AudioPlugin");
    if (filename == null
        || filename.length() < 1
        || filename.equals("\"\"")
        || filename.equals("\"dummy\""))
      filename = MenuActivity.gui_cfg.get("AUDIO_PLUGIN", "last_choice");
    if (filename != null) {
      MenuActivity.gui_cfg.put("AUDIO_PLUGIN", "last_choice", filename);
      filename = filename.replace("\"", "");
      int x = filename.lastIndexOf("/");
      if (x > -1 && x < (filename.length() - 1)) {
        currentPlugin = filename.substring(x + 1, filename.length());
        if (currentPlugin == null || currentPlugin.length() < 1) currentPlugin = "(none)";
      }
    }

    // Load preferences from XML
    addPreferencesFromResource(R.layout.preferences_audio);

    final Preference settingsAudioChange = findPreference("menuSettingsAudioChange");
    settingsAudioChange.setSummary(currentPlugin);
    settingsAudioChange.setOnPreferenceClickListener(
        new OnPreferenceClickListener() {

          public boolean onPreferenceClick(Preference preference) {
            Intent intent = new Intent(mInstance, MenuSettingsAudioChangeActivity.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            startActivity(intent);
            return true;
          }
        });

    // Enable Plugin setting
    final CheckBoxPreference settingsEnableAudio =
        (CheckBoxPreference) findPreference("menuSettingsAudioEnabled");
    settingsEnableAudio.setOnPreferenceClickListener(
        new OnPreferenceClickListener() {

          public boolean onPreferenceClick(Preference preference) {
            MenuActivity.gui_cfg.put(
                "AUDIO_PLUGIN", "enabled", (settingsEnableAudio.isChecked() ? "1" : "0"));
            MenuActivity.mupen64plus_cfg.put(
                "UI-Console",
                "AudioPlugin",
                (settingsEnableAudio.isChecked()
                    ? MenuActivity.gui_cfg.get("AUDIO_PLUGIN", "last_choice")
                    : "\"dummy\""));
            return true;
          }
        });
  }
  @Override
  public void onCreate(Bundle savedState) {

    super.onCreate(savedState);

    addPreferencesFromResource(R.xml.preferences);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    taskDatabaseMap = TaskDatabaseMap.getInstance(this);

    addPreferencesFromResource(R.xml.preferences);

    initDurationPreference(ConfigType.TASK_DURATION);
    initDurationPreference(ConfigType.BREAK_DURATION);
    initDurationPreference(ConfigType.EVERY_FOURTH_BREAK_DURATION);

    ringTonePreference =
        (RingtonePreference) findPreference(ConfigType.NOTIFICATION_RINGTONE.name());
    ringTonePreference.setOnPreferenceChangeListener(
        new OnPreferenceChangeListener() {

          public boolean onPreferenceChange(Preference preference, Object newValue) {

            updateRingtonePreferenceSummary((String) newValue);
            taskDatabaseMap.getPreferences().updateRingtone((String) newValue);
            return false;
          }
        });

    String selectedRingtone = taskDatabaseMap.getPreferences().getRingtone();
    if (selectedRingtone != null) {
      updateRingtonePreferenceSummary(selectedRingtone);
    }
  }
Example #5
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(getIntent().getExtras().getInt("xml"));
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Load the preferences from an XML resource
    addPreferencesFromResource(R.xml.preferences);
  }
Example #7
0
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.settings);

    // set the self test summary with the configured value
    setDiagnosticsPrefSummary(findPreference(KEY_DIAGNOSTICS));

    // add shared preferences change listener
    getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);

    // create a link to the market to search for additional coin packages
    final Preference downloadPref = getPreferenceManager().findPreference("download");
    downloadPref.setOnPreferenceClickListener(
        new OnPreferenceClickListener() {
          public boolean onPreferenceClick(final Preference preference) {
            final Intent goToMarket =
                new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=" + EXTPKG_QUERY));
            startActivity(goToMarket);
            return true;
          }
        });

    // load any external coin packages installed on the system
    loadExtPkgCoins();
  }
 @SuppressWarnings("deprecation")
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   addPreferencesFromResource(R.xml.pref);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setTheme(mThemeId);

    ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
    View content = root.getChildAt(0);
    LinearLayout toolbarContainer = (LinearLayout) View.inflate(this, R.layout.activity_pref, null);

    root.removeAllViews();
    toolbarContainer.addView(content);
    root.addView(toolbarContainer);

    mToolBar = (Toolbar) toolbarContainer.findViewById(R.id.toolbar);

    mToolBar = (Toolbar) toolbarContainer.findViewById(R.id.toolbar);
    mToolBar.setTitle(getTitle());
    mToolBar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
    mToolBar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   getPreferenceManager().setSharedPreferencesName(SHARED_PREFS_NAME);
   addPreferencesFromResource(R.xml.wallpaper_settings);
   getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.userpreferences);

    settings = PreferenceManager.getDefaultSharedPreferences(this);

    mPrefGlobalVideoRenderMode =
        (ListPreference)
            getPreferenceScreen().findPreference(PrefsHelper.PREF_GLOBAL_VIDEO_RENDER_MODE);
    mPrefPortraitMode =
        (ListPreference)
            getPreferenceScreen().findPreference(PrefsHelper.PREF_PORTRAIT_SCALING_MODE);
    mPrefLandsMode =
        (ListPreference)
            getPreferenceScreen().findPreference(PrefsHelper.PREF_LANDSCAPE_SCALING_MODE);
    mPrefPortraitFilterType =
        (ListPreference)
            getPreferenceScreen().findPreference(PrefsHelper.PREF_PORTRAIT_FILTER_TYPE);
    mPrefLandsFilterType =
        (ListPreference)
            getPreferenceScreen().findPreference(PrefsHelper.PREF_LANDSCAPE_FILTER_TYPE);
    mPrefControllerType =
        (ListPreference) getPreferenceScreen().findPreference(PrefsHelper.PREF_CONTROLLER_TYPE);
    mPrefExtInput =
        (ListPreference) getPreferenceScreen().findPreference(PrefsHelper.PREF_INPUT_EXTERNAL);
    mPrefAnalogDZ =
        (ListPreference) getPreferenceScreen().findPreference(PrefsHelper.PREF_ANALOG_DZ);
    mPrefTiltDZ = (ListPreference) getPreferenceScreen().findPreference(PrefsHelper.PREF_TILT_DZ);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getPreferenceManager() != null) {
      addPreferencesFromResource(R.xml.operator_preferences);
      PreferenceScreen prefSet = getPreferenceScreen();

      mOperatorDisplayStyle = (ListPreference) prefSet.findPreference(OPERATOR_STYLE);
      mOperatorDisplayStyle.setOnPreferenceChangeListener(this);

      mOperatorDisplayText = (EditTextPreference) prefSet.findPreference(OPERATOR_TEXT);
      mOperatorDisplayText.setOnPreferenceChangeListener(this);

      if (mOperatorDisplayText != null) {
        String operLabel = mOperatorDisplayText.getText();
        if (TextUtils.isEmpty(operLabel)) {
          mOperatorDisplayText.setSummary(getString(R.string.operator_display_summary));
        } else {
          mOperatorDisplayText.setSummary(mOperatorDisplayText.getText());
        }
      }

      int index = Settings.System.getInt(getContentResolver(), CARRIER_LABEL_TYPE, 0);
      index = index > (mOperatorDisplayStyle.getEntries().length - 1) ? 0 : index;
      mOperatorDisplayStyle.setSummary(mOperatorDisplayStyle.getEntries()[index]);

      mOperatorDisplayText.setEnabled(index == 3);
    }
  }
Example #13
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   addPreferencesFromResource(R.xml.pref_general);
   // setupActionBar();
   bindPreferenceSummaryToValue(findPreference("sort_by"));
 }
  @Override
  @SuppressWarnings("deprecation")
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.preferences);
  }
 @Override
 protected void onCreate(Bundle icicle) {
   super.onCreate(icicle);
   getPreferenceManager().setSharedPreferencesName(SundancerWallpaper.SHARED_PREFS_NAME);
   addPreferencesFromResource(R.xml.sundancer_settings);
   getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
 }
Example #16
0
  @Override
  protected void onCreate(Bundle icicle) {
    // Workaround for bug 4611: http://code.google.com/p/android/issues/detail?id=4611
    if (AnkiDroidApp.SDK_VERSION >= 7 && AnkiDroidApp.SDK_VERSION <= 10) {
      Themes.applyTheme(this, Themes.THEME_ANDROID_DARK);
    }
    super.onCreate(icicle);

    mCol = AnkiDroidApp.getCol();
    if (mCol == null) {
      finish();
      return;
    }
    mDeck = mCol.getDecks().current();

    registerExternalStorageListener();

    if (mCol == null) {
      Log.i(AnkiDroidApp.TAG, "DeckOptions - No Collection loaded");
      finish();
      return;
    } else {
      mPref = new DeckPreferenceHack();
      mPref.registerOnSharedPreferenceChangeListener(this);

      this.addPreferencesFromResource(R.xml.deck_options);
      this.buildLists();
      this.updateSummaries();
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.preferences);

    settings = SettingsStorage.getInstance();
    cputunerActionBar = (CputunerActionBar) findViewById(R.id.abCpuTuner);
    if (SettingsStorage.getInstance(this).hasHoloTheme()) {
      getActionBar().setTitle(R.string.app_name);
      cputunerActionBar.setVisibility(View.GONE);
    } else {
      cputunerActionBar.setHomeAction(
          new ActionBar.Action() {

            @Override
            public void performAction(View view) {
              onBackPressed();
            }

            @Override
            public int getDrawable() {
              return R.drawable.cputuner_back;
            }
          });
    }
  }
  @Override
  @SuppressWarnings("deprecation")
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.addPreferencesFromResource(R.xml.preferences);

    int prefs[] =
        new int[] {
          R.string.pref_highlight,
          R.string.pref_wherigo_engine_deviceid,
          R.string.pref_wherigo_engine_platform,
          R.string.pref_sensors_compass_hardware,
          R.string.pref_sensors_compass_auto_change,
          R.string.pref_sensors_compass_auto_change_value,
          R.string.pref_cartridgelist_sorting,
          R.string.pref_cartridgelist_anywhere_first,
          R.string.pref_scan_external_storage,
          R.string.pref_exclude_android_dir,
          R.string.pref_exclude_hidden_dirs,
          R.string.pref_exclude_whereyougo_dir,
          R.string.pref_include_dropbox_dir
          // , R.string.pref_guiding_compass_sounds
          ,
          R.string.pref_guiding_sound_type,
          R.string.pref_guiding_sound_distance
        };

    for (int i = 0; i < prefs.length; i++) {
      Preference preference = findPreference(prefs[i]);
      if (preference != null) {
        preference.setOnPreferenceChangeListener(this);
      }
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    PreferenceManager.getDefaultSharedPreferences(this)
        .registerOnSharedPreferenceChangeListener(this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.notification_pref);

    mNotification = (CheckBoxPreference) this.findPreference("notification_bar");
    mNotifyIcon = (ListPreference) this.findPreference("notification_bar_icon");
    mLed = (CheckBoxPreference) this.findPreference("led_enabled");
    mLedPattern = (ListPreference) this.findPreference("led_pattern");
    mLedColor = (ListPreference) this.findPreference("led_color");
    mRinger = (CheckBoxPreference) this.findPreference("ringer_enabled");
    mRingtone = (RingtonePref) this.findPreference("ringtone");
    mRingVolume = (VolumePref) this.findPreference("ring_volume");
    mVibrate = (CheckBoxPreference) this.findPreference("vibrate_enabled");
    mVibratePattern = (ListPreference) this.findPreference("vibrate_pattern");

    if (mNotification == null
        || mLed == null
        || mRinger == null
        || mVibrate == null
        || mRingtone == null
        || mRingVolume == null
        || mNotifyIcon == null
        || mLedPattern == null
        || mLedColor == null
        || mVibratePattern == null) {
      if (Log.LOGV)
        Log.e(
            TAG
                + "One of our preferences has a null pointer and none of  them should be null\n bailing...");
      finish();
      return;
    }
  }
Example #21
0
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    addPreferencesFromResource(R.xml.my_phone_number);
    mPhoneNumberStatus = findPreference(KEY_PHONE_NUMBER_STATUS_PREFERENCE);

    mTelephonyManager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);

    mPhone = PhoneFactory.getDefaultPhone();

    String rawNumber = mTelephonyManager.getLine1Number();
    String formattedNumber = null;

    if (!TextUtils.isEmpty(rawNumber)) {
      formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
    } else {
      formattedNumber = getResources().getString(R.string.unknown);
    }

    mPhoneNumberStatus.setSummary(formattedNumber);

    Log.d(LOG_TAG, " sim state: " + mTelephonyManager.getSimState());

    // Check SIM status
    if (mTelephonyManager.getSimState() != TelephonyManager.SIM_STATE_READY) {
      showNoSimAlertDialog();
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.settings);
    addPreferencesFromResource(R.xml.preferences);

    if (Build.VERSION.SDK_INT >= 11) {
      try {
        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
      } catch (Exception e) {
        Log.e(TAG, "Unexpected error with action bar", e);
      }
    }

    // Get a reference to the preferences
    mCheckBoxPreferenceOverview =
        (CheckBoxPreference)
            getPreferenceScreen().findPreference(Constants.KEY_SHOW_SUMMARY_OVERVIEW);
    mCheckBoxPreferencePods =
        (CheckBoxPreference) getPreferenceScreen().findPreference(Constants.KEY_SHOW_SUMMARY_PODS);
    mCheckBoxPreferenceAllgemein =
        (CheckBoxPreference) getPreferenceScreen().findPreference(Constants.KEY_USE_WIDE_VIEW_PORT);
    mListPreference =
        (ListPreference)
            getPreferenceScreen().findPreference(Constants.KEY_NUMBER_OF_PODS_PREFERENCE);

    sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

    new Ads(this);
  }
Example #23
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getActionBar().setDisplayHomeAsUpEnabled(true);

    SharedPreferences p = MultiROMMgrApplication.getPreferences();
    if (p.getString(GENERAL_DOWNLOAD_DIR, null) == null)
      Utils.setDownloadDir(Utils.getDefaultDownloadDir());

    addPreferencesFromResource(R.xml.settings);

    addDevOptions();

    p.registerOnSharedPreferenceChangeListener(this);
    updatePrefText();

    try {
      PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
      Preference pref = findPreference(ABOUT_VERSION);
      pref.setSummary(pInfo.versionName);
      pref.setOnPreferenceClickListener(this);
    } catch (PackageManager.NameNotFoundException e) {
      e.printStackTrace();
    }

    Preference pref = findPreference(ABOUT_LICENSES);
    pref.setOnPreferenceClickListener(this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (Utils.isMonkeyRunning()) {
      finish();
      return;
    }

    addPreferencesFromResource(R.xml.sim_lock_settings);

    mPinDialog = (EditPinPreference) findPreference(PIN_DIALOG);
    mPinToggle = (CheckBoxPreference) findPreference(PIN_TOGGLE);
    if (savedInstanceState != null && savedInstanceState.containsKey(DIALOG_STATE)) {
      mDialogState = savedInstanceState.getInt(DIALOG_STATE);
      mPin = savedInstanceState.getString(DIALOG_PIN);
      mError = savedInstanceState.getString(DIALOG_ERROR);
      mToState = savedInstanceState.getBoolean(ENABLE_TO_STATE);
    }

    mPinDialog.setOnPinEnteredListener(this);

    // Don't need any changes to be remembered
    getPreferenceScreen().setPersistent(false);

    mPhone = PhoneFactory.getDefaultPhone();
    mRes = getResources();
  }
Example #25
0
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.option);

    geted = PreferenceManager.getDefaultSharedPreferences(this).edit();
    geted.putBoolean("AI", false);
    geted.putString("name", Nom);
    geted.putString("surname", Prénom);
    geted.putString("nickname", Pseudonyme);

    geted.putString("IPadress", IPAdress);
    if (externe) {
      geted.putBoolean("externe", true);
      geted.putString("IPadress_ext", IPadress_ext);
      geted.putString("SSID", SSID);
    } else {
      geted.putBoolean("externe", false);
    }
    geted.putBoolean("shake", ShakeService);
    geted.putBoolean("event", EventService);
    geted.putBoolean("tts_pref", TTS);
    geted.putBoolean("update", Update_Com);
    geted.commit();

    ListPreference lp = (ListPreference) findPreference("sexe");
    lp.setEntries(Values);
    lp.setEntryValues(Values);
    if (Sexe < 3) lp.setValue(Values[Sexe]);

    finish();
  }
Example #26
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    if (Preferences.isRunning) this.finish();
    else Preferences.isRunning = true;

    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.preferences);

    prefs =
        PreferenceManager.getDefaultSharedPreferences(
            this); /* getSharedPreferences("preferences", Activity.MODE_PRIVATE); */
    String currentCityName = prefs.getString("cityName", getString(R.string.defaultCity));

    customPref = (Preference) findPreference("cid");
    customPref.setSummary(getString(R.string.chosen) + currentCityName);

    customPref.setOnPreferenceClickListener(
        new OnPreferenceClickListener() {

          public boolean onPreferenceClick(Preference preference) {

            Intent cityPickActivity = new Intent(getBaseContext(), CityPickActivity.class);
            startActivity(cityPickActivity);
            return true;
          }
        });
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /* Inflate UI preference options */
    addPreferencesFromResource(R.xml.preferences_stopinfo);
  }
Example #28
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // in our main activity we used setContent at this point, but here we making a prefs menu
    addPreferencesFromResource(R.xml.prefs);
  }
Example #29
0
  @Override
  protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    addPreferencesFromResource(R.xml.apn_settings);
    getListView().setItemsCanFocus(true);

    mExt = Utils.getMiscPlugin(this);
    mRcseExt = Utils.getRcseApnPlugin(this);
    if (mRcseExt != null) {
      mRcseExt.addRcseOnlyApnStateChanged(mListener);
    } else {
      Xlog.d(TAG, "mApnPlugin is null");
    }
    initSimState();

    mMobileStateFilter = getIntentFilter();
    mReceiver = getBroadcastReceiver();
    mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
    mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
    if (FeatureOption.MTK_MVNO_SUPPORT) {
      setSpn();
      setIMSI();
      setPnn();
    }
  }
  @SuppressWarnings("deprecation")
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getPreferenceManager().setSharedPreferencesMode(MODE_WORLD_READABLE);
    addPreferencesFromResource(R.xml.pref_general);

    dnsTestPreference = findPreference(Settings.DNS_TEST_KEY);
    dnsTestPreference.setOnPreferenceClickListener(
        new Preference.OnPreferenceClickListener() {
          @Override
          public boolean onPreferenceClick(final Preference preference) {
            if (dnsTestTask == null) {
              dnsTestTask = new DnsTestTask();
              dnsTestTask.execute();
            }
            return false;
          }
        });

    checkState();
    checkIcon();

    // unnecessary for now, hide temporarily
    PreferenceScreen preferenceScreen = getPreferenceScreen();
    preferenceScreen.removePreference(findPreference(Settings.DNS_SERVER_KEY));
    preferenceScreen.removePreference(findPreference(Settings.DNS_TEST_KEY));
    preferenceScreen.removePreference(findPreference(Settings.DNS_INSTRUCTION_KEY));
  }