diff options
author | Elliott Hughes <enh@google.com> | 2011-08-14 13:31:03 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-08-14 13:31:03 -0700 |
commit | be414332a11b539b8b7751f31a0ef584f11b48f6 (patch) | |
tree | 5c6f895d97751564bae7e2fc5c006b95e18eaa1d /core/jni/android_text_format_Time.cpp | |
parent | 99f09c27a4016dce3e01462e56a0410e8275a270 (diff) | |
download | frameworks_base-be414332a11b539b8b7751f31a0ef584f11b48f6.zip frameworks_base-be414332a11b539b8b7751f31a0ef584f11b48f6.tar.gz frameworks_base-be414332a11b539b8b7751f31a0ef584f11b48f6.tar.bz2 |
Fix android.text.format.Time to use GetBooleanField on its boolean field.
Bug: 5162851
Change-Id: I49b1429e86ffa91fbfb8b4c9d1a0c6d30c72621e
Diffstat (limited to 'core/jni/android_text_format_Time.cpp')
-rw-r--r-- | core/jni/android_text_format_Time.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_text_format_Time.cpp b/core/jni/android_text_format_Time.cpp index 69c6021..776733c 100644 --- a/core/jni/android_text_format_Time.cpp +++ b/core/jni/android_text_format_Time.cpp @@ -69,7 +69,7 @@ static inline bool java2time(JNIEnv* env, Time* t, jobject o) t->t.tm_yday = env->GetIntField(o, g_ydayField); t->t.tm_isdst = env->GetIntField(o, g_isdstField); t->t.tm_gmtoff = env->GetLongField(o, g_gmtoffField); - bool allDay = env->GetIntField(o, g_allDayField); + bool allDay = env->GetBooleanField(o, g_allDayField); if (allDay && ((t->t.tm_sec !=0) || (t->t.tm_min != 0) || (t->t.tm_hour != 0))) { char msg[100]; @@ -162,7 +162,7 @@ static jstring android_text_format_Time_format2445(JNIEnv* env, jobject This) { Time t; if (!java2time(env, &t, This)) return env->NewStringUTF(""); - bool allDay = env->GetIntField(This, g_allDayField); + bool allDay = env->GetBooleanField(This, g_allDayField); if (!allDay) { ACQUIRE_TIMEZONE(This, t) |