am 1c78324f: am d40977d1: am 8100a2dc: Server sending unsupported policies will cause NPE

This commit is contained in:
Marc Blank 2010-05-13 15:40:43 -07:00 committed by Android Git Automerger
commit 0c85694182
1 changed files with 4 additions and 1 deletions

View File

@ -1286,7 +1286,10 @@ public class EasSyncService extends AbstractSyncService {
// the framework; if so, return the ProvisionParser containing the policy set and
// temporary key
PolicySet ps = pp.getPolicySet();
if (SecurityPolicy.getInstance(mContext).isSupported(ps)) {
// The PolicySet can be null if there are policies we don't know about (e.g. ones
// from Exchange 12.1) If we have a PolicySet, then we ask whether the device can
// support the actual parameters of those policies.
if ((ps != null) && SecurityPolicy.getInstance(mContext).isSupported(ps)) {
return pp;
}
}