Revive the security hold check on the UI side.
Bug 4901767 Change-Id: Id8ccd3346f2d3008543df2107bab97ebe1a20fa6
This commit is contained in:
parent
80d3875d30
commit
1ce33fd93f
@ -19,6 +19,7 @@ package com.android.email.activity;
|
||||
import com.android.email.Controller;
|
||||
import com.android.email.Email;
|
||||
import com.android.email.R;
|
||||
import com.android.email.activity.setup.AccountSecurity;
|
||||
import com.android.emailcommon.provider.Account;
|
||||
import com.android.emailcommon.provider.Mailbox;
|
||||
import com.android.emailcommon.utility.EmailAsyncTask;
|
||||
@ -135,4 +136,10 @@ public final class ActivityHelper {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public static void showSecurityHoldDialog(Activity callerActivity, long accountId) {
|
||||
callerActivity.startActivity(
|
||||
AccountSecurity.actionUpdateSecurityIntent(callerActivity, accountId, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,16 +16,6 @@
|
||||
|
||||
package com.android.email.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.MessageListContext;
|
||||
import com.android.email.R;
|
||||
@ -38,6 +28,16 @@ import com.android.emailcommon.provider.HostAuth;
|
||||
import com.android.emailcommon.provider.Mailbox;
|
||||
import com.android.emailcommon.utility.EmailAsyncTask;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@ -425,7 +425,11 @@ abstract class UIControllerBase implements MailboxListFragment.Callback,
|
||||
*/
|
||||
public final void switchAccount(long accountId) {
|
||||
|
||||
// STOPSHIP Do the security hold check here too.
|
||||
if (Account.isSecurityHold(mActivity, accountId)) {
|
||||
ActivityHelper.showSecurityHoldDialog(mActivity, accountId);
|
||||
mActivity.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
if (accountId == getUIAccountId()) {
|
||||
// Do nothing if the account is already selected. Not even going back to the inbox.
|
||||
|
@ -19,7 +19,6 @@ package com.android.email.activity;
|
||||
import com.android.email.Email;
|
||||
import com.android.email.ExchangeUtils;
|
||||
import com.android.email.R;
|
||||
import com.android.email.activity.setup.AccountSecurity;
|
||||
import com.android.email.activity.setup.AccountSetupBasics;
|
||||
import com.android.email.service.MailService;
|
||||
import com.android.emailcommon.Logging;
|
||||
@ -407,8 +406,7 @@ public class Welcome extends Activity {
|
||||
public void onAccountSecurityHold(long accountId) {
|
||||
cleanUp();
|
||||
|
||||
startActivity(
|
||||
AccountSecurity.actionUpdateSecurityIntent(Welcome.this, accountId, true));
|
||||
ActivityHelper.showSecurityHoldDialog(Welcome.this, accountId);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user