Fix bug #6427629 Clean up layout direction APIs

- rename getResolvedLayoutDirection() to getLayoutDirection()

Change-Id: Ifcba38f3aedd2ec1da751d70457296b94608506c
diff --git a/tests/tests/view/src/android/view/cts/ViewTest.java b/tests/tests/view/src/android/view/cts/ViewTest.java
index 288552d..9ec0626 100644
--- a/tests/tests/view/src/android/view/cts/ViewTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewTest.java
@@ -3132,28 +3132,6 @@
         });
     }
 
-    @UiThreadTest
-    public void testLayoutDirection() {
-        View view = new View(mActivity);
-        assertEquals(View.LAYOUT_DIRECTION_INHERIT, view.getLayoutDirection());
-
-        view.setLayoutDirection(View.LAYOUT_DIRECTION_LTR);
-        assertEquals(View.LAYOUT_DIRECTION_LTR, view.getLayoutDirection());
-
-        view.setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
-        assertEquals(View.LAYOUT_DIRECTION_RTL, view.getLayoutDirection());
-
-        view.setLayoutDirection(View.LAYOUT_DIRECTION_INHERIT);
-        assertEquals(View.LAYOUT_DIRECTION_INHERIT, view.getLayoutDirection());
-
-        view.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE);
-        assertEquals(View.LAYOUT_DIRECTION_LOCALE, view.getLayoutDirection());
-
-        // View.LAYOUT_DIRECTION_MASK = 0x00000003
-        view.setLayoutDirection(0xffffffff);
-        assertEquals(0x00000003, view.getLayoutDirection());
-    }
-
     private static class MockEditText extends EditText {
         private boolean mCalledCheckInputConnectionProxy = false;
         private boolean mCalledOnCreateInputConnection = false;
diff --git a/tests/tests/widget/src/android/widget/cts/LayoutDirectionTest.java b/tests/tests/widget/src/android/widget/cts/LayoutDirectionTest.java
index 2c4c798..5c8be24 100644
--- a/tests/tests/widget/src/android/widget/cts/LayoutDirectionTest.java
+++ b/tests/tests/widget/src/android/widget/cts/LayoutDirectionTest.java
@@ -34,8 +34,7 @@
     }
 
     private void checkDefaultDirectionForOneLayoutWithCode(ViewGroup vg) {
-        assertEquals(LAYOUT_DIRECTION_INHERIT, vg.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_LTR, vg.getResolvedLayoutDirection());
+        assertEquals(LAYOUT_DIRECTION_LTR, vg.getLayoutDirection());
     }
 
     @UiThreadTest
@@ -50,21 +49,17 @@
     private void checkDirectionForOneLayoutWithCode(ViewGroup vg) {
         vg.setLayoutDirection(LAYOUT_DIRECTION_LTR);
         assertEquals(LAYOUT_DIRECTION_LTR, vg.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_LTR, vg.getResolvedLayoutDirection());
 
         vg.setLayoutDirection(LAYOUT_DIRECTION_RTL);
         assertEquals(LAYOUT_DIRECTION_RTL, vg.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_RTL, vg.getResolvedLayoutDirection());
 
         vg.setLayoutDirection(LAYOUT_DIRECTION_LOCALE);
-        assertEquals(LAYOUT_DIRECTION_LOCALE, vg.getLayoutDirection());
         // running with English locale
-        assertEquals(LAYOUT_DIRECTION_LTR, vg.getResolvedLayoutDirection());
+        assertEquals(LAYOUT_DIRECTION_LTR, vg.getLayoutDirection());
 
         vg.setLayoutDirection(LAYOUT_DIRECTION_INHERIT);
-        assertEquals(LAYOUT_DIRECTION_INHERIT, vg.getLayoutDirection());
         // default is LTR
-        assertEquals(LAYOUT_DIRECTION_LTR, vg.getResolvedLayoutDirection());
+        assertEquals(LAYOUT_DIRECTION_LTR, vg.getLayoutDirection());
     }
 
     @UiThreadTest
@@ -85,19 +80,13 @@
         parent.setLayoutDirection(LAYOUT_DIRECTION_LTR);
 
         assertEquals(LAYOUT_DIRECTION_LTR, parent.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_LTR, parent.getResolvedLayoutDirection());
-
-        assertEquals(LAYOUT_DIRECTION_INHERIT, child.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_LTR, child.getResolvedLayoutDirection());
+        assertEquals(LAYOUT_DIRECTION_LTR, child.getLayoutDirection());
 
         // Parent is RTL
         parent.setLayoutDirection(LAYOUT_DIRECTION_RTL);
 
         assertEquals(LAYOUT_DIRECTION_RTL, parent.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_RTL, parent.getResolvedLayoutDirection());
-
-        assertEquals(LAYOUT_DIRECTION_INHERIT, child.getLayoutDirection());
-        assertEquals(LAYOUT_DIRECTION_RTL, child.getResolvedLayoutDirection());
+        assertEquals(LAYOUT_DIRECTION_RTL, child.getLayoutDirection());
     }
 
     @UiThreadTest
@@ -115,24 +104,19 @@
                                                    int child3Id, int child3Dir, int child3ResDir,
                                                    int child4Id, int child4Dir, int child4ResDir) {
         ViewGroup ll = (ViewGroup) getActivity().findViewById(parentId);
-        assertEquals(parentDir, ll.getLayoutDirection());
-        assertEquals(parentResDir, ll.getResolvedLayoutDirection());
+        assertEquals(parentResDir, ll.getLayoutDirection());
 
         ViewGroup child1 = (ViewGroup) getActivity().findViewById(child1Id);
-        assertEquals(child1Dir, child1.getLayoutDirection());
-        assertEquals(child1ResDir, child1.getResolvedLayoutDirection());
+        assertEquals(child1ResDir, child1.getLayoutDirection());
 
         ViewGroup child2 = (ViewGroup) getActivity().findViewById(child2Id);
-        assertEquals(child2Dir, child2.getLayoutDirection());
-        assertEquals(child2ResDir, child2.getResolvedLayoutDirection());
+        assertEquals(child2ResDir, child2.getLayoutDirection());
 
         ViewGroup child3 = (ViewGroup) getActivity().findViewById(child3Id);
-        assertEquals(child3Dir, child3.getLayoutDirection());
-        assertEquals(child3ResDir, child3.getResolvedLayoutDirection());
+        assertEquals(child3ResDir, child3.getLayoutDirection());
 
         ViewGroup child4 = (ViewGroup) getActivity().findViewById(child4Id);
-        assertEquals(child4Dir, child4.getLayoutDirection());
-        assertEquals(child4ResDir, child4.getResolvedLayoutDirection());
+        assertEquals(child4ResDir, child4.getLayoutDirection());
     }
 
     @UiThreadTest