Clear "security needed" notification when releasing holds

* This fixes the issues with erroneous notifications remaining
  active

Bug: 5039388
Change-Id: Ib1cd506e732e34f6368036a131d79270b22d4a4b
This commit is contained in:
Marc Blank 2011-07-17 15:46:03 -07:00
parent 14ea7d7bbc
commit e2d28a0607

View File

@ -16,14 +16,6 @@
package com.android.email.activity.setup;
import com.android.email.Email;
import com.android.email.R;
import com.android.email.SecurityPolicy;
import com.android.email.activity.ActivityHelper;
import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.HostAuth;
import com.android.emailcommon.utility.Utility;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@ -38,6 +30,14 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import com.android.email.Email;
import com.android.email.R;
import com.android.email.SecurityPolicy;
import com.android.email.activity.ActivityHelper;
import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.HostAuth;
import com.android.emailcommon.utility.Utility;
/**
* Psuedo-activity (no UI) to bootstrap the user up to a higher desired security level. This
* bootstrap requires the following steps.
@ -229,6 +229,7 @@ public class AccountSecurity extends Activity {
Log.d(TAG, "Security active; clear holds");
}
Account.clearSecurityHoldOnAllAccounts(this);
security.clearNotification(account.mId);
finish();
return;
}
@ -285,6 +286,7 @@ public class AccountSecurity extends Activity {
Log.d(TAG, "Policies enforced; clear holds");
}
Account.clearSecurityHoldOnAllAccounts(this);
security.clearNotification(account.mId);
finish();
}