Revert "Remove isUnicodeRendersCorrectly method"

This reverts commit d4482f89d50919f5b2c877e2e4bd9e8d4d8e519e.

Since we decided to go back to pure Unicode fonts (Noto Sans Myanmar)
from Unicode+Zawgyi hybrid fonts (Noto Sans Myanmar ZawDecode), add
back isUnicodeRendersCorrectly to CTS.

Bug: 141019225
Change-Id: I6b6503ea789a5a5a8c58a9f3269bb3c4fad4dc64
(cherry picked from commit 52b304bff0ecdd610640268aa849e052208568cf)
diff --git a/tests/tests/text/src/android/text/cts/MyanmarTest.java b/tests/tests/text/src/android/text/cts/MyanmarTest.java
index b2c140f..ab1e3eb 100644
--- a/tests/tests/text/src/android/text/cts/MyanmarTest.java
+++ b/tests/tests/text/src/android/text/cts/MyanmarTest.java
@@ -115,6 +115,39 @@
     }
 
     @Test
+    public void testMyanmarUnicodeRenders() {
+        assumeTrue(sHasBurmeseLocale);
+        assumeTrue(!sMymrLocales.isEmpty());
+
+        assertTrue("Should render Unicode text correctly in Myanmar Unicode locale",
+                isUnicodeRendersCorrectly(mContext, new LocaleList(sMymrLocales.get(0))));
+    }
+
+    @Test
+    public void testUnicodeRenders_withValidLocaleList() {
+        assumeTrue(sHasBurmeseLocale);
+        assumeTrue(!sMymrLocales.isEmpty());
+
+        final LocaleList[] testLocales = new LocaleList[]{
+                LocaleList.forLanguageTags("en-Latn-US"),
+                LocaleList.forLanguageTags("en-Latn"),
+                LocaleList.forLanguageTags("my-Mymr"),
+                LocaleList.forLanguageTags("my-Mymr,my-Qaag"),
+                LocaleList.forLanguageTags("my-Mymr-MM,my-Qaag-MM"),
+                LocaleList.forLanguageTags("en-Latn,my-Mymr"),
+                LocaleList.forLanguageTags("en-Latn-US,my-Mymr-MM"),
+                LocaleList.forLanguageTags("en-Mymr,my-Qaag"),
+                LocaleList.forLanguageTags("en-Mymr-MM,my-Qaag-MM"),
+        };
+
+        for (LocaleList localeList : testLocales) {
+            assertTrue("Should render Unicode text correctly in locale " + localeList.toString(),
+                    isUnicodeRendersCorrectly(mContext, localeList));
+        }
+
+    }
+
+    @Test
     public void testZawgyiRenders() {
         assumeTrue(sHasBurmeseLocale);
         assumeTrue(!sZawgyiLocales.isEmpty());
@@ -167,6 +200,15 @@
         assertTrue(qaagFontExists);
     }
 
+    private static boolean isUnicodeRendersCorrectly(Context context, LocaleList localeList) {
+        final Bitmap bitmapCorrect = CaptureTextView.capture(context, localeList,
+                UNICODE_CORRECT_ORDER);
+        final Bitmap bitmapWrong = CaptureTextView.capture(context, localeList,
+                UNICODE_WRONG_ORDER);
+
+        return !bitmapCorrect.sameAs(bitmapWrong);
+    }
+
     private static boolean isZawgyiRendersCorrectly(Context context, LocaleList localeList) {
         final Bitmap bitmapCorrect = CaptureTextView.capture(context, localeList,
                 UNICODE_CORRECT_ORDER);