diff options
author | Young-Ho Cha <ganadist@gmail.com> | 2015-01-07 11:24:35 +0900 |
---|---|---|
committer | Young-Ho Cha <ganadist@gmail.com> | 2015-01-08 09:34:01 +0900 |
commit | 0eda7dfcacd838da4a534230f62a121b826000d6 (patch) | |
tree | 935c24120da08b0213579a2fb20336b7bb201364 /core/java/android/util | |
parent | ea4cdd44541d76adea9b0b185740796d6cf6ac64 (diff) | |
download | frameworks_base-0eda7dfcacd838da4a534230f62a121b826000d6.zip frameworks_base-0eda7dfcacd838da4a534230f62a121b826000d6.tar.gz frameworks_base-0eda7dfcacd838da4a534230f62a121b826000d6.tar.bz2 |
check ntpserver as empty string instead of null
mServer cannot set null, because string from resource always returns
non-null charsequence
Change-Id: I8d6a6fdbc34267ee361e7bd20719887268161870
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
Diffstat (limited to 'core/java/android/util')
-rw-r--r-- | core/java/android/util/NtpTrustedTime.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java index 602a68c..b18cc3b 100644 --- a/core/java/android/util/NtpTrustedTime.java +++ b/core/java/android/util/NtpTrustedTime.java @@ -22,6 +22,7 @@ import android.content.res.Resources; import android.net.SntpClient; import android.os.SystemClock; import android.provider.Settings; +import android.text.TextUtils; /** * {@link TrustedTime} that connects with a remote NTP server as its trusted @@ -73,7 +74,7 @@ public class NtpTrustedTime implements TrustedTime { @Override public boolean forceRefresh() { - if (mServer == null) { + if (TextUtils.isEmpty(mServer)) { // missing server, so no trusted time available return false; } |