Merge the two separate preference test targets
Also fix up all the style isues in the tests.
Test: atest CtsPreferenceTestCases
Change-Id: I8e3ad30e3b0a6a34621403631134cec2832bc22a
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 9042e16..d0cbaaa 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -16,6 +16,7 @@
tests/tests/content/
tests/tests/graphics/
tests/tests/hardware/
+ tests/tests/preference/
tests/tests/print/
tests/tests/text/
tests/tests/transition/
diff --git a/tests/tests/preference/Android.bp b/tests/tests/preference/Android.bp
index 23b3224..786595d 100644
--- a/tests/tests/preference/Android.bp
+++ b/tests/tests/preference/Android.bp
@@ -23,7 +23,12 @@
"cts_instant",
],
- static_libs: ["ctstestrunner"],
+ static_libs: [
+ "ctstestrunner",
+ "compatibility-device-util",
+ "mockito-target-minus-junit4",
+ "ub-uiautomator",
+ ],
libs: [
"android.test.runner.stubs",
diff --git a/tests/tests/preference/AndroidManifest.xml b/tests/tests/preference/AndroidManifest.xml
index b0a60ed..62e8996 100644
--- a/tests/tests/preference/AndroidManifest.xml
+++ b/tests/tests/preference/AndroidManifest.xml
@@ -26,6 +26,28 @@
<meta-data android:name="android.preference"
android:resource="@xml/preferences_from_intent" />
</activity>
+ <activity
+ android:name="PreferenceFragmentActivity" >
+ </activity>
+ <activity
+ android:name="android.preference2.cts.PreferenceStubActivity" >
+ </activity>
+ <activity
+ android:name="PreferenceFromCodeActivity" >
+ </activity>
+ <activity android:name="PreferencesFromXml" />
+ <activity android:name="PreferencesFromXmlNested" />
+ <activity android:name="PreferencesFromXmlRecycle" />
+ <activity android:name="PreferenceWithHeaders" />
+ <!-- Landscape setup of PreferenceWithHeaders -->
+ <activity
+ android:name="PreferenceWithHeadersLandscape"
+ android:screenOrientation="landscape"/>
+ <!-- Portrait setup of PreferenceWithHeaders -->
+ <activity
+ android:name="PreferenceWithHeadersPortrait"
+ android:screenOrientation="portrait"/>
+ <activity android:name="FragmentPreferences" />
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
diff --git a/tests/tests/preference2/res/drawable-hdpi/ic_launcher.png b/tests/tests/preference/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from tests/tests/preference2/res/drawable-hdpi/ic_launcher.png
rename to tests/tests/preference/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/tests/tests/preference2/res/drawable-ldpi/ic_launcher.png b/tests/tests/preference/res/drawable-ldpi/ic_launcher.png
similarity index 100%
rename from tests/tests/preference2/res/drawable-ldpi/ic_launcher.png
rename to tests/tests/preference/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/tests/tests/preference2/res/drawable-mdpi/ic_launcher.png b/tests/tests/preference/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from tests/tests/preference2/res/drawable-mdpi/ic_launcher.png
rename to tests/tests/preference/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/tests/tests/preference2/res/drawable-mdpi/ic_settings_applications.png b/tests/tests/preference/res/drawable-mdpi/ic_settings_applications.png
similarity index 100%
rename from tests/tests/preference2/res/drawable-mdpi/ic_settings_applications.png
rename to tests/tests/preference/res/drawable-mdpi/ic_settings_applications.png
Binary files differ
diff --git a/tests/tests/preference2/res/drawable-mdpi/ic_settings_display.png b/tests/tests/preference/res/drawable-mdpi/ic_settings_display.png
similarity index 100%
rename from tests/tests/preference2/res/drawable-mdpi/ic_settings_display.png
rename to tests/tests/preference/res/drawable-mdpi/ic_settings_display.png
Binary files differ
diff --git a/tests/tests/preference2/res/layout/main.xml b/tests/tests/preference/res/layout/main.xml
similarity index 100%
rename from tests/tests/preference2/res/layout/main.xml
rename to tests/tests/preference/res/layout/main.xml
diff --git a/tests/tests/preference2/res/values/arrays.xml b/tests/tests/preference/res/values/arrays.xml
similarity index 100%
rename from tests/tests/preference2/res/values/arrays.xml
rename to tests/tests/preference/res/values/arrays.xml
diff --git a/tests/tests/preference2/res/values/attrs.xml b/tests/tests/preference/res/values/attrs.xml
similarity index 100%
rename from tests/tests/preference2/res/values/attrs.xml
rename to tests/tests/preference/res/values/attrs.xml
diff --git a/tests/tests/preference2/res/values/colors.xml b/tests/tests/preference/res/values/colors.xml
similarity index 100%
rename from tests/tests/preference2/res/values/colors.xml
rename to tests/tests/preference/res/values/colors.xml
diff --git a/tests/tests/preference2/res/values/strings.xml b/tests/tests/preference/res/values/strings.xml
similarity index 99%
rename from tests/tests/preference2/res/values/strings.xml
rename to tests/tests/preference/res/values/strings.xml
index a0bb9f1..844a5fb 100755
--- a/tests/tests/preference2/res/values/strings.xml
+++ b/tests/tests/preference/res/values/strings.xml
@@ -94,7 +94,7 @@
<string name="text_edittext_preference">Edit Text</string>
<string name="preset_title">Preset Title</string>
<string name="dialog_message">"Dialog Message"</string>
-
+
<string name="title_dialog_preference">Dialog preference</string>
<string name="dialogtitle_dialog_preference">Dialog Title</string>
<string name="summary_dialog_preference">An example that uses a dialog</string>
diff --git a/tests/tests/preference2/res/xml/fragmented_preferences.xml b/tests/tests/preference/res/xml/fragmented_preferences.xml
similarity index 100%
rename from tests/tests/preference2/res/xml/fragmented_preferences.xml
rename to tests/tests/preference/res/xml/fragmented_preferences.xml
diff --git a/tests/tests/preference2/res/xml/fragmented_preferences_inner.xml b/tests/tests/preference/res/xml/fragmented_preferences_inner.xml
similarity index 100%
rename from tests/tests/preference2/res/xml/fragmented_preferences_inner.xml
rename to tests/tests/preference/res/xml/fragmented_preferences_inner.xml
diff --git a/tests/tests/preference2/res/xml/pref_cb.xml b/tests/tests/preference/res/xml/pref_cb.xml
similarity index 65%
rename from tests/tests/preference2/res/xml/pref_cb.xml
rename to tests/tests/preference/res/xml/pref_cb.xml
index 73dc3d8..ceee447 100755
--- a/tests/tests/preference2/res/xml/pref_cb.xml
+++ b/tests/tests/preference/res/xml/pref_cb.xml
@@ -1,22 +1,24 @@
-<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2012 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:in="http://schemas.android.com/apk/res/android.preference2.cts" >
+ xmlns:in="http://schemas.android.com/apk/res/android.preference.cts" >
<PreferenceCategory android:title="@string/inline_preferences" >
- <android.preference2.cts.CustomCheckBoxPreference
+ <android.preference.cts.CustomCheckBoxPreference
android:id="@+id/custom_check"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
@@ -25,7 +27,7 @@
android:key="custom_checkbox_pref_1"
in:icon="@drawable/ic_launcher"
in:title="@string/preset_title" />
- <android.preference2.cts.CustomSwitchPreference
+ <android.preference.cts.CustomSwitchPreference
android:id="@+id/custom_switch"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
@@ -35,7 +37,7 @@
in:icon="@drawable/ic_launcher"
in:title="@string/preset_title" />
- <android.preference2.cts.CustomDialogPreference
+ <android.preference.cts.CustomDialogPreference
android:id="@+id/custom_switch"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
@@ -45,7 +47,7 @@
in:icon="@drawable/ic_launcher"
in:title="@string/preset_title" />
- <android.preference2.cts.CustomEditTextPreference
+ <android.preference.cts.CustomEditTextPreference
android:id="@+id/custom_switch"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
diff --git a/tests/tests/preference2/res/xml/pref_nested.xml b/tests/tests/preference/res/xml/pref_nested.xml
similarity index 100%
rename from tests/tests/preference2/res/xml/pref_nested.xml
rename to tests/tests/preference/res/xml/pref_nested.xml
diff --git a/tests/tests/preference2/res/xml/pref_recycle.xml b/tests/tests/preference/res/xml/pref_recycle.xml
similarity index 91%
rename from tests/tests/preference2/res/xml/pref_recycle.xml
rename to tests/tests/preference/res/xml/pref_recycle.xml
index d8f1c53..526e831 100755
--- a/tests/tests/preference2/res/xml/pref_recycle.xml
+++ b/tests/tests/preference/res/xml/pref_recycle.xml
@@ -17,13 +17,13 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Enabled recycle (by default). -->
- <android.preference2.cts.RecycleCheckPreference
+ <android.preference.cts.RecycleCheckPreference
android:key="pref_checkbox_recycle"
android:title="Test"
android:summary="Test" />
<!-- Disable recycle. -->
- <android.preference2.cts.RecycleCheckPreference
+ <android.preference.cts.RecycleCheckPreference
android:key="pref_checkbox_no_recycle"
android:title="Test"
android:summary="Test"
diff --git a/tests/tests/preference2/res/xml/preference_dependencies.xml b/tests/tests/preference/res/xml/preference_dependencies.xml
similarity index 100%
rename from tests/tests/preference2/res/xml/preference_dependencies.xml
rename to tests/tests/preference/res/xml/preference_dependencies.xml
diff --git a/tests/tests/preference2/res/xml/preference_headers.xml b/tests/tests/preference/res/xml/preference_headers.xml
similarity index 88%
rename from tests/tests/preference2/res/xml/preference_headers.xml
rename to tests/tests/preference/res/xml/preference_headers.xml
index 565f81a..5112c9c 100755
--- a/tests/tests/preference2/res/xml/preference_headers.xml
+++ b/tests/tests/preference/res/xml/preference_headers.xml
@@ -16,13 +16,13 @@
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
<header
- android:fragment="android.preference2.cts.PreferenceWithHeaders$PrefsOneFragment"
+ android:fragment="android.preference.cts.PreferenceWithHeaders$PrefsOneFragment"
android:icon="@drawable/ic_settings_applications"
android:title="Prefs 1"
android:summary="An example of some preferences." />
<header
- android:fragment="android.preference2.cts.PreferenceWithHeaders$PrefsTwoFragment"
+ android:fragment="android.preference.cts.PreferenceWithHeaders$PrefsTwoFragment"
android:icon="@drawable/ic_settings_applications"
android:title="Prefs 2"
android:summary="An example of some preferences." />
diff --git a/tests/tests/preference2/res/xml/preferences.xml b/tests/tests/preference/res/xml/preferences.xml
similarity index 97%
rename from tests/tests/preference2/res/xml/preferences.xml
rename to tests/tests/preference/res/xml/preferences.xml
index c957c44..0cf151a 100755
--- a/tests/tests/preference2/res/xml/preferences.xml
+++ b/tests/tests/preference/res/xml/preferences.xml
@@ -25,7 +25,7 @@
preferences. If running in a large screen, they can be embedded
inside of the overall preferences UI. -->
<PreferenceScreen
- android:fragment="android.preference2.cts.PreferenceWithHeaders$PrefsOneFragmentInner"
+ android:fragment="android.preference.cts.PreferenceWithHeaders$PrefsOneFragmentInner"
android:title="@string/title_fragment_preference"
android:summary="@string/summary_fragment_preference">
<!-- Arbitrary key/value pairs can be included for fragment arguments -->
diff --git a/tests/tests/preference2/res/xml/preferences2.xml b/tests/tests/preference/res/xml/preferences2.xml
similarity index 100%
rename from tests/tests/preference2/res/xml/preferences2.xml
rename to tests/tests/preference/res/xml/preferences2.xml
diff --git a/tests/tests/preference2/src/android/preference2/cts/CheckBoxPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/CheckBoxPreferenceTest.java
similarity index 88%
rename from tests/tests/preference2/src/android/preference2/cts/CheckBoxPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/CheckBoxPreferenceTest.java
index cf8bfde..e957948 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CheckBoxPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/CheckBoxPreferenceTest.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.CheckBoxPreference;
import android.test.ActivityInstrumentationTestCase2;
-import android.preference2.cts.R;
-
public class CheckBoxPreferenceTest
extends ActivityInstrumentationTestCase2<PreferenceFromCodeActivity> {
@@ -38,16 +36,16 @@
public void testNotNull() {
CheckBoxPreference checkBoxPref = (CheckBoxPreference) mActivity.findPreference(
- "checkbox_preference");
+ "checkbox_preference");
assertNotNull(checkBoxPref);
}
public void testGetSummary() {
CheckBoxPreference checkBoxPref = (CheckBoxPreference) mActivity.findPreference(
- "checkbox_preference");
+ "checkbox_preference");
String summary = (String) checkBoxPref.getSummary();
String summaryExp = mActivity.getResources().getString(
- R.string.summary_checkbox_preference);
+ R.string.summary_checkbox_preference);
assertEquals(summaryExp, summary);
}
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreference.java b/tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreference.java
similarity index 94%
rename from tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreference.java
rename to tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreference.java
index 64cc360..2fbd45d 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreference.java
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
@@ -26,6 +24,7 @@
public class CustomCheckBoxPreference extends CheckBoxPreference {
private Drawable mIcon;
private String mTitle;
+
public CustomCheckBoxPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
@@ -45,7 +44,7 @@
}
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
mTitle = a.getString(R.styleable.CustPref_title);
mIcon = a.getDrawable(R.styleable.CustPref_icon);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreferenceTest.java
similarity index 96%
rename from tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreferenceTest.java
index 25ba3f3..4e33df0 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomCheckBoxPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomCheckBoxPreferenceTest.java
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.CheckBoxPreference;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomDialogPreference.java b/tests/tests/preference/src/android/preference/cts/CustomDialogPreference.java
similarity index 94%
rename from tests/tests/preference2/src/android/preference2/cts/CustomDialogPreference.java
rename to tests/tests/preference/src/android/preference/cts/CustomDialogPreference.java
index 20346b1..ebf580e 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomDialogPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomDialogPreference.java
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
@@ -26,6 +24,7 @@
public class CustomDialogPreference extends DialogPreference {
private Drawable mIcon;
private String mTitle;
+
public CustomDialogPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
@@ -41,7 +40,7 @@
}
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
mTitle = a.getString(R.styleable.CustPref_title);
mIcon = a.getDrawable(R.styleable.CustPref_icon);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomDialogPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/CustomDialogPreferenceTest.java
similarity index 94%
rename from tests/tests/preference2/src/android/preference2/cts/CustomDialogPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/CustomDialogPreferenceTest.java
index 5384420..d004ce9 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomDialogPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomDialogPreferenceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.test.ActivityInstrumentationTestCase2;
@@ -33,7 +33,7 @@
super.setUp();
mActivity = getActivity();
mDialogPref = (CustomDialogPreference) mActivity.findPreference(
- "custom_dialog_pref_1");
+ "custom_dialog_pref_1");
}
public void testNotNull() {
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreference.java b/tests/tests/preference/src/android/preference/cts/CustomEditTextPreference.java
similarity index 87%
rename from tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreference.java
rename to tests/tests/preference/src/android/preference/cts/CustomEditTextPreference.java
index 007f475..0bd9b408 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomEditTextPreference.java
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
@@ -26,6 +24,7 @@
public class CustomEditTextPreference extends EditTextPreference {
private Drawable mIcon;
private String mTitle;
+
public CustomEditTextPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
@@ -45,8 +44,8 @@
}
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
- mTitle =a.getString(R.styleable.CustPref_title);
- mIcon = a.getDrawable(R.styleable.CustPref_icon);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
+ mTitle = a.getString(R.styleable.CustPref_title);
+ mIcon = a.getDrawable(R.styleable.CustPref_icon);
}
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/CustomEditTextPreferenceTest.java
similarity index 92%
rename from tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/CustomEditTextPreferenceTest.java
index c131539..3994eb9 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomEditTextPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomEditTextPreferenceTest.java
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.test.ActivityInstrumentationTestCase2;
@@ -31,7 +31,7 @@
@Override
protected void setUp() throws Exception {
super.setUp();
- mActivity = (PreferencesFromXml)getActivity();
+ mActivity = (PreferencesFromXml) getActivity();
mEditTextPref = (CustomEditTextPreference) mActivity.findPreference(
"custom_edittext_pref_1");
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomPreference.java b/tests/tests/preference/src/android/preference/cts/CustomPreference.java
similarity index 94%
rename from tests/tests/preference2/src/android/preference2/cts/CustomPreference.java
rename to tests/tests/preference/src/android/preference/cts/CustomPreference.java
index 4875acc..710c425 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomPreference.java
@@ -13,13 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
import android.os.Parcelable;
import android.preference.Preference;
import android.preference.PreferenceManager;
@@ -45,11 +42,11 @@
}
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
setTitle(a.getString(R.styleable.CustPref_title));
setIcon(a.getDrawable(R.styleable.CustPref_icon));
}
-
+
@Override
protected boolean callChangeListener(Object newValue) {
return super.callChangeListener(newValue);
@@ -71,7 +68,7 @@
}
@Override
- protected int getPersistedInt(int defaultReturnValue) {
+ protected int getPersistedInt(int defaultReturnValue) {
return super.getPersistedInt(defaultReturnValue);
}
@@ -132,7 +129,7 @@
@Override
protected void onRestoreInstanceState(Parcelable state) {
-
+
super.onRestoreInstanceState(state);
}
@@ -173,8 +170,8 @@
}
@Override
- protected boolean shouldPersist() {
+ protected boolean shouldPersist() {
return super.shouldPersist();
- }
+ }
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomPreferenceGroup.java b/tests/tests/preference/src/android/preference/cts/CustomPreferenceGroup.java
similarity index 89%
rename from tests/tests/preference2/src/android/preference2/cts/CustomPreferenceGroup.java
rename to tests/tests/preference/src/android/preference/cts/CustomPreferenceGroup.java
index c4771d3..138fb26 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomPreferenceGroup.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomPreferenceGroup.java
@@ -13,13 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.util.AttributeSet;
@@ -42,7 +39,7 @@
}
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
setTitle(a.getString(R.styleable.CustPref_title));
setIcon(a.getDrawable(R.styleable.CustPref_icon));
}
@@ -51,7 +48,7 @@
return super.isOnSameScreenAsChildren();
}
- public boolean onPrepareAddPreference (Preference preference) {
+ public boolean onPrepareAddPreference(Preference preference) {
mOnPrepareCalled = true;
return super.onPrepareAddPreference(preference);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreference.java b/tests/tests/preference/src/android/preference/cts/CustomSwitchPreference.java
similarity index 87%
rename from tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreference.java
rename to tests/tests/preference/src/android/preference/cts/CustomSwitchPreference.java
index 6793c50..59b5e34 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomSwitchPreference.java
@@ -13,10 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
-
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.content.Context;
import android.content.res.TypedArray;
@@ -27,6 +24,7 @@
public class CustomSwitchPreference extends SwitchPreference {
private Drawable mIcon;
private String mTitle;
+
public CustomSwitchPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
@@ -44,10 +42,10 @@
setIcon(mIcon);
this.setTitle(mTitle);
}
-
+
private void init(AttributeSet attrs) {
- TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.CustPref);
- mTitle =a.getString(R.styleable.CustPref_title);
- mIcon = a.getDrawable(R.styleable.CustPref_icon);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CustPref);
+ mTitle = a.getString(R.styleable.CustPref_title);
+ mIcon = a.getDrawable(R.styleable.CustPref_icon);
}
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/CustomSwitchPreferenceTest.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/CustomSwitchPreferenceTest.java
index 937e48f..737ca49 100644
--- a/tests/tests/preference2/src/android/preference2/cts/CustomSwitchPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/CustomSwitchPreferenceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/tests/tests/preference2/src/android/preference2/cts/DialogPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/DialogPreferenceTest.java
similarity index 88%
rename from tests/tests/preference2/src/android/preference2/cts/DialogPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/DialogPreferenceTest.java
index edcef0c..4a237e2 100644
--- a/tests/tests/preference2/src/android/preference2/cts/DialogPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/DialogPreferenceTest.java
@@ -14,14 +14,12 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.graphics.drawable.Drawable;
import android.preference.DialogPreference;
import android.test.ActivityInstrumentationTestCase2;
-import android.preference2.cts.R;
-
public class DialogPreferenceTest
extends ActivityInstrumentationTestCase2<PreferenceFromCodeActivity> {
@@ -36,7 +34,7 @@
protected void setUp() throws Exception {
super.setUp();
mActivity = getActivity();
- mDialogPreference = (DialogPreference)mActivity.findPreference(
+ mDialogPreference = (DialogPreference) mActivity.findPreference(
"dialog_preference");
}
@@ -61,21 +59,21 @@
public void testGetDialogMessage() {
CharSequence dialogMessage = mDialogPreference.getDialogMessage();
- CharSequence dialogMessageExp = mActivity.getResources().getString(
+ CharSequence dialogMessageExp = mActivity.getResources().getString(
R.string.dialog_message);
assertEquals(dialogMessageExp, dialogMessage);
}
public void testGetPositiveButtonText() {
CharSequence positiveButtonText = mDialogPreference.getPositiveButtonText();
- CharSequence postiveButtonTextExp = mActivity.getResources().getString(
+ CharSequence postiveButtonTextExp = mActivity.getResources().getString(
R.string.positive_button_text);
assertEquals(positiveButtonText, postiveButtonTextExp);
}
public void testGetNegativeButtonText() {
CharSequence negativeButtonText = mDialogPreference.getNegativeButtonText();
- CharSequence negativeButtonTextExp = mActivity.getResources().getString(
+ CharSequence negativeButtonTextExp = mActivity.getResources().getString(
R.string.negative_button_text);
assertEquals(negativeButtonText, negativeButtonTextExp);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/EditTextPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/EditTextPreferenceTest.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/EditTextPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/EditTextPreferenceTest.java
index e0d5c8c..25e4986 100644
--- a/tests/tests/preference2/src/android/preference2/cts/EditTextPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/EditTextPreferenceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.EditTextPreference;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/tests/tests/preference2/src/android/preference2/cts/FragmentPreferences.java b/tests/tests/preference/src/android/preference/cts/FragmentPreferences.java
similarity index 94%
rename from tests/tests/preference2/src/android/preference2/cts/FragmentPreferences.java
rename to tests/tests/preference/src/android/preference/cts/FragmentPreferences.java
index 7efbe76..afabeda 100644
--- a/tests/tests/preference2/src/android/preference2/cts/FragmentPreferences.java
+++ b/tests/tests/preference/src/android/preference/cts/FragmentPreferences.java
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.app.Activity;
import android.os.Bundle;
diff --git a/tests/tests/preference2/src/android/preference2/cts/FragmentPreferencesTest.java b/tests/tests/preference/src/android/preference/cts/FragmentPreferencesTest.java
similarity index 86%
rename from tests/tests/preference2/src/android/preference2/cts/FragmentPreferencesTest.java
rename to tests/tests/preference/src/android/preference/cts/FragmentPreferencesTest.java
index 0bef2f1..e0df7bb 100644
--- a/tests/tests/preference2/src/android/preference2/cts/FragmentPreferencesTest.java
+++ b/tests/tests/preference/src/android/preference/cts/FragmentPreferencesTest.java
@@ -14,19 +14,18 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
-import android.preference2.cts.FragmentPreferences.PrefsFragment;
import android.test.ActivityInstrumentationTestCase2;
public class FragmentPreferencesTest
extends ActivityInstrumentationTestCase2<FragmentPreferences> {
private FragmentPreferences mActivity;
- private PrefsFragment mPrefsFragment;
+ private FragmentPreferences.PrefsFragment mPrefsFragment;
public FragmentPreferencesTest() {
super(FragmentPreferences.class);
@@ -36,8 +35,8 @@
protected void setUp() throws Exception {
super.setUp();
mActivity = getActivity();
- mPrefsFragment = (PrefsFragment) mActivity.getFragmentManager().
- findFragmentById(android.R.id.content);
+ mPrefsFragment = (FragmentPreferences.PrefsFragment) mActivity.getFragmentManager()
+ .findFragmentById(android.R.id.content);
}
public void testGetPreferenceManager() {
diff --git a/tests/tests/preference2/src/android/preference2/cts/ListPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/ListPreferenceTest.java
similarity index 87%
rename from tests/tests/preference2/src/android/preference2/cts/ListPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/ListPreferenceTest.java
index 743b51e..3d2b44d 100644
--- a/tests/tests/preference2/src/android/preference2/cts/ListPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/ListPreferenceTest.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.ListPreference;
import android.test.ActivityInstrumentationTestCase2;
-import android.preference2.cts.R;
-
public class ListPreferenceTest
extends ActivityInstrumentationTestCase2<PreferenceFromCodeActivity> {
@@ -49,7 +47,7 @@
String[] entryValues = convertToStringArray((CharSequence[]) mListPref.getEntryValues());
String[] entryValuesExp = mActivity.getResources().getStringArray(
R.array.entryvalues_list_preference);
- compareArrays(entryValuesExp,entryValues);
+ compareArrays(entryValuesExp, entryValues);
}
public void testIsEnabled() {
@@ -57,17 +55,17 @@
assertTrue(isEnabled);
}
- private synchronized String[] convertToStringArray(CharSequence[] array){
+ private synchronized String[] convertToStringArray(CharSequence[] array) {
String[] strArray = new String[array.length];
- for(int i = 0; i < array.length; i++){
+ for (int i = 0; i < array.length; i++) {
strArray[i] = (String) array[i];
}
return strArray;
}
- private void compareArrays(String[] firstArray,String[] secArray){
+ private void compareArrays(String[] firstArray, String[] secArray) {
assertEquals(firstArray.length, secArray.length);
- for(int i = 0; i < firstArray.length; i++) {
+ for (int i = 0; i < firstArray.length; i++) {
assertEquals(firstArray[i], secArray[i]);
}
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowLandscapeTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowLandscapeTest.java
similarity index 98%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowLandscapeTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowLandscapeTest.java
index 8e042d7..830fa1b 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowLandscapeTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowLandscapeTest.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowPortraitTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowPortraitTest.java
similarity index 98%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowPortraitTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowPortraitTest.java
index 48e7ef7..3e1e4c0 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowPortraitTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowPortraitTest.java
@@ -11,12 +11,13 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
+
import static org.junit.Assume.assumeFalse;
import android.content.Intent;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowTest.java
similarity index 98%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowTest.java
index 28071ac..86c6c87 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityFlowTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceActivityFlowTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static android.preference.PreferenceActivity.EXTRA_NO_HEADERS;
import static android.preference.PreferenceActivity.EXTRA_SHOW_FRAGMENT;
@@ -361,7 +361,7 @@
* For: Any screen (single or multi-pane).
* Scenario: Tests that list preference opens correctly and that back press correctly closes it.
*/
- void listDialogTest() {
+ void listDialogTest() {
launchActivity();
assertInitialState();
@@ -625,5 +625,5 @@
protected abstract PreferenceWithHeaders launchActivity(Intent intent);
- protected abstract void runOnUiThread(final Runnable runnable);
+ protected abstract void runOnUiThread(Runnable runnable);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityLegacyFlowTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceActivityLegacyFlowTest.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceActivityLegacyFlowTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceActivityLegacyFlowTest.java
index 46863cb..85ecf74 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceActivityLegacyFlowTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceActivityLegacyFlowTest.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static org.junit.Assert.assertTrue;
diff --git a/tests/tests/preference/src/android/preference/cts/PreferenceActivityTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceActivityTest.java
index 162f200..d0fd829 100644
--- a/tests/tests/preference/src/android/preference/cts/PreferenceActivityTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceActivityTest.java
@@ -16,8 +16,6 @@
package android.preference.cts;
-import android.preference.cts.R;
-
import android.content.Intent;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceCategoryTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceCategoryTest.java
similarity index 86%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceCategoryTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceCategoryTest.java
index 33adceb..2bb6fb6 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceCategoryTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceCategoryTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.Preference;
import android.test.ActivityInstrumentationTestCase2;
@@ -35,9 +35,9 @@
}
public void testPreferenceCategory() {
- Preference prefCat = mActivity.findPreference("pref-1");
- assertNotNull(prefCat);
- assertTrue(!prefCat.isEnabled());
+ Preference prefCat = mActivity.findPreference("pref-1");
+ assertNotNull(prefCat);
+ assertTrue(!prefCat.isEnabled());
}
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceDataStoreTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceDataStoreTest.java
similarity index 99%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceDataStoreTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceDataStoreTest.java
index cc93b44..9450d08 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceDataStoreTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceDataStoreTest.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -500,7 +500,7 @@
*/
private static class PreferenceWrapper extends Preference {
- Object defaultValue;
+ public Object defaultValue;
PreferenceWrapper(Context context) {
super(context);
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentActivity.java b/tests/tests/preference/src/android/preference/cts/PreferenceFragmentActivity.java
similarity index 89%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentActivity.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceFragmentActivity.java
index 8b7a6d9..3bc852a 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentActivity.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceFragmentActivity.java
@@ -13,14 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.app.Activity;
-import android.app.FragmentTransaction;
import android.os.Bundle;
-import android.preference.Preference;
import android.preference.PreferenceFragment;
-import android.preference.PreferenceScreen;
/**
* Demonstration of PreferenceFragment, showing a single fragment in an
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceFragmentTest.java
similarity index 82%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceFragmentTest.java
index 4c883c2..caf1f92 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceFragmentTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceFragmentTest.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
-import android.preference2.cts.PreferenceFragmentActivity.PrefFragment;
+import android.preference.cts.PreferenceFragmentActivity.PrefFragment;
import android.test.ActivityInstrumentationTestCase2;
public class PreferenceFragmentTest
@@ -37,15 +37,15 @@
}
public void testGetPreferenceManager() {
- PrefFragment prefFragment = (PrefFragment) mActivity.getFragmentManager().
- findFragmentByTag(PrefFragment.TAG);
+ PrefFragment prefFragment = (PrefFragment) mActivity.getFragmentManager()
+ .findFragmentByTag(PrefFragment.TAG);
PreferenceManager prefManager = prefFragment.getPreferenceManager();
assertNotNull(prefManager);
}
public void testGetPreferenceScreen() {
- PrefFragment prefsFragment = (PrefFragment) mActivity.getFragmentManager().
- findFragmentByTag(PrefFragment.TAG);
+ PrefFragment prefsFragment = (PrefFragment) mActivity.getFragmentManager()
+ .findFragmentByTag(PrefFragment.TAG);
PreferenceScreen prefScreen = prefsFragment.getPreferenceScreen();
assertNull(prefScreen);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceFromCodeActivity.java b/tests/tests/preference/src/android/preference/cts/PreferenceFromCodeActivity.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceFromCodeActivity.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceFromCodeActivity.java
index 7a67e3e..64bfcb0 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceFromCodeActivity.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceFromCodeActivity.java
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
@@ -124,7 +122,7 @@
mPrefScreen.addPreference(customPrefGroup);
CustomPreference customPreference = new CustomPreference(this);
- customPreference .setTitle(R.string.custom_preference);
+ customPreference.setTitle(R.string.custom_preference);
customPreference.setKey("custom-preference");
mPrefScreen.addPreference(customPreference);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceGroupTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceGroupTest.java
similarity index 90%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceGroupTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceGroupTest.java
index fe0b3b2..40f3778 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceGroupTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceGroupTest.java
@@ -14,17 +14,11 @@
* limitations under the License.
*/
-package android.preference2.cts;
-
-import android.preference2.cts.R;
+package android.preference.cts;
import android.preference.CheckBoxPreference;
-import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.preference2.cts.PreferenceFragmentActivity.PrefFragment;
import android.test.ActivityInstrumentationTestCase2;
public class PreferenceGroupTest
@@ -84,13 +78,13 @@
}
public void testIsOnSameScreenAsChildren() {
- CustomPreferenceGroup mCustomPreferenceGroup = (CustomPreferenceGroup)
+ CustomPreferenceGroup mCustomPreferenceGroup = (CustomPreferenceGroup)
mActivity.findPreference("custom-pref-group");
assertTrue(mCustomPreferenceGroup.isOnSameScreenAsChildren());
}
- public void testOnPrepareAddPreference( ) {
- CustomPreferenceGroup mCustomPreferenceGroup = (CustomPreferenceGroup)
+ public void testOnPrepareAddPreference() {
+ CustomPreferenceGroup mCustomPreferenceGroup = (CustomPreferenceGroup)
mActivity.findPreference("custom-pref-group");
CheckBoxPreference checkboxPref = new CheckBoxPreference(mActivity);
checkboxPref.setKey("checkbox_preference-2");
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceParentGroupTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceParentGroupTest.java
similarity index 98%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceParentGroupTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceParentGroupTest.java
index a645dc8..a17bdc6 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceParentGroupTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceParentGroupTest.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceRecycleTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceRecycleTest.java
similarity index 91%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceRecycleTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceRecycleTest.java
index 2ff651c..5658f24 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceRecycleTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceRecycleTest.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -35,7 +35,7 @@
import org.junit.runner.RunWith;
/**
- * Tests for {@link android.preference.Preference#setRecycleEnabled()} API.
+ * Tests for {@link android.preference.Preference#setRecycleEnabled(boolean)} API.
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -43,7 +43,7 @@
private PreferencesFromXmlRecycle mActivity;
- private static int TIMEOUT_MS = 5000;
+ private static final int TIMEOUT_MS = 5000;
@Rule
public ActivityTestRule<PreferencesFromXmlRecycle> mActivityRule =
@@ -81,9 +81,9 @@
PreferenceScreen screen = mActivity.getPreferenceScreen();
RecycleCheckPreference recyclePref =
- (RecycleCheckPreference)screen.findPreference("pref_checkbox_recycle");
+ (RecycleCheckPreference) screen.findPreference("pref_checkbox_recycle");
RecycleCheckPreference noRecyclePref =
- (RecycleCheckPreference)screen.findPreference("pref_checkbox_no_recycle");
+ (RecycleCheckPreference) screen.findPreference("pref_checkbox_no_recycle");
// At the beginning the views must be always created (no recycling involved).
assertEquals(1, recyclePref.getViewCalledCnt);
@@ -135,9 +135,9 @@
// Grab the preferences we just created on the Ui thread.
RecycleCheckPreference recyclePref =
- (RecycleCheckPreference)screen.findPreference("recyclePref");
+ (RecycleCheckPreference) screen.findPreference("recyclePref");
RecycleCheckPreference noRecyclePref =
- (RecycleCheckPreference)screen.findPreference("noRecyclePref");
+ (RecycleCheckPreference) screen.findPreference("noRecyclePref");
// Wait for the views to be created (because we may scroll the screen to display the
// latest views, these views may get refreshed more than once).
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceTest.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceTest.java
index 6b36fee..5e6eda9 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.graphics.drawable.Drawable;
import android.preference.CheckBoxPreference;
@@ -22,8 +22,6 @@
import android.preference.PreferenceGroup;
import android.test.ActivityInstrumentationTestCase2;
-import android.preference2.cts.R;
-
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
@@ -90,7 +88,7 @@
}
public void testGetTitle() {
- CharSequence title= mPreference.getTitle();
+ CharSequence title = mPreference.getTitle();
String titleExp = mActivity.getResources().getString(
R.string.title_checkbox_preference);
assertEquals(titleExp, title);
@@ -128,7 +126,7 @@
assertEquals(key, mPreference.getKey());
}
- public void testGetPreferenceManager() {
+ public void testGetPreferenceManager() {
assertNotNull(mPreference.getPreferenceManager());
}
@@ -278,13 +276,13 @@
String key = "" + Math.random();
mCustomPreference.setKey(key);
PreferenceGroup mPreferenceGroup = (PreferenceGroup) mActivity.findPreference(
- "pref-group");
+ "pref-group");
mPreferenceGroup.addPreference(mCustomPreference);
try {
- long expected = 99999999l;
+ long expected = 99999999L;
boolean result = mCustomPreference.persistLong(expected);
assertTrue(result);
- long actual = mCustomPreference.getPersistedLong(10000000l);
+ long actual = mCustomPreference.getPersistedLong(10000000L);
assertEquals(expected, actual);
} finally {
mPreferenceGroup.removePreference(mCustomPreference);
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeaders.java
similarity index 95%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceWithHeaders.java
index db1c5b6..042df3f 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeaders.java
@@ -14,12 +14,11 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
-import android.preference2.cts.R;
import android.widget.Button;
import java.util.List;
@@ -32,9 +31,9 @@
public class PreferenceWithHeaders extends PreferenceActivity {
// For tests to verify if the headers were loaded.
- List<Header> loadedHeaders;
+ public List<Header> loadedHeaders;
- boolean onCreateFinished;
+ public boolean onCreateFinished;
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersLandscape.java b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersLandscape.java
similarity index 91%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersLandscape.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersLandscape.java
index 004b3ab..f1a7d17 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersLandscape.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersLandscape.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
/**
* Landscape alias of {@link PreferenceWithHeaders} for {@link PreferenceActivityFlowTest}.
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersPortrait.java b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersPortrait.java
similarity index 91%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersPortrait.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersPortrait.java
index 438a55d..8f109af 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersPortrait.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersPortrait.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
/**
* Portrait alias of {@link PreferenceWithHeaders} for {@link PreferenceActivityFlowTest}.
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersTest.java b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersTest.java
similarity index 97%
rename from tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersTest.java
rename to tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersTest.java
index 28bff81..bfd0102 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeadersTest.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferenceWithHeadersTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXml.java b/tests/tests/preference/src/android/preference/cts/PreferencesFromXml.java
similarity index 92%
rename from tests/tests/preference2/src/android/preference2/cts/PreferencesFromXml.java
rename to tests/tests/preference/src/android/preference/cts/PreferencesFromXml.java
index 1aff9f5..873254f 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXml.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferencesFromXml.java
@@ -14,9 +14,8 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
-import android.preference2.cts.R;
import android.os.Bundle;
import android.preference.PreferenceActivity;
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlNested.java b/tests/tests/preference/src/android/preference/cts/PreferencesFromXmlNested.java
similarity index 89%
rename from tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlNested.java
rename to tests/tests/preference/src/android/preference/cts/PreferencesFromXmlNested.java
index df31c1e..7643186 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlNested.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferencesFromXmlNested.java
@@ -11,14 +11,13 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.os.Bundle;
import android.preference.PreferenceActivity;
-import android.preference2.cts.R;
public class PreferencesFromXmlNested extends PreferenceActivity {
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlRecycle.java b/tests/tests/preference/src/android/preference/cts/PreferencesFromXmlRecycle.java
similarity index 89%
rename from tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlRecycle.java
rename to tests/tests/preference/src/android/preference/cts/PreferencesFromXmlRecycle.java
index 428e536..c3245b0 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferencesFromXmlRecycle.java
+++ b/tests/tests/preference/src/android/preference/cts/PreferencesFromXmlRecycle.java
@@ -11,14 +11,13 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.os.Bundle;
import android.preference.PreferenceActivity;
-import android.preference2.cts.R;
public class PreferencesFromXmlRecycle extends PreferenceActivity {
diff --git a/tests/tests/preference2/src/android/preference2/cts/RecycleCheckPreference.java b/tests/tests/preference/src/android/preference/cts/RecycleCheckPreference.java
similarity index 92%
rename from tests/tests/preference2/src/android/preference2/cts/RecycleCheckPreference.java
rename to tests/tests/preference/src/android/preference/cts/RecycleCheckPreference.java
index 10e1c40..e97dfdd 100644
--- a/tests/tests/preference2/src/android/preference2/cts/RecycleCheckPreference.java
+++ b/tests/tests/preference/src/android/preference/cts/RecycleCheckPreference.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.content.Context;
import android.preference.CheckBoxPreference;
@@ -31,13 +31,13 @@
/**
* How many times was the {@link #getView(View, ViewGroup)} method called during the lifetime.
*/
- int getViewCalledCnt;
+ public int getViewCalledCnt;
/**
* Whether the convert view param was null during the last call of
* {@link #getView(View, ViewGroup)}
*/
- boolean wasConvertViewNullInLastCall;
+ public boolean wasConvertViewNullInLastCall;
public RecycleCheckPreference(Context context, AttributeSet attrs,
diff --git a/tests/tests/preference2/src/android/preference2/cts/SwitchPreferenceTest.java b/tests/tests/preference/src/android/preference/cts/SwitchPreferenceTest.java
similarity index 95%
rename from tests/tests/preference2/src/android/preference2/cts/SwitchPreferenceTest.java
rename to tests/tests/preference/src/android/preference/cts/SwitchPreferenceTest.java
index 218c55a..0744989 100644
--- a/tests/tests/preference2/src/android/preference2/cts/SwitchPreferenceTest.java
+++ b/tests/tests/preference/src/android/preference/cts/SwitchPreferenceTest.java
@@ -14,14 +14,12 @@
* limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
-import android.content.res.Resources;
+import android.content.res.Resources;
import android.preference.SwitchPreference;
import android.test.ActivityInstrumentationTestCase2;
-import android.preference2.cts.R;
-
public class SwitchPreferenceTest
extends ActivityInstrumentationTestCase2<PreferenceFromCodeActivity> {
@@ -50,7 +48,7 @@
public void testGetSummary() {
String summary = (String) mSwitchPref.getSummary();
- String summaryExp = mResources.getString(R.string.summary_switch_preference);
+ String summaryExp = mResources.getString(R.string.summary_switch_preference);
assertEquals(summaryExp, summary);
}
@@ -92,7 +90,7 @@
public void run() {
mSwitchPref.setSwitchTextOn(switchOn);
}
- });
+ });
CharSequence switchOnExp = mSwitchPref.getSwitchTextOn();
assertEquals(switchOnExp, switchOn);
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/TestUtils.java b/tests/tests/preference/src/android/preference/cts/TestUtils.java
similarity index 96%
rename from tests/tests/preference2/src/android/preference2/cts/TestUtils.java
rename to tests/tests/preference/src/android/preference/cts/TestUtils.java
index 5eafca1..6bf6652 100644
--- a/tests/tests/preference2/src/android/preference2/cts/TestUtils.java
+++ b/tests/tests/preference/src/android/preference/cts/TestUtils.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package android.preference2.cts;
+package android.preference.cts;
import android.app.Instrumentation;
import android.app.UiAutomation;
@@ -37,7 +37,7 @@
*/
public class TestUtils {
- final UiDevice device;
+ public final UiDevice device;
private final Context mContext;
private final Instrumentation mInstrumentation;
@@ -80,8 +80,8 @@
void tapOnViewWithText(String text) {
UiObject2 object2 = getTextObject(text);
if (object2 != null) {
- object2.click();
- return;
+ object2.click();
+ return;
}
// If the view is a part of a scrollable, it might be offscreen
@@ -98,7 +98,7 @@
boolean isTextShown(String text) {
if (getTextObject(text) != null) {
- return true;
+ return true;
}
UiScrollable textScroll = new UiScrollable(new UiSelector().scrollable(true));
diff --git a/tests/tests/preference2/Android.bp b/tests/tests/preference2/Android.bp
deleted file mode 100644
index 51e446f..0000000
--- a/tests/tests/preference2/Android.bp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (C) 2012 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-android_test {
- name: "CtsPreference2TestCases",
- defaults: ["cts_defaults"],
-
- test_suites: [
- "cts",
- "vts",
- "general-tests",
- "cts_instant",
- ],
-
- static_libs: [
- "ctstestrunner",
- "compatibility-device-util",
- "mockito-target-minus-junit4",
- "ub-uiautomator",
- ],
-
- libs: [
- "android.test.runner.stubs",
- "android.test.base.stubs",
- ],
-
- srcs: ["src/**/*.java"],
-
- sdk_version: "test_current",
-}
diff --git a/tests/tests/preference2/AndroidManifest.xml b/tests/tests/preference2/AndroidManifest.xml
deleted file mode 100644
index e6929c3..0000000
--- a/tests/tests/preference2/AndroidManifest.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.preference2.cts"
- android:targetSandboxVersion="2">
-
- <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
- <application>
- <uses-library android:name="android.test.runner" />
- <activity
- android:name="android.preference2.cts.PreferenceFragmentActivity" >
- </activity>
- <activity
- android:name="android.preference2.cts.PreferenceStubActivity" >
- </activity>
- <activity
- android:name="android.preference2.cts.PreferenceFromCodeActivity" >
- </activity>
- <activity android:name="android.preference2.cts.PreferencesFromXml" />
- <activity android:name="android.preference2.cts.PreferencesFromXmlNested" />
- <activity android:name="android.preference2.cts.PreferencesFromXmlRecycle" />
- <activity android:name="android.preference2.cts.PreferenceWithHeaders" />
- <!-- Landscape setup of PreferenceWithHeaders -->
- <activity
- android:name="android.preference2.cts.PreferenceWithHeadersLandscape"
- android:screenOrientation="landscape"/>
- <!-- Portrait setup of PreferenceWithHeaders -->
- <activity
- android:name="android.preference2.cts.PreferenceWithHeadersPortrait"
- android:screenOrientation="portrait"/>
- <activity android:name="android.preference2.cts.FragmentPreferences" />
- </application>
-
- <!-- This is a self-instrumenting test package. -->
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="android.preference2.cts"
- android:label="CTS Test Cases for android.preference2">
- <meta-data android:name="listener"
- android:value="com.android.cts.runner.CtsTestRunListener" />
- </instrumentation>
-
-</manifest>
-
diff --git a/tests/tests/preference2/AndroidTest.xml b/tests/tests/preference2/AndroidTest.xml
deleted file mode 100644
index 452702d..0000000
--- a/tests/tests/preference2/AndroidTest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Config for CTS Preference test cases">
- <option name="test-suite-tag" value="cts" />
- <option name="config-descriptor:metadata" key="component" value="uitoolkit" />
- <option name="config-descriptor:metadata" key="parameter" value="instant_app" />
- <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
- <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
- <option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="CtsPreference2TestCases.apk" />
- </target_preparer>
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="package" value="android.preference2.cts" />
- </test>
-</configuration>
diff --git a/tests/tests/preference2/OWNERS b/tests/tests/preference2/OWNERS
deleted file mode 100644
index 827134e..0000000
--- a/tests/tests/preference2/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-lpf@google.com
-pavlis@google.com
-clarabayarri@google.com