Improve CTS tests for testing text alignment

- change order of the setters to be sure that gravity case is well tested

Change-Id: If9f5b92b262c041b2aa8621bda85c2354eea0efd
diff --git a/tests/tests/widget/src/android/widget/cts/TextViewTest.java b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
index b33b9c9..b4279f2 100755
--- a/tests/tests/widget/src/android/widget/cts/TextViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
@@ -3192,12 +3192,14 @@
 
         assertEquals(View.TEXT_ALIGNMENT_GRAVITY, tv.getTextAlignment());
 
-        tv.setTextAlignment(View.TEXT_ALIGNMENT_GRAVITY);
-        assertEquals(View.TEXT_ALIGNMENT_GRAVITY, tv.getTextAlignment());
-
+        // Test center alignment first so that we dont hit the default case
         tv.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
         assertEquals(View.TEXT_ALIGNMENT_CENTER, tv.getTextAlignment());
 
+        // Test the default case too
+        tv.setTextAlignment(View.TEXT_ALIGNMENT_GRAVITY);
+        assertEquals(View.TEXT_ALIGNMENT_GRAVITY, tv.getTextAlignment());
+
         tv.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_START);
         assertEquals(View.TEXT_ALIGNMENT_TEXT_START, tv.getTextAlignment());