예제 #1
0
  @Override
  public void fillLayout(SipProfile account) {
    super.fillLayout(account);

    if (!TextUtils.isEmpty(account.username)) {
      String[] parts = account.username.split("@");
      accountAuthorization.setText(parts[0]);
    }

    accountAuthorization.setTitle("Zugangsnummer");
    accountAuthorization.setDialogTitle("Zugangsnummer");
    accountAuthorization.setDialogMessage("The id which is used for online access");
    accountAuthorization.getEditText().setInputType(InputType.TYPE_CLASS_PHONE);

    accountUsername.setTitle("Phone Number");
    accountUsername.setDialogTitle("Phone Number");
    accountUsername.setDialogMessage("Your phone number provieded by Telekom");
    accountUsername.getEditText().setInputType(InputType.TYPE_CLASS_PHONE);

    accountPassword.setTitle("Zugangspassword");
    accountPassword.setDialogTitle("Zugangspassword");
    accountPassword.setDialogMessage("The password which is used for online access");

    hidePreference(null, SERVER);
  }
예제 #2
0
  @Override
  public void fillLayout(final SipProfile account) {
    super.fillLayout(account);

    accountUsername.setTitle(R.string.w_advanced_caller_id);
    accountUsername.setDialogTitle(R.string.w_advanced_caller_id_desc);

    boolean recycle = true;
    providerListPref = (ListPreference) findPreference(PROVIDER_LIST_KEY);
    if (providerListPref == null) {
      Log.d(THIS_FILE, "Create new list pref");
      providerListPref = new ListPreference(parent);
      providerListPref.setKey(PROVIDER_LIST_KEY);
      recycle = false;
    } else {
      Log.d(THIS_FILE, "Recycle existing list pref");
    }

    CharSequence[] v = new CharSequence[providers.size()];
    int i = 0;
    for (String pv : providers.keySet()) {
      v[i] = pv;
      i++;
    }

    providerListPref.setEntries(v);
    providerListPref.setEntryValues(v);
    providerListPref.setKey(PROVIDER);
    providerListPref.setDialogTitle("Provider");
    providerListPref.setTitle("Provider");
    providerListPref.setSummary("Betamax clone provider");
    providerListPref.setDefaultValue("12VoIP");

    if (!recycle) {
      addPreference(providerListPref);
    }
    hidePreference(null, SERVER);

    String domain = account.getDefaultDomain();
    if (domain != null) {
      for (Entry<String, String[]> entry : providers.entrySet()) {
        String[] val = entry.getValue();
        if (val[0].equalsIgnoreCase(domain)) {
          Log.d(THIS_FILE, "Set provider list pref value to " + entry.getKey());
          providerListPref.setValue(entry.getKey());
          break;
        }
      }
    }
    Log.d(THIS_FILE, providerListPref.getValue());

    // Get wizard specific row
    customWizardText = (TextView) parent.findViewById(R.id.custom_wizard_text);
    customWizard = (LinearLayout) parent.findViewById(R.id.custom_wizard_row);

    updateAccountInfos(account);
  }
예제 #3
0
  @Override
  public void setDefaultParams(PreferencesWrapper prefs) {
    super.setDefaultParams(prefs);
    // Disable ICE and turn on STUN!!!
    prefs.setPreferenceBooleanValue(SipConfigManager.ENABLE_STUN, true);
    String provider = providerListPref.getValue();
    if (provider != null) {
      String[] set = providers.get(provider);
      if (!TextUtils.isEmpty(set[1])) {
        prefs.addStunServer(set[1]);
      }
    }

    prefs.setPreferenceBooleanValue(SipConfigManager.ENABLE_ICE, false);
  }
예제 #4
0
 public void updateDescriptions() {
   super.updateDescriptions();
   setStringFieldSummary(PROVIDER);
 }
예제 #5
0
 @Override
 public void setDefaultParams(PreferencesWrapper prefs) {
   super.setDefaultParams(prefs);
   prefs.setPreferenceBooleanValue(SipConfigManager.ENABLE_STUN, true);
   prefs.addStunServer("stun.t-online.de");
 }