From 9f7a4b05d80730c24791c96219c74595b0a29151 Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Thu, 12 Mar 2009 01:50:06 +0000 Subject: [PATCH] Elminate harmful selection of delete policy on Incoming settings page. --- res/layout/account_setup_incoming.xml | 11 -------- .../activity/setup/AccountSetupIncoming.java | 25 ------------------- 2 files changed, 36 deletions(-) diff --git a/res/layout/account_setup_incoming.xml b/res/layout/account_setup_incoming.xml index 9b2da73f2..e4011d9fe 100644 --- a/res/layout/account_setup_incoming.xml +++ b/res/layout/account_setup_incoming.xml @@ -65,17 +65,6 @@ android:id="@+id/account_security_type" android:layout_height="wrap_content" android:layout_width="fill_parent" /> - - securityTypesAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, securityTypes); securityTypesAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mSecurityTypeView.setAdapter(securityTypesAdapter); - ArrayAdapter deletePoliciesAdapter = new ArrayAdapter(this, - android.R.layout.simple_spinner_item, deletePolicies); - deletePoliciesAdapter - .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - mDeletePolicyView.setAdapter(deletePoliciesAdapter); - /* * Updates the port when the user changes the security type. This allows * us to show a reasonable default which the user can change. @@ -275,8 +255,6 @@ public class AccountSetupIncoming extends Activity implements OnClickListener { } } - SpinnerOption.setSpinnerOptionValue(mDeletePolicyView, mAccount.getDeletePolicy()); - if (uri.getHost() != null) { mServerView.setText(uri.getHost()); } @@ -381,13 +359,10 @@ public class AccountSetupIncoming extends Activity implements OnClickListener { throw new Error(use); } - int deleteSpinnerVal = (Integer)((SpinnerOption)mDeletePolicyView.getSelectedItem()).value; - mAccount.setDraftsFolderName(mImapFolderDrafts.getText().toString()); mAccount.setSentFolderName(mImapFolderSent.getText().toString()); mAccount.setTrashFolderName(mImapFolderTrash.getText().toString()); mAccount.setOutboxFolderName(mImapFolderOutbox.getText().toString()); - mAccount.setDeletePolicy(deleteSpinnerVal); AccountSetupCheckSettings.actionCheckSettings(this, mAccount, true, false); }