Merge "Avoid throwing when forceRefresh() missing server."
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java
index 729c506..5b19ecd 100644
--- a/core/java/android/util/NtpTrustedTime.java
+++ b/core/java/android/util/NtpTrustedTime.java
@@ -45,7 +45,8 @@
/** {@inheritDoc} */
public boolean forceRefresh() {
if (mNtpServer == null) {
- throw new IllegalStateException("Missing NTP server");
+ // missing server, so no trusted time available
+ return false;
}
final SntpClient client = new SntpClient();