1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-09 04:38:10 -05:00

Remove test data and check for duplicate accounts on the device.

This commit is contained in:
Sander Bogaert 2012-03-03 14:59:02 +01:00 committed by Andrew Chen
parent 5aa0dce062
commit 8e9da5cf5b
2 changed files with 8 additions and 4 deletions

View File

@ -353,7 +353,7 @@ http://k9mail.googlecode.com/
<string name="accounts_setup_help"> <string name="accounts_setup_help">
Select an account here to setup, press menu to load more backup files or create an new account. Select an account here to setup, press menu to load more backup files or create an new account.
</string> </string>
<string name="account_setup_device_sectionheader">Device</string> <string name="account_setup_device_sectionheader">Found on Device</string>
<string name="account_setup_basics_instructions">Enter this account\'s email address:</string> <string name="account_setup_basics_instructions">Enter this account\'s email address:</string>
<string name="account_setup_basics_email_hint">Email address</string> <string name="account_setup_basics_email_hint">Email address</string>
<string name="account_setup_basics_password_hint">Password</string> <string name="account_setup_basics_password_hint">Password</string>

View File

@ -20,6 +20,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.HashSet;
/** /**
* User: dzan * User: dzan
@ -197,17 +198,20 @@ public class AccountSetupIndex extends K9ListActivity implements OnItemClickList
*/ */
private void fillFromDevice(SectionListAdapter<AccountSuggestion> adp){ private void fillFromDevice(SectionListAdapter<AccountSuggestion> adp){
HashSet<String> tmpDeDup = new HashSet<String>();
for( android.accounts.Account acc : AccountManager.get(this).getAccounts() ) for( android.accounts.Account acc : AccountManager.get(this).getAccounts() )
if( mEmailValidator.isValidAddressOnly(acc.name) ) if( mEmailValidator.isValidAddressOnly(acc.name) )
if( tmpDeDup.add(acc.name) )
adp.add(getString(R.string.account_setup_device_sectionheader), new AccountSuggestion(acc.name, SuggestionType.DEVICE)); adp.add(getString(R.string.account_setup_device_sectionheader), new AccountSuggestion(acc.name, SuggestionType.DEVICE));
// TEMP DATA TO TEST // TEMP DATA TO TEST
accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); /*accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));
accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));
accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); accountAdapter.add("file1", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));
accountAdapter.add("file2", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); accountAdapter.add("file2", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));
accountAdapter.add("file2", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); accountAdapter.add("file2", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));
accountAdapter.add("file3", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP)); accountAdapter.add("file3", new AccountSuggestion("piet@snot.com",SuggestionType.BACKUP));*/
} }
/* /*