Fix android.text.format.Time to use GetBooleanField on its boolean field.
Bug: 5162851
Change-Id: I49b1429e86ffa91fbfb8b4c9d1a0c6d30c72621e
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 @@
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 @@
{
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)