# HG changeset patch # User darisk@kaaliyah # Date 1249856819 -7200 # Node ID 5dee5c1e4a2925cdce62499bf36d076c4503715f # Parent c57c94a97ff23a9c9125c17680f904cdd56c8c41 Some checkstyle rules diff -r c57c94a97ff2 -r 5dee5c1e4a29 src/com/beem/project/beem/ui/AddContact.java --- a/src/com/beem/project/beem/ui/AddContact.java Sun Aug 09 23:58:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/AddContact.java Mon Aug 10 00:26:59 2009 +0200 @@ -32,7 +32,7 @@ protected static final String TAG = "AddContact"; private final List mGroup = new ArrayList(); - private IXmppFacade xmppFacade; + private IXmppFacade mXmppFacade; private final ServiceConnection mServConn = new BeemServiceConnection(); @Override @@ -54,12 +54,12 @@ @Override public void onServiceConnected(ComponentName name, IBinder service) { - xmppFacade = IXmppFacade.Stub.asInterface(service); + mXmppFacade = IXmppFacade.Stub.asInterface(service); } @Override public void onServiceDisconnected(ComponentName name) { - xmppFacade = null; + mXmppFacade = null; } } @@ -89,10 +89,10 @@ if (getWidgetText(R.id.addc_group).length() != 0) mGroup.add(getWidgetText(R.id.addc_group)); try { - if (xmppFacade != null) { - if (xmppFacade.getRoster().getContact(login) != null) - mGroup.addAll(xmppFacade.getRoster().getContact(login).getGroups()); - if (xmppFacade.getRoster().addContact(login, alias, mGroup.toArray(new String[mGroup.size()])) == null) { + if (mXmppFacade != null) { + if (mXmppFacade.getRoster().getContact(login) != null) + mGroup.addAll(mXmppFacade.getRoster().getContact(login).getGroups()); + if (mXmppFacade.getRoster().addContact(login, alias, mGroup.toArray(new String[mGroup.size()])) == null) { Toast.makeText(AddContact.this, getString(R.string.AddCContactAddedError), Toast.LENGTH_SHORT) .show(); return; diff -r c57c94a97ff2 -r 5dee5c1e4a29 src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Sun Aug 09 23:58:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Mon Aug 10 00:26:59 2009 +0200 @@ -47,13 +47,13 @@ public static final String DEFAULT_GROUP = "Default"; private MyExpandableListAdapter mAdapter; private IRoster mRoster; - private Map> groupMap; - private List groupName; + private Map> mGroupMap; + private List mGroupName; private List mListContact; private Handler mHandler; - private IXmppFacade xmppFacade = null; + private IXmppFacade mXmppFacade = null; private final ServiceConnection mServConn = new BeemServiceConnection(); - private int REQUEST_CODE = 1; + private static final int REQUEST_CODE = 1; /** * Callback for menu creation. @@ -103,8 +103,8 @@ protected void onCreate(Bundle saveBundle) { super.onCreate(saveBundle); mHandler = new Handler(); - groupMap = new HashMap>(); - groupName = new ArrayList(); + mGroupMap = new HashMap>(); + mGroupName = new ArrayList(); } @Override @@ -118,8 +118,8 @@ Log.e(TAG, "UNBINSERVICE"); super.onStop(); unbindService(mServConn); - groupName.clear(); - groupMap.clear(); + mGroupName.clear(); + mGroupMap.clear(); } class ComparatorContactListByName implements Comparator { @@ -144,7 +144,7 @@ private void buildContactList(List listContact) { mListContact = listContact; Collections.sort(mListContact, new ComparatorContactListByStatusAndName()); - Collections.sort(groupName); + Collections.sort(mGroupName); for (Contact contact : mListContact) { for (String group : contact.getGroups()) { addGroup(group); @@ -155,36 +155,36 @@ addContactInGroup(contact, DEFAULT_GROUP); } } - Collections.sort(groupName); + Collections.sort(mGroupName); mAdapter = new MyExpandableListAdapter(); setListAdapter(mAdapter); } protected void addGroup(String group) { - if (!groupMap.containsKey(group)) { - groupMap.put(group, new ArrayList()); - groupName.add(group); + if (!mGroupMap.containsKey(group)) { + mGroupMap.put(group, new ArrayList()); + mGroupName.add(group); } } protected void addContactInGroup(Contact c, String group) { boolean found = false; - for (Contact tmpContact : groupMap.get(group)) { + for (Contact tmpContact : mGroupMap.get(group)) { if (c.getJID().equals(tmpContact.getJID())) { found = true; break; } } if (!found) - groupMap.get(group).add(c); + mGroupMap.get(group).add(c); } protected void delContactInGroup(Contact c, String group) { - groupMap.get(group).remove(c); + mGroupMap.get(group).remove(c); c.delGroup(group); - if (groupMap.get(group).isEmpty()) { - groupMap.remove(group); - groupName.remove(group); + if (mGroupMap.get(group).isEmpty()) { + mGroupMap.remove(group); + mGroupName.remove(group); } } @@ -205,7 +205,7 @@ @Override public void onEntriesDeleted(List addresses) throws RemoteException { for (String user : addresses) { - List tmpListContact = groupMap.get(DEFAULT_GROUP); + List tmpListContact = mGroupMap.get(DEFAULT_GROUP); for (Contact contact : tmpListContact) { if (contact.getJID().equals(user)) { delContactInGroup(contact, DEFAULT_GROUP); @@ -364,9 +364,9 @@ } public void changed() { - Collections.sort(groupName); - for (String name : groupName) { - Collections.sort(groupMap.get(name), new ComparatorContactListByStatusAndName()); + Collections.sort(mGroupName); + for (String name : mGroupName) { + Collections.sort(mGroupMap.get(name), new ComparatorContactListByStatusAndName()); } for (DataSetObserver obs : observers) { obs.onChanged(); @@ -382,7 +382,7 @@ @Override public Object getChild(int groupPosition, int childPosition) { try { - return groupMap.get(groupName.get(groupPosition)).get(childPosition); + return mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition); } catch (NullPointerException e) { Log.e(TAG, "Child not found", e); return null; @@ -392,7 +392,7 @@ @Override public long getChildId(int groupPosition, int childPosition) { try { - groupMap.get(groupName.get(groupPosition)).get(childPosition); + mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition); } catch (NullPointerException e) { Log.e(TAG, "Child not found", e); return 0; @@ -403,7 +403,7 @@ @Override public int getChildrenCount(int groupPosition) { try { - return groupMap.get(groupName.get(groupPosition)).size(); + return mGroupMap.get(mGroupName.get(groupPosition)).size(); } catch (NullPointerException e) { Log.e(TAG, "Child not found", e); return 0; @@ -419,10 +419,10 @@ } else { v = convertView; } - Contact contact = groupMap.get(groupName.get(groupPosition)).get(childPosition); + Contact contact = mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition); bindView(v, contact); - v.setOnLongClickListener(new MyOnLongClickListener(contact, groupName.get(groupPosition))); + v.setOnLongClickListener(new MyOnLongClickListener(contact, mGroupName.get(groupPosition))); v.setOnClickListener(new MyOnClickListener(contact)); return v; } @@ -440,7 +440,7 @@ @Override public Object getGroup(int groupPosition) { try { - return groupMap.get(groupName.get(groupPosition)); + return mGroupMap.get(mGroupName.get(groupPosition)); } catch (NullPointerException e) { Log.e(TAG, "Group not found", e); return null; @@ -449,7 +449,7 @@ @Override public int getGroupCount() { - return groupMap.size(); + return mGroupMap.size(); } @Override @@ -463,7 +463,7 @@ convertView = LayoutInflater.from(ContactList.this).inflate(R.layout.contactlistgroup, null); } TextView groupTextView = (TextView) convertView.findViewById(R.id.textgroup); - groupTextView.setText(groupName.get(groupPosition)); + groupTextView.setText(mGroupName.get(groupPosition)); return convertView; } @@ -479,7 +479,7 @@ @Override public boolean isEmpty() { - return groupMap.isEmpty(); + return mGroupMap.isEmpty(); } @Override @@ -506,9 +506,9 @@ @Override public void onServiceConnected(ComponentName name, IBinder service) { - xmppFacade = IXmppFacade.Stub.asInterface(service); + mXmppFacade = IXmppFacade.Stub.asInterface(service); try { - mRoster = xmppFacade.getRoster(); + mRoster = mXmppFacade.getRoster(); if (mRoster != null) { mRoster.addRosterListener(mBeemRosterListener); buildContactList(mRoster.getContactList()); @@ -525,7 +525,7 @@ } catch (RemoteException e) { e.printStackTrace(); } - xmppFacade = null; + mXmppFacade = null; mRoster = null; } } diff -r c57c94a97ff2 -r 5dee5c1e4a29 src/com/beem/project/beem/ui/CreateAccount.java --- a/src/com/beem/project/beem/ui/CreateAccount.java Sun Aug 09 23:58:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/CreateAccount.java Mon Aug 10 00:26:59 2009 +0200 @@ -35,8 +35,8 @@ private final static int NOTIFICATION_DURATION = Toast.LENGTH_SHORT; - private SharedPreferences settings = null; - private Button createAccountButton = null; + private SharedPreferences mSettings = null; + private Button mCreateAccountButton = null; /** * {@inheritDoc} @@ -46,7 +46,7 @@ super.onCreate(savedInstanceState); setContentView(R.layout.create_account); initCreateAccountButton(); - settings = getSharedPreferences(getString(R.string.settings_filename), MODE_PRIVATE); + mSettings = getSharedPreferences(getString(R.string.settings_filename), MODE_PRIVATE); } /** @@ -118,7 +118,7 @@ * @return Registered proxy password */ private String getRegisteredProxyPassword() { - return (settings.getString(getString(R.string.settings_key_proxy_password), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_password), DEFAULT_STRING_VALUE)); } /** @@ -126,7 +126,7 @@ * @return Registered proxy port */ private int getRegisteredProxyPort() { - return (Integer.parseInt(settings.getString(getString(R.string.settings_key_proxy_port), DEFAULT_STRING_VALUE))); + return (Integer.parseInt(mSettings.getString(getString(R.string.settings_key_proxy_port), DEFAULT_STRING_VALUE))); } /** @@ -134,7 +134,7 @@ * @return Registered proxy server */ private String getRegisteredProxyServer() { - return (settings.getString(getString(R.string.settings_key_proxy_server), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_server), DEFAULT_STRING_VALUE)); } /** @@ -142,7 +142,7 @@ * @return Registered proxy type */ private ProxyInfo.ProxyType getRegisteredProxyType() { - switch (settings.getInt(getString(R.string.settings_key_proxy_type), DEFAULT_INT_VALUE)) { + switch (mSettings.getInt(getString(R.string.settings_key_proxy_type), DEFAULT_INT_VALUE)) { case 0: return ProxyInfo.ProxyType.HTTP; case 1: @@ -160,7 +160,7 @@ * @return Registered proxy use */ private boolean getRegisteredProxyUse() { - return (settings.getBoolean(getString(R.string.settings_key_proxy_use), DEFAULT_BOOLEAN_VALUE)); + return (mSettings.getBoolean(getString(R.string.settings_key_proxy_use), DEFAULT_BOOLEAN_VALUE)); } /** @@ -168,7 +168,7 @@ * @return Registered proxy username */ private String getRegisteredProxyUsername() { - return (settings.getString(getString(R.string.settings_key_proxy_username), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_username), DEFAULT_STRING_VALUE)); } /** @@ -186,7 +186,7 @@ * @return Registered TLS use */ private boolean getRegisteredXMPPTLSUse() { - return (settings.getBoolean(getString(R.string.settings_key_xmpp_tls_use), DEFAULT_BOOLEAN_VALUE)); + return (mSettings.getBoolean(getString(R.string.settings_key_xmpp_tls_use), DEFAULT_BOOLEAN_VALUE)); } /** @@ -212,8 +212,8 @@ * Initialize the "Create this account" button which allows the user to create an account */ private void initCreateAccountButton() { - createAccountButton = (Button) findViewById(R.id.create_account_button); - createAccountButton.setOnClickListener(new View.OnClickListener() { + mCreateAccountButton = (Button) findViewById(R.id.create_account_button); + mCreateAccountButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { String usernameFieldValue = ((EditText) findViewById(R.id.create_account_username)).getText() .toString(); @@ -245,7 +245,7 @@ createErrorDialog(getString(R.string.create_account_err_passwords)); else { if (createAccount(username, passwordFieldValue)) { - SharedPreferences.Editor settingsEditor = settings.edit(); + SharedPreferences.Editor settingsEditor = mSettings.edit(); settingsEditor.putString(getString(R.string.settings_key_account_username), usernameFieldValue); settingsEditor.putString(getString(R.string.settings_key_account_password), passwordFieldValue); settingsEditor.putBoolean(getString(R.string.PreferenceIsConfigured), true); diff -r c57c94a97ff2 -r 5dee5c1e4a29 src/com/beem/project/beem/ui/EditSettings.java --- a/src/com/beem/project/beem/ui/EditSettings.java Sun Aug 09 23:58:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/EditSettings.java Mon Aug 10 00:26:59 2009 +0200 @@ -41,21 +41,21 @@ private final static int NOTIFICATION_DURATION = Toast.LENGTH_SHORT; - private SharedPreferences settings = null; + private SharedPreferences mSettings = null; - private EditText accUsernameField = null; - private EditText accPasswordField = null; + private EditText mAccUsernameField = null; + private EditText mAccPasswordField = null; - private EditText xmppServerField = null; - private EditText xmppPortField = null; - private CheckBox xmppUseTLSCheckBox = null; + private EditText mXmppServerField = null; + private EditText mXmppPortField = null; + private CheckBox mXmppUseTlsCheckBox = null; - private CheckBox proxyUseCheckBox = null; - private Spinner proxyTypeSpinner = null; - private EditText proxyServerField = null; - private EditText proxyPortField = null; - private EditText proxyUsernameField = null; - private EditText proxyPasswordField = null; + private CheckBox mProxyUseCheckBox = null; + private Spinner mProxyTypeSpinner = null; + private EditText mProxyServerField = null; + private EditText mProxyPortField = null; + private EditText mProxyUsernameField = null; + private EditText mProxyPasswordField = null; /** * Add a labeled "Account" tab on the tabbed window view passed by parameter @@ -94,21 +94,21 @@ * Disable proxy parameters fields */ private void disableProxyParameters() { - proxyTypeSpinner.setEnabled(false); - proxyServerField.setEnabled(false); - proxyPortField.setEnabled(false); - proxyUsernameField.setEnabled(false); - proxyPasswordField.setEnabled(false); - proxyTypeSpinner.setFocusable(false); - proxyServerField.setFocusable(false); - proxyPortField.setFocusable(false); - proxyUsernameField.setFocusable(false); - proxyPasswordField.setFocusable(false); - proxyTypeSpinner.setFocusableInTouchMode(false); - proxyServerField.setFocusableInTouchMode(false); - proxyPortField.setFocusableInTouchMode(false); - proxyUsernameField.setFocusableInTouchMode(false); - proxyPasswordField.setFocusableInTouchMode(false); + mProxyTypeSpinner.setEnabled(false); + mProxyServerField.setEnabled(false); + mProxyPortField.setEnabled(false); + mProxyUsernameField.setEnabled(false); + mProxyPasswordField.setEnabled(false); + mProxyTypeSpinner.setFocusable(false); + mProxyServerField.setFocusable(false); + mProxyPortField.setFocusable(false); + mProxyUsernameField.setFocusable(false); + mProxyPasswordField.setFocusable(false); + mProxyTypeSpinner.setFocusableInTouchMode(false); + mProxyServerField.setFocusableInTouchMode(false); + mProxyPortField.setFocusableInTouchMode(false); + mProxyUsernameField.setFocusableInTouchMode(false); + mProxyPasswordField.setFocusableInTouchMode(false); } private void displayNotification(CharSequence msg) { @@ -120,21 +120,21 @@ * Enable proxy parameters fields */ private void enableProxyParameters() { - proxyTypeSpinner.setEnabled(true); - proxyServerField.setEnabled(true); - proxyPortField.setEnabled(true); - proxyUsernameField.setEnabled(true); - proxyPasswordField.setEnabled(true); - proxyTypeSpinner.setFocusable(true); - proxyServerField.setFocusable(true); - proxyPortField.setFocusable(true); - proxyUsernameField.setFocusable(true); - proxyPasswordField.setFocusable(true); - proxyTypeSpinner.setFocusableInTouchMode(true); - proxyServerField.setFocusableInTouchMode(true); - proxyPortField.setFocusableInTouchMode(true); - proxyUsernameField.setFocusableInTouchMode(true); - proxyPasswordField.setFocusableInTouchMode(true); + mProxyTypeSpinner.setEnabled(true); + mProxyServerField.setEnabled(true); + mProxyPortField.setEnabled(true); + mProxyUsernameField.setEnabled(true); + mProxyPasswordField.setEnabled(true); + mProxyTypeSpinner.setFocusable(true); + mProxyServerField.setFocusable(true); + mProxyPortField.setFocusable(true); + mProxyUsernameField.setFocusable(true); + mProxyPasswordField.setFocusable(true); + mProxyTypeSpinner.setFocusableInTouchMode(true); + mProxyServerField.setFocusableInTouchMode(true); + mProxyPortField.setFocusableInTouchMode(true); + mProxyUsernameField.setFocusableInTouchMode(true); + mProxyPasswordField.setFocusableInTouchMode(true); } /** @@ -154,7 +154,7 @@ * @return Registered account password */ private String getRegisteredAccountPassword() { - return (settings.getString(getString(R.string.settings_key_account_password), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_account_password), DEFAULT_STRING_VALUE)); } /** @@ -162,7 +162,7 @@ * @return Registered account username */ private String getRegisteredAccountUsername() { - return (settings.getString(getString(R.string.settings_key_account_username), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_account_username), DEFAULT_STRING_VALUE)); } /** @@ -170,7 +170,7 @@ * @return Registered proxy password */ private String getRegisteredProxyPassword() { - return (settings.getString(getString(R.string.settings_key_proxy_password), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_password), DEFAULT_STRING_VALUE)); } /** @@ -178,7 +178,7 @@ * @return Registered proxy port */ private String getRegisteredProxyPort() { - return (settings.getString(getString(R.string.settings_key_proxy_port), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_port), DEFAULT_STRING_VALUE)); } /** @@ -186,7 +186,7 @@ * @return Registered proxy server */ private String getRegisteredProxyServer() { - return (settings.getString(getString(R.string.settings_key_proxy_server), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_server), DEFAULT_STRING_VALUE)); } /** @@ -194,7 +194,7 @@ * @return Registered proxy type */ private int getRegisteredProxyType() { - return (settings.getInt(getString(R.string.settings_key_proxy_type), DEFAULT_INT_VALUE)); + return (mSettings.getInt(getString(R.string.settings_key_proxy_type), DEFAULT_INT_VALUE)); } /** @@ -202,7 +202,7 @@ * @return Registered proxy use */ private boolean getRegisteredProxyUse() { - return (settings.getBoolean(getString(R.string.settings_key_proxy_use), DEFAULT_BOOLEAN_VALUE)); + return (mSettings.getBoolean(getString(R.string.settings_key_proxy_use), DEFAULT_BOOLEAN_VALUE)); } /** @@ -210,7 +210,7 @@ * @return Registered proxy username */ private String getRegisteredProxyUsername() { - return (settings.getString(getString(R.string.settings_key_proxy_username), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_proxy_username), DEFAULT_STRING_VALUE)); } /** @@ -218,7 +218,7 @@ * @return Registered xmpp port */ private String getRegisteredXMPPPort() { - return (settings.getString(getString(R.string.settings_key_xmpp_port), DEFAULT_XMPP_PORT)); + return (mSettings.getString(getString(R.string.settings_key_xmpp_port), DEFAULT_XMPP_PORT)); } /** @@ -226,7 +226,7 @@ * @return Registered xmpp server */ private String getRegisteredXMPPServer() { - return (settings.getString(getString(R.string.settings_key_xmpp_server), DEFAULT_STRING_VALUE)); + return (mSettings.getString(getString(R.string.settings_key_xmpp_server), DEFAULT_STRING_VALUE)); } /** @@ -234,15 +234,15 @@ * @return Registered TLS use */ private boolean getRegisteredXMPPTLSUse() { - return (settings.getBoolean(getString(R.string.settings_key_xmpp_tls_use), DEFAULT_BOOLEAN_VALUE)); + return (mSettings.getBoolean(getString(R.string.settings_key_xmpp_tls_use), DEFAULT_BOOLEAN_VALUE)); } /** * Initialize Account tab fields */ private void initAccountFields() { - accUsernameField = (EditText) findViewById(R.id.settings_account_username); - accPasswordField = (EditText) findViewById(R.id.settings_account_password); + mAccUsernameField = (EditText) findViewById(R.id.settings_account_username); + mAccPasswordField = (EditText) findViewById(R.id.settings_account_password); } /** @@ -258,12 +258,12 @@ * Initialize Proxy tab fields */ private void initProxyFields() { - proxyUseCheckBox = (CheckBox) findViewById(R.id.settings_proxy_use); - proxyTypeSpinner = (Spinner) findViewById(R.id.settings_proxy_type); - proxyServerField = (EditText) findViewById(R.id.settings_proxy_server); - proxyPortField = (EditText) findViewById(R.id.settings_proxy_port); - proxyUsernameField = (EditText) findViewById(R.id.settings_proxy_username); - proxyPasswordField = (EditText) findViewById(R.id.settings_proxy_password); + mProxyUseCheckBox = (CheckBox) findViewById(R.id.settings_proxy_use); + mProxyTypeSpinner = (Spinner) findViewById(R.id.settings_proxy_type); + mProxyServerField = (EditText) findViewById(R.id.settings_proxy_server); + mProxyPortField = (EditText) findViewById(R.id.settings_proxy_port); + mProxyUsernameField = (EditText) findViewById(R.id.settings_proxy_username); + mProxyPasswordField = (EditText) findViewById(R.id.settings_proxy_password); } /** @@ -273,17 +273,17 @@ ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.proxy_types, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - proxyTypeSpinner.setAdapter(adapter); + mProxyTypeSpinner.setAdapter(adapter); } /** * Initialize the checkbox allowing user to use a proxy */ private void initProxyUseCheckBox() { - proxyUseCheckBox.setOnClickListener(new OnClickListener() { + mProxyUseCheckBox.setOnClickListener(new OnClickListener() { public void onClick(View v) { - if (proxyUseCheckBox.isChecked()) { + if (mProxyUseCheckBox.isChecked()) { enableProxyParameters(); } else { disableProxyParameters(); @@ -332,9 +332,9 @@ * Initialize XMPP tab fields */ private void initXMPPFields() { - xmppServerField = (EditText) findViewById(R.id.settings_xmpp_server); - xmppPortField = (EditText) findViewById(R.id.settings_xmpp_port); - xmppUseTLSCheckBox = (CheckBox) findViewById(R.id.settings_xmpp_use_tls); + mXmppServerField = (EditText) findViewById(R.id.settings_xmpp_server); + mXmppPortField = (EditText) findViewById(R.id.settings_xmpp_port); + mXmppUseTlsCheckBox = (CheckBox) findViewById(R.id.settings_xmpp_use_tls); } /** @@ -346,7 +346,7 @@ setContentView(R.layout.edit_settings); initTabbedWindow(); initFields(); - settings = getSharedPreferences(getString(R.string.settings_filename), MODE_PRIVATE); + mSettings = getSharedPreferences(getString(R.string.settings_filename), MODE_PRIVATE); } /** @@ -387,7 +387,7 @@ refreshXMPPTabFields(); refreshProxyTabFields(); - if (!proxyUseCheckBox.isChecked()) + if (!mProxyUseCheckBox.isChecked()) disableProxyParameters(); } @@ -406,29 +406,29 @@ * Refresh values of "Account" tab fields */ private void refreshAccountTabFields() { - accUsernameField.setText(getRegisteredAccountUsername()); - accPasswordField.setText(getRegisteredAccountPassword()); + mAccUsernameField.setText(getRegisteredAccountUsername()); + mAccPasswordField.setText(getRegisteredAccountPassword()); } /** * Refresh values of "Account" tab fields */ private void refreshProxyTabFields() { - proxyUseCheckBox.setChecked(getRegisteredProxyUse()); - proxyTypeSpinner.setSelection(getRegisteredProxyType()); - proxyServerField.setText(getRegisteredProxyServer()); - proxyPortField.setText(getRegisteredProxyPort()); - proxyUsernameField.setText(getRegisteredProxyUsername()); - proxyPasswordField.setText(getRegisteredProxyPassword()); + mProxyUseCheckBox.setChecked(getRegisteredProxyUse()); + mProxyTypeSpinner.setSelection(getRegisteredProxyType()); + mProxyServerField.setText(getRegisteredProxyServer()); + mProxyPortField.setText(getRegisteredProxyPort()); + mProxyUsernameField.setText(getRegisteredProxyUsername()); + mProxyPasswordField.setText(getRegisteredProxyPassword()); } /** * Refresh values of "Account" tab fields */ private void refreshXMPPTabFields() { - xmppServerField.setText(getRegisteredXMPPServer()); - xmppPortField.setText(getRegisteredXMPPPort()); - xmppUseTLSCheckBox.setChecked(getRegisteredXMPPTLSUse()); + mXmppServerField.setText(getRegisteredXMPPServer()); + mXmppPortField.setText(getRegisteredXMPPPort()); + mXmppUseTlsCheckBox.setChecked(getRegisteredXMPPTLSUse()); } /** @@ -436,8 +436,8 @@ * @param settingsEditor */ private void registerAccountSettingsChanges(SharedPreferences.Editor settingsEditor) { - final String usernameFieldValue = accUsernameField.getText().toString(); - final String passwordFieldValue = accPasswordField.getText().toString(); + final String usernameFieldValue = mAccUsernameField.getText().toString(); + final String passwordFieldValue = mAccPasswordField.getText().toString(); if (getRegisteredAccountUsername().equals(usernameFieldValue) == false) settingsEditor.putString(getString(R.string.settings_key_account_username), usernameFieldValue); @@ -451,11 +451,11 @@ * @param settingsEditor */ private void registerProxySettingsChanges(SharedPreferences.Editor settingsEditor) { - final int proxyTypeFieldValue = proxyTypeSpinner.getSelectedItemPosition(); - final String serverFieldValue = proxyServerField.getText().toString(); - final String portFieldValue = proxyPortField.getText().toString(); - final String usernameFieldValue = proxyUsernameField.getText().toString(); - final String passwordFieldValue = proxyPasswordField.getText().toString(); + final int proxyTypeFieldValue = mProxyTypeSpinner.getSelectedItemPosition(); + final String serverFieldValue = mProxyServerField.getText().toString(); + final String portFieldValue = mProxyPortField.getText().toString(); + final String usernameFieldValue = mProxyUsernameField.getText().toString(); + final String passwordFieldValue = mProxyPasswordField.getText().toString(); if (getRegisteredProxyType() != proxyTypeFieldValue) settingsEditor.putInt(getString(R.string.settings_key_proxy_type), proxyTypeFieldValue); @@ -476,8 +476,8 @@ */ private void registerXMPPSettingsChanges(SharedPreferences.Editor settingsEditor) { final boolean tlsUseCheckBoxValue = getCheckBoxValue(R.id.settings_xmpp_use_tls); - final String serverFieldValue = xmppServerField.getText().toString(); - final String portFieldValue = xmppPortField.getText().toString(); + final String serverFieldValue = mXmppServerField.getText().toString(); + final String portFieldValue = mXmppPortField.getText().toString(); if (getRegisteredXMPPTLSUse() != tlsUseCheckBoxValue) settingsEditor.putBoolean(getString(R.string.settings_key_xmpp_tls_use), tlsUseCheckBoxValue); @@ -501,9 +501,9 @@ registerProxySettingsChanges(settingsEditor); registerAccountSettingsChanges(settingsEditor); registerXMPPSettingsChanges(settingsEditor); - String password = accPasswordField.getText().toString(); - String username = accUsernameField.getText().toString(); - String port = xmppPortField.getText().toString(); + String password = mAccPasswordField.getText().toString(); + String username = mAccUsernameField.getText().toString(); + String port = mXmppPortField.getText().toString(); if("".equals(password) || "".equals(username) || "".equals(port)) settingsEditor.putBoolean(getString(R.string.PreferenceIsConfigured), false);