Revert "fix testFling bug"

Not reviewed by owning team - see comments in original commit.

This reverts commit f80b4ff00b65b00b7aa7b39d8020c2e2f28639b7.

Change-Id: I49471a3d4b2c227a60fcfdd9f4079ec55f5ad910
diff --git a/tests/tests/widget/src/android/widget/cts/AbsListViewTest.java b/tests/tests/widget/src/android/widget/cts/AbsListViewTest.java
index b0c868c..cf8012e 100644
--- a/tests/tests/widget/src/android/widget/cts/AbsListViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/AbsListViewTest.java
@@ -49,9 +49,6 @@
 import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
-import android.util.TypedValue;
-import android.util.DisplayMetrics;
-import android.view.WindowManager;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -61,12 +58,12 @@
     private final String[] mShortList = new String[] {
         "This", "is", "short", "!",
     };
-    private final String[] mSample = new String[] {
+    private final String[] mCountryList = new String[] {
         "Argentina", "Australia", "China", "France", "Germany", "Italy", "Japan", "United States",
+        "Argentina", "Australia", "China", "France", "Germany", "Italy", "Japan", "United States",
+        "Argentina", "Australia", "China", "France", "Germany", "Italy", "Japan", "United States"
     };
 
-    private String[] mCountryList;
-
     private ListView mListView;
     private Activity mActivity;
     private Instrumentation mInstrumentation;
@@ -100,36 +97,12 @@
 
         mAdapter_short = new ArrayAdapter<String>(mActivity,
                 android.R.layout.simple_list_item_1, mShortList);
-
-        generateContriesList(mActivity);
         mAdapter_countries = new ArrayAdapter<String>(mActivity,
                 android.R.layout.simple_list_item_1, mCountryList);
 
         mListView = (ListView)mActivity.findViewById(R.id.listview_default);
     }
 
-    private void generateContriesList(Context context) {
-        //just for sure.
-        int totalN = getListViewVisibleItemsNumber(context) / mSample.length + 2;
-        mCountryList = new String[totalN * mSample.length];
-        for (int i = 0; i < totalN; i++) {
-            System.arraycopy(mSample, 0, mCountryList, i*mSample.length, mSample.length);
-        }
-    }
-
-    private int getListViewVisibleItemsNumber(Context context) {
-        TypedValue value = new TypedValue();
-        DisplayMetrics metrics = new DisplayMetrics();
-
-        context.getTheme().resolveAttribute(
-                android.R.attr.listPreferredItemHeight, value, true);
-        ((WindowManager) (context.getSystemService(Context.WINDOW_SERVICE)))
-                .getDefaultDisplay().getMetrics(metrics);
-
-        float itemHeight = TypedValue.complexToDimension(value.data, metrics);
-        return (int)(metrics.heightPixels / itemHeight) + 1;
-    }
-
     public void testConstructor() {
         /**
          * We can not test the constructors.