Make AccountSettingsXL the main settings UI
* Connect to it from all call sites * Remove 1-pane and 2-pane icons * Leave a few more breadcrumbs for launching into specific account * Update the long TODO list in AccountSettingsXL Change-Id: I502eda9a622518e8d4a23d46989340ad400cdd34
This commit is contained in:
parent
5e06d1714d
commit
5122417625
|
@ -416,29 +416,5 @@
|
|||
</provider>
|
||||
<!--EXCHANGE-REMOVE-SECTION-END-->
|
||||
|
||||
<!--
|
||||
STOPSHIP: These aliases are only for development. Remove them.
|
||||
-->
|
||||
<activity-alias
|
||||
android:name="dev_one_pane"
|
||||
android:label="@string/activity_label_1pane"
|
||||
android:targetActivity=".activity.AccountFolderList"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
<activity-alias
|
||||
android:name="dev_two_pane"
|
||||
android:label="@string/activity_label_2pane"
|
||||
android:targetActivity=".activity.MessageListXL"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -20,7 +20,6 @@ import com.android.email.Controller;
|
|||
import com.android.email.ControllerResultUiThreadWrapper;
|
||||
import com.android.email.Email;
|
||||
import com.android.email.R;
|
||||
import com.android.email.activity.setup.AccountSettings;
|
||||
import com.android.email.activity.setup.AccountSettingsXL;
|
||||
import com.android.email.activity.setup.AccountSetupBasics;
|
||||
import com.android.email.mail.MessagingException;
|
||||
|
@ -139,12 +138,7 @@ public class AccountFolderList extends Activity implements AccountFolderListFrag
|
|||
|
||||
/* Implements AccountFolderListFragment.Callback */
|
||||
public void onEditAccount(long accountId) {
|
||||
// STOPSHIP - retaining entry point to "old" settings until "new" settings is working
|
||||
if (accountId >= 0) {
|
||||
AccountSettings.actionSettings(this, accountId);
|
||||
} else {
|
||||
AccountSettingsXL.actionSettings(this, -1);
|
||||
}
|
||||
AccountSettingsXL.actionSettings(this, -1);
|
||||
}
|
||||
|
||||
/* Implements AccountFolderListFragment.Callback */
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.android.email.ControllerResultUiThreadWrapper;
|
|||
import com.android.email.Email;
|
||||
import com.android.email.R;
|
||||
import com.android.email.Utility;
|
||||
import com.android.email.activity.setup.AccountSettings;
|
||||
import com.android.email.activity.setup.AccountSettingsXL;
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
import com.android.email.provider.EmailContent.AccountColumns;
|
||||
|
@ -222,7 +222,7 @@ public class MailboxList extends Activity implements MailboxListFragment.Callbac
|
|||
}
|
||||
|
||||
private void onEditAccount() {
|
||||
AccountSettings.actionSettings(this, mAccountId);
|
||||
AccountSettingsXL.actionSettings(this, mAccountId);
|
||||
}
|
||||
|
||||
private void onOpenMailbox(long mailboxId) {
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.android.email.Email;
|
|||
import com.android.email.R;
|
||||
import com.android.email.Utility;
|
||||
import com.android.email.activity.setup.AccountSecurity;
|
||||
import com.android.email.activity.setup.AccountSettings;
|
||||
import com.android.email.activity.setup.AccountSettingsXL;
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
|
@ -377,9 +377,7 @@ public class MessageList extends Activity implements OnClickListener,
|
|||
}
|
||||
|
||||
private void onEditAccount() {
|
||||
if (!mListFragment.isMagicMailbox()) { // Magic boxes don't have "accout settings" option.
|
||||
AccountSettings.actionSettings(this, mListFragment.getAccountId());
|
||||
}
|
||||
AccountSettingsXL.actionSettings(this, mListFragment.getAccountId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
package com.android.email.activity;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.RefreshManager;
|
||||
import com.android.email.R;
|
||||
import com.android.email.RefreshManager;
|
||||
import com.android.email.Utility;
|
||||
import com.android.email.activity.setup.AccountSettings;
|
||||
import com.android.email.activity.setup.AccountSettingsXL;
|
||||
import com.android.email.activity.setup.AccountSetupBasics;
|
||||
|
||||
import android.app.ActionBar;
|
||||
|
@ -567,10 +567,7 @@ public class MessageListXL extends Activity implements View.OnClickListener,
|
|||
}
|
||||
|
||||
private boolean onAccountSettings() {
|
||||
if (!mFragmentManager.isAccountSelected()) {
|
||||
return false; // this shouldn't really happen
|
||||
}
|
||||
AccountSettings.actionSettings(this, mFragmentManager.getAccountId());
|
||||
AccountSettingsXL.actionSettings(this, mFragmentManager.getAccountId());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,7 @@ import android.os.Bundle;
|
|||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* TODO: This implements preferences for a single account. We need to move this to the
|
||||
* newer "header" oriented preferences UI for proper XL operation; The open question is the
|
||||
* desired phone UX behavior.
|
||||
*
|
||||
* TODO: Move all "Restore" ops & other queries out of lifecycle methods and out of UI thread
|
||||
* TODO: At this point this is used only to support the Account Manager, and needs to be removed.
|
||||
*/
|
||||
public class AccountSettings extends Activity
|
||||
implements AccountSettingsFragment.Callback, AccountSettingsFragment.OnAttachListener {
|
||||
|
|
|
@ -39,16 +39,21 @@ import java.util.List;
|
|||
/**
|
||||
* Handles account preferences using multi-pane arrangement when possible.
|
||||
*
|
||||
* TODO: Go directly to specific account when requested - post runnable after onBuildHeaders
|
||||
* TODO: Incorporate entry point & other stuff to support launch from AccountManager
|
||||
* TODO: In Account settings in Phone UI, change title
|
||||
* TODO: Action bar? Need to work out the handling of next/back type buttons
|
||||
* TODO: Rework all remaining calls to DB from UI thread
|
||||
* TODO: Handle dynamic changes to the account list (exit if necessary)
|
||||
* TODO: Add account
|
||||
* TODO: Delete account
|
||||
*/
|
||||
public class AccountSettingsXL extends PreferenceActivity
|
||||
implements AccountSettingsFragment.OnAttachListener {
|
||||
|
||||
private static final String EXTRA_ACCOUNT_ID = "AccountSettingsXL.account_id";
|
||||
|
||||
private long mAccountId;
|
||||
private long mRequestedAccountId;
|
||||
private Header[] mAccountListHeaders;
|
||||
private Header mAppPreferencesHeader;
|
||||
private int mCurrentHeaderPosition;
|
||||
|
@ -79,7 +84,7 @@ public class AccountSettingsXL extends PreferenceActivity
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
Intent i = getIntent();
|
||||
mAccountId = i.getLongExtra(EXTRA_ACCOUNT_ID, -1);
|
||||
mRequestedAccountId = i.getLongExtra(EXTRA_ACCOUNT_ID, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue