am 859a4ef1: Merge "Don\'t crash when the policy service is unavailable." into jb-ub-mail-ur10

* commit '859a4ef1e9357e196f4b9caa92e4bf36c398d33d':
  Don't crash when the policy service is unavailable.
This commit is contained in:
Yu Ping Hu 2013-08-14 10:58:15 -07:00 committed by Android Git Automerger
commit de312eb06b

View File

@ -58,7 +58,10 @@ public class PolicyServiceProxy extends ServiceProxy implements IPolicyService {
LogUtils.v(TAG, "isActive: " + ((mReturn == null) ? "null" : mReturn));
}
if (mReturn == null) {
throw new ServiceUnavailableException("isActive");
// This is not a great situation, but it's better to act like the policy isn't enforced
// rather than crash.
LogUtils.e(TAG, "PolicyService unavailable in isActive; assuming false");
return false;
} else {
return (Boolean)mReturn;
}