am 4f5d4e29: Always set policies in DPM before checking whether they are active

* commit '4f5d4e29a8180b5c1e8cd80f5e3e9c4ed098049c':
  Always set policies in DPM before checking whether they are active
This commit is contained in:
Marc Blank 2011-05-24 13:12:30 -07:00 committed by Android Git Automerger
commit 7c270c50ef

View File

@ -291,6 +291,10 @@ public class SecurityPolicy {
* @return true if the requested policies are active, false if not. * @return true if the requested policies are active, false if not.
*/ */
public boolean isActive(PolicySet policies) { public boolean isActive(PolicySet policies) {
// Since the DPM reports password failures erroneously, we add this workaround that
// ensures that our most recent aggregate policy is set before checking whether those
// policies are in force
setActivePolicies();
int reasons = getInactiveReasons(policies); int reasons = getInactiveReasons(policies);
return reasons == 0; return reasons == 0;
} }