Throw NullPointerException on args to Time#compare
Check for null on arguments to Time#compare(Time, Time) before passing
it down to JNI code.
Bug: 5073949
Change-Id: I077e9d5194a89206d1e51fc89a72c8a72e29f8f1
diff --git a/core/jni/android_text_format_Time.cpp b/core/jni/android_text_format_Time.cpp
index c152aa8..69c6021 100644
--- a/core/jni/android_text_format_Time.cpp
+++ b/core/jni/android_text_format_Time.cpp
@@ -641,7 +641,7 @@
/* name, signature, funcPtr */
{ "normalize", "(Z)J", (void*)android_text_format_Time_normalize },
{ "switchTimezone", "(Ljava/lang/String;)V", (void*)android_text_format_Time_switchTimezone },
- { "compare", "(Landroid/text/format/Time;Landroid/text/format/Time;)I", (void*)android_text_format_Time_compare },
+ { "nativeCompare", "(Landroid/text/format/Time;Landroid/text/format/Time;)I", (void*)android_text_format_Time_compare },
{ "format1", "(Ljava/lang/String;)Ljava/lang/String;", (void*)android_text_format_Time_format },
{ "format2445", "()Ljava/lang/String;", (void*)android_text_format_Time_format2445 },
{ "toString", "()Ljava/lang/String;", (void*)android_text_format_Time_toString },