Fix for number pattern tests for devices not supporting "ar" locale

Test case should be skipped if "ar" locale is not supported.

Change-Id: I40ec73ec785352d61fdf082f9b37ae054bffc993
diff --git a/luni/src/test/java/libcore/java/text/NumberFormatTest.java b/luni/src/test/java/libcore/java/text/NumberFormatTest.java
index aeadf5f..c2621b4 100644
--- a/luni/src/test/java/libcore/java/text/NumberFormatTest.java
+++ b/luni/src/test/java/libcore/java/text/NumberFormatTest.java
@@ -23,6 +23,7 @@
 import java.text.NumberFormat;
 import java.text.ParsePosition;
 import java.util.Locale;
+import tests.support.Support_Locale;
 
 public class NumberFormatTest extends junit.framework.TestCase {
     // NumberFormat.format(Object, StringBuffer, FieldPosition) guarantees it calls doubleValue for
@@ -65,6 +66,9 @@
     }
 
     public void test_getIntegerInstance_ar() throws Exception {
+        if (!Support_Locale.isLocaleAvailable(new Locale("ar"))) {
+            return;
+        }
         NumberFormat numberFormat = NumberFormat.getNumberInstance(new Locale("ar"));
         assertEquals("#,##0.###;#,##0.###-", ((DecimalFormat) numberFormat).toPattern());
         NumberFormat integerFormat = NumberFormat.getIntegerInstance(new Locale("ar"));
@@ -73,6 +77,9 @@
 
     public void test_numberLocalization() throws Exception {
         Locale arabic = new Locale("ar");
+        if (!Support_Locale.isLocaleAvailable(arabic)) {
+            return;
+        }
         NumberFormat nf = NumberFormat.getNumberInstance(arabic);
         assertEquals('\u0660', new DecimalFormatSymbols(arabic).getZeroDigit());
         assertEquals("\u0661\u066c\u0662\u0663\u0664\u066c\u0665\u0666\u0667\u066c\u0668\u0669\u0660",
diff --git a/luni/src/test/java/libcore/java/util/FormatterTest.java b/luni/src/test/java/libcore/java/util/FormatterTest.java
index 00d0ab7..5c59807 100644
--- a/luni/src/test/java/libcore/java/util/FormatterTest.java
+++ b/luni/src/test/java/libcore/java/util/FormatterTest.java
@@ -20,10 +20,14 @@
 import java.util.Calendar;
 import java.util.Locale;
 import java.util.TimeZone;
+import tests.support.Support_Locale;
 
 public class FormatterTest extends junit.framework.TestCase {
     public void test_numberLocalization() throws Exception {
         Locale arabic = new Locale("ar");
+        if (!Support_Locale.isLocaleAvailable(arabic)) {
+            return;
+        }
         // Check the fast path for %d:
         assertEquals("12 \u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660 34",
                 String.format(arabic, "12 %d 34", 1234567890));