Fix case where some locales may have empty langauges.

This is to make the behvior the same as before
47f71a697a50e76565fef520a0f51e5d6826ceee for cases when some of the
locales' languages are empty.

Change-Id: Ifee92e199f20130e060670f244eb3b4b7be13872
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 53b773a..1a19a58 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1551,7 +1551,10 @@
         }
 
         if (!config.mLocaleList.isEmpty()) {
-            parts.add(localesToResourceQualifier(config.mLocaleList));
+            final String resourceQualifier = localesToResourceQualifier(config.mLocaleList);
+            if (!resourceQualifier.isEmpty()) {
+                parts.add(resourceQualifier);
+            }
         }
 
         switch (config.screenLayout & Configuration.SCREENLAYOUT_LAYOUTDIR_MASK) {