Fix testActionNextAndPreviousAtGranularityLineOverTextExtend FAILS

Target CTS test case :
 android.accessibilityservice.cts.AccessibilityTextTraversalTest
   -- testActionNextAndPreviousAtGranularityLineOverTextExtend

1. Modify layout_width, layout_height, textSize in resource file.
In the case of LDPI devices, dip value will be calculated by *0.75px. (1px = 0.75dpi)
For example, 10dip will be 7.5px and ".5" is not accurate value to display on device.
So, I modify the textSize to 12dip(9px) and in similar propotion, layout_width and layout_height change to 96dip(72px).

2. Change the index in Test Code.
Due to above changes, the other test cases using same resource(R.id.edit) will be fail on the other resolution's devices.
So, I set the index values in following test cases to test properly on the other devices.

 android.accessibilityservice.cts.AccessibilityTextTraversalTest
   -- testActionNextAndPreviousAtGranularityPageOverText
   -- testActionNextAndPreviousAtGranularityPageOverTextExtend

Change-Id: I8da2a42d868a5f4f098ecec84c3f4fc00917d771
Signed-off-by: Seunghyun Kim <mcseunghyun.kim@lge.com>
diff --git a/tests/tests/accessibilityservice/res/layout/accessibility_text_traversal_test.xml b/tests/tests/accessibilityservice/res/layout/accessibility_text_traversal_test.xml
index 229dbfe..f980410 100644
--- a/tests/tests/accessibilityservice/res/layout/accessibility_text_traversal_test.xml
+++ b/tests/tests/accessibilityservice/res/layout/accessibility_text_traversal_test.xml
@@ -42,13 +42,13 @@
 
    <EditText
        android:id="@+id/edit"
-       android:layout_width="64dip"
-       android:layout_height="80dip"
+       android:layout_width="96dip"
+       android:layout_height="96dip"
        android:maxLines="1000"
        android:scrollbars="vertical"
        android:focusable="false"
        android:includeFontPadding="false"
-       android:textSize="8dip"
+       android:textSize="12dip"
        android:textStyle="normal"
        android:fontFamily="sans-serif"
        android:visibility="gone"
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
index a53fdea..c883a3d 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
@@ -3050,7 +3050,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getToIndex() == 106
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3060,8 +3060,8 @@
         assertNotNull(secondExpected);
 
         // Verify the selection position.
-        assertEquals(103, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(106, Selection.getSelectionStart(editText.getText()));
+        assertEquals(106, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the next page and wait for an event.
         AccessibilityEvent thirdExpected = getInstrumentation().getUiAutomation()
@@ -3084,7 +3084,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 106
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
@@ -3127,7 +3127,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 92
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
@@ -3138,8 +3138,8 @@
         assertNotNull(fourthExpected);
 
         // Verify the selection position.
-        assertEquals(103, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(92, Selection.getSelectionStart(editText.getText()));
+        assertEquals(92, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent fifthExpected = getInstrumentation().getUiAutomation()
@@ -3162,8 +3162,8 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getFromIndex() == 46
+                        && event.getToIndex() == 92
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3173,8 +3173,8 @@
         assertNotNull(fifthExpected);
 
         // Verify the selection position.
-        assertEquals(53, Selection.getSelectionStart(editText.getText()));
-        assertEquals(53, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(46, Selection.getSelectionStart(editText.getText()));
+        assertEquals(46, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent sixthExpected = getInstrumentation().getUiAutomation()
@@ -3198,7 +3198,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 0
-                        && event.getToIndex() == 53
+                        && event.getToIndex() == 46
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3306,7 +3306,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getToIndex() == 106
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3317,7 +3317,7 @@
 
         // Verify the selection position.
         assertEquals(0, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(106, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the next page and wait for an event.
         AccessibilityEvent thirdExpected = getInstrumentation().getUiAutomation()
@@ -3340,7 +3340,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 106
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
@@ -3379,7 +3379,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 92
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
@@ -3391,7 +3391,7 @@
 
         // Verify the selection position.
         assertEquals(0, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(92, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent fifthExpected = getInstrumentation().getUiAutomation()
@@ -3414,8 +3414,8 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getFromIndex() == 46
+                        && event.getToIndex() == 92
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3426,7 +3426,7 @@
 
         // Verify the selection position.
         assertEquals(0, Selection.getSelectionStart(editText.getText()));
-        assertEquals(53, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(46, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent sixthExpected = getInstrumentation().getUiAutomation()
@@ -3450,7 +3450,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 0
-                        && event.getToIndex() == 53
+                        && event.getToIndex() == 46
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3521,7 +3521,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 92
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
@@ -3533,7 +3533,7 @@
 
         // Verify the selection position.
         assertEquals(153, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(92, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent eightExpected = getInstrumentation().getUiAutomation()
@@ -3556,8 +3556,8 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getFromIndex() == 46
+                        && event.getToIndex() == 92
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3568,7 +3568,7 @@
 
         // Verify the selection position.
         assertEquals(153, Selection.getSelectionStart(editText.getText()));
-        assertEquals(53, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(46, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the previous page and wait for an event.
         AccessibilityEvent ninethExpected = getInstrumentation().getUiAutomation()
@@ -3592,7 +3592,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 0
-                        && event.getToIndex() == 53
+                        && event.getToIndex() == 46
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3670,7 +3670,7 @@
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
                         && event.getFromIndex() == 53
-                        && event.getToIndex() == 103
+                        && event.getToIndex() == 106
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             }
@@ -3681,7 +3681,7 @@
 
         // Verify the selection position.
         assertEquals(153, Selection.getSelectionStart(editText.getText()));
-        assertEquals(103, Selection.getSelectionEnd(editText.getText()));
+        assertEquals(106, Selection.getSelectionEnd(editText.getText()));
 
         // Move to the next page and wait for an event.
         AccessibilityEvent twelvethExpected = getInstrumentation().getUiAutomation()
@@ -3704,7 +3704,7 @@
                         && event.getText().size() > 0
                         && event.getText().get(0).toString().equals(getString(
                                 R.string.android_wiki))
-                        && event.getFromIndex() == 103
+                        && event.getFromIndex() == 106
                         && event.getToIndex() == 153
                         && event.getMovementGranularity() ==
                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);