Update JNI code in preparation for ICU 59 switching to C++11 char16_t.

ICU 59 (update pending on the aosp/icu59 branch) has switched to using
the C++11 char16_t data type, which is a distinct type from uint16_t
(which is what JNI's jchar is typedef'd as), even though they are
bitwise identical.

All code that passes UTF-16 data between ICU4C and JNI must therefore be
updated with typecasts in the appropriate places before ICU 59 is merged
to aosp/master.

The sample directory has been removed in some branches, so this commit
should not be merged in branches where the commit deleting these files
has already been merged:

https://android.googlesource.com/platform/frameworks/minikin/+/66da9e9

Bug: 37554848
Test: make
Change-Id: I89e3d8b603bf5a394548d8addab0f4c4801c8e20
Merged-In: If7f1fb775cae427fbe31b86c202d1380c701bf28
diff --git a/sample/example.cpp b/sample/example.cpp
index f4c6a07..64a7ded 100644
--- a/sample/example.cpp
+++ b/sample/example.cpp
@@ -89,7 +89,7 @@
     MinikinPaint paint;
     paint.size = 32;
     icu::UnicodeString icuText = icu::UnicodeString::fromUTF8(text);
-    layout.doLayout(icuText.getBuffer(), 0, icuText.length(), icuText.length(), bidiFlags, fontStyle, paint);
+    layout.doLayout(reinterpret_cast<const uint16_t*>(icuText.getBuffer()), 0, icuText.length(), icuText.length(), bidiFlags, fontStyle, paint);
     layout.dump();
     Bitmap bitmap(250, 50);
     layout.draw(&bitmap, 10, 40, 32);
diff --git a/sample/example_skia.cpp b/sample/example_skia.cpp
index f892b8c..4bc4d49 100644
--- a/sample/example_skia.cpp
+++ b/sample/example_skia.cpp
@@ -121,7 +121,7 @@
     MinikinPaint minikinPaint;
     minikinPaint.size = 32;
     icu::UnicodeString icuText = icu::UnicodeString::fromUTF8(text);
-    layout.doLayout(icuText.getBuffer(), 0, icuText.length(), icuText.length(), bidiFlags, fontStyle, minikinPaint);
+    layout.doLayout(reinterpret_cast<const uint16_t*>(icuText.getBuffer()), 0, icuText.length(), icuText.length(), bidiFlags, fontStyle, minikinPaint);
     layout.dump();
 
     SkAutoGraphics ag;