Removed Add Account button from preferences (useless with account setup assistant)
This commit is contained in:
parent
d10ad9a98b
commit
398e77d93b
4 changed files with 4 additions and 43 deletions
|
@ -9,7 +9,6 @@
|
||||||
<bool name="hide_camera_settings">false</bool>
|
<bool name="hide_camera_settings">false</bool>
|
||||||
<bool name="hide_wizard">false</bool>
|
<bool name="hide_wizard">false</bool>
|
||||||
<bool name="hide_accounts">false</bool>
|
<bool name="hide_accounts">false</bool>
|
||||||
<bool name="hide_add_account_button">false</bool> <!-- Accounts have to be displayed to show add account button -->
|
|
||||||
<bool name="useFirstLoginActivity">true</bool>
|
<bool name="useFirstLoginActivity">true</bool>
|
||||||
<bool name="disable_animations">false</bool>
|
<bool name="disable_animations">false</bool>
|
||||||
<bool name="show_full_remote_address_on_incoming_call">true</bool>
|
<bool name="show_full_remote_address_on_incoming_call">true</bool>
|
||||||
|
|
|
@ -241,13 +241,6 @@
|
||||||
|
|
||||||
<string name="pref_wifi_only">Use wifi only</string>
|
<string name="pref_wifi_only">Use wifi only</string>
|
||||||
|
|
||||||
<string name="wizard_username_hint">Username</string>
|
|
||||||
<string name="wizard_password_hint">Password</string>
|
|
||||||
<string name="wizard_password_confirm_hint">Confirmation</string>
|
|
||||||
<string name="wizard_email_hint">Email</string>
|
|
||||||
<string name="wizard_title">Account Setup Assistant</string>
|
|
||||||
<string name="wizard_create_account">Create Account</string>
|
|
||||||
<string name="wizard_cancel">Cancel</string>
|
|
||||||
<string name="wizard_failed">An error occurred, try again later.</string>
|
<string name="wizard_failed">An error occurred, try again later.</string>
|
||||||
<string name="wizard_server_unavailable">Server unreachable, verify your internet connection.</string>
|
<string name="wizard_server_unavailable">Server unreachable, verify your internet connection.</string>
|
||||||
<string name="wizard_username_unavailable">This username is already in use.</string>
|
<string name="wizard_username_unavailable">This username is already in use.</string>
|
||||||
|
@ -255,9 +248,6 @@
|
||||||
<string name="wizard_email_incorrect">Your email is not valid.</string>
|
<string name="wizard_email_incorrect">Your email is not valid.</string>
|
||||||
<string name="wizard_password_incorrect">Your password is not valid (6 characters min).</string>
|
<string name="wizard_password_incorrect">Your password is not valid (6 characters min).</string>
|
||||||
<string name="wizard_passwords_unmatched">Passwords entered are different.</string>
|
<string name="wizard_passwords_unmatched">Passwords entered are different.</string>
|
||||||
<string name="wizard_need_activation">You need to activate your account with the link that was send to your email.</string>
|
|
||||||
<string name="wizard_confirmation">Confirmation</string>
|
|
||||||
<string name="wizard_verify_account">Check</string>
|
|
||||||
|
|
||||||
<string name="pref_help_proxy">SIP proxy hostname or ip address (optional)</string>
|
<string name="pref_help_proxy">SIP proxy hostname or ip address (optional)</string>
|
||||||
<string name="pref_help_outbound_proxy">Route all calls through SIP proxy</string>
|
<string name="pref_help_outbound_proxy">Route all calls through SIP proxy</string>
|
||||||
|
@ -305,6 +295,7 @@
|
||||||
<string name="content_description_next"></string>
|
<string name="content_description_next"></string>
|
||||||
<string name="content_description_back"></string>
|
<string name="content_description_back"></string>
|
||||||
|
|
||||||
|
<string name="wizard_title">Account Setup Assistant</string>
|
||||||
<string name="setup_welcome">This assistant will help you to use a SIP account for your calls.</string>
|
<string name="setup_welcome">This assistant will help you to use a SIP account for your calls.</string>
|
||||||
<string name="setup_create_account">Create an account on linphone.org</string>
|
<string name="setup_create_account">Create an account on linphone.org</string>
|
||||||
<string name="setup_login_linphone">I already have a linphone.org account</string>
|
<string name="setup_login_linphone">I already have a linphone.org account</string>
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
android:title="@string/pref_enable_outbound_proxy"></CheckBoxPreference>-->
|
android:title="@string/pref_enable_outbound_proxy"></CheckBoxPreference>-->
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<Preference android:title="Add Account"></Preference>
|
|
||||||
<Preference android:title="@string/wizard_title"></Preference>
|
<Preference android:title="@string/wizard_title"></Preference>
|
||||||
|
|
||||||
<PreferenceCategory android:key="@string/pref_tunnel_key" android:title="@string/pref_tunnel">
|
<PreferenceCategory android:key="@string/pref_tunnel_key" android:title="@string/pref_tunnel">
|
||||||
|
|
|
@ -70,9 +70,8 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
|
||||||
|
|
||||||
private static final int ADD_SIP_ACCOUNT = 0x666;
|
private static final int ADD_SIP_ACCOUNT = 0x666;
|
||||||
private static final int ACCOUNTS_SETTINGS_ID = 1;
|
private static final int ACCOUNTS_SETTINGS_ID = 1;
|
||||||
private static final int ADD_ACCOUNT_SETTINGS_ID = 2;
|
private static final int WIZARD_SETTINGS_ID = 2;
|
||||||
private static final int WIZARD_SETTINGS_ID = 3;
|
private static final int CAMERA_SETTINGS_ID = 6;
|
||||||
private static final int CAMERA_SETTINGS_ID = 7;
|
|
||||||
private static final int EXIT_SETTINGS_ID = 0;
|
private static final int EXIT_SETTINGS_ID = 0;
|
||||||
|
|
||||||
private SharedPreferences prefs() {
|
private SharedPreferences prefs() {
|
||||||
|
@ -109,21 +108,6 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAddAccountButton() {
|
|
||||||
Preference addAccount = (Preference) getPreferenceScreen().getPreference(ADD_ACCOUNT_SETTINGS_ID);
|
|
||||||
addAccount.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
addExtraAccountPreferencesButton(accounts, nbAccounts, true);
|
|
||||||
Intent i = new Intent();
|
|
||||||
i.putExtra("Account",nbAccounts);
|
|
||||||
nbAccounts++;
|
|
||||||
i.setClass(PreferencesActivity.this, AccountPreferencesActivity.class);
|
|
||||||
startActivityForResult(i, ADD_SIP_ACCOUNT);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNbAccountsExtra() {
|
public int getNbAccountsExtra() {
|
||||||
return nbAccounts;
|
return nbAccounts;
|
||||||
}
|
}
|
||||||
|
@ -234,19 +218,7 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
|
||||||
|
|
||||||
if (!getResources().getBoolean(R.bool.hide_accounts)) {
|
if (!getResources().getBoolean(R.bool.hide_accounts)) {
|
||||||
createDynamicAccountsPreferences();
|
createDynamicAccountsPreferences();
|
||||||
|
} else {
|
||||||
// Accounts have to be displayed to show add account button
|
|
||||||
if (getResources().getBoolean(R.bool.hide_add_account_button)) {
|
|
||||||
Preference addAccount = (Preference) getPreferenceScreen().getPreference(ADD_ACCOUNT_SETTINGS_ID);
|
|
||||||
addAccount.setLayoutResource(R.layout.hidden);
|
|
||||||
} else {
|
|
||||||
createAddAccountButton();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Hide add account button if accounts are hidden
|
|
||||||
Preference addAccount = (Preference) getPreferenceScreen().getPreference(ADD_ACCOUNT_SETTINGS_ID);
|
|
||||||
addAccount.setLayoutResource(R.layout.hidden);
|
|
||||||
|
|
||||||
// Hide category
|
// Hide category
|
||||||
PreferenceCategory accounts = (PreferenceCategory) getPreferenceScreen().getPreference(ACCOUNTS_SETTINGS_ID);
|
PreferenceCategory accounts = (PreferenceCategory) getPreferenceScreen().getPreference(ACCOUNTS_SETTINGS_ID);
|
||||||
accounts.removeAll();
|
accounts.removeAll();
|
||||||
|
|
Loading…
Reference in a new issue