diff options
author | Walter Jang <wjang@google.com> | 2016-09-17 00:35:57 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-09-17 00:35:57 +0000 |
commit | d3d2800fb9fe3229a77e1cb28a64dd7f3dd2ea14 (patch) | |
tree | 40fda0471a5d47eb9cbfe1f09790341dd2f3ab3e /tests | |
parent | ea89eec68ceae3e9234fd35b49b468426f7a4efb (diff) | |
parent | 98d41d714f8631e0988624df5b566eb62d63a8e5 (diff) | |
download | packages_apps_Contacts-d3d2800fb9fe3229a77e1cb28a64dd7f3dd2ea14.tar.gz packages_apps_Contacts-d3d2800fb9fe3229a77e1cb28a64dd7f3dd2ea14.tar.bz2 packages_apps_Contacts-d3d2800fb9fe3229a77e1cb28a64dd7f3dd2ea14.zip |
Fix the ContactsTest account type and sync adapter (1/2)
am: 98d41d714f
Change-Id: Ic30c8e6f2e617871b305a47a0da63d57fcb0ac75
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AndroidManifest.xml | 11 | ||||
-rw-r--r-- | tests/res/drawable/ic_contact_picture.png | bin | 589 -> 0 bytes | |||
-rw-r--r-- | tests/res/values/donottranslate_strings.xml | 2 | ||||
-rw-r--r-- | tests/res/xml/test_basic_authenticator.xml | 6 | ||||
-rw-r--r-- | tests/res/xml/test_basic_syncadapter.xml | 2 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/FakeDeviceAccountTypeFactory.java | 2 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/testauth/TestAuthenticationService.java (renamed from tests/src/com/android/contacts/common/tests/testauth/TestAuthenticationService.java) | 2 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/testauth/TestAuthenticator.java (renamed from tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java) | 2 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/testauth/TestSyncAdapter.java (renamed from tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java) | 5 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/testauth/TestSyncService.java (renamed from tests/src/com/android/contacts/common/tests/testauth/TestSyncService.java) | 2 | ||||
-rw-r--r-- | tests/src/com/android/contacts/tests/testauth/TestauthConstants.java (renamed from tests/src/com/android/contacts/common/tests/testauth/TestauthConstants.java) | 2 |
11 files changed, 19 insertions, 17 deletions
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index 65c04bc21..87f9a8ace 100644 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -69,6 +69,17 @@ android:name="android.accounts.AccountAuthenticator" android:resource="@xml/test_basic_authenticator" /> </service> + <service android:name=".testauth.TestSyncService$Basic" android:exported="true" > + <intent-filter> + <action android:name="android.content.SyncAdapter"/> + </intent-filter> + <meta-data + android:name="android.content.SyncAdapter" + android:resource="@xml/test_basic_syncadapter" /> + <meta-data + android:name="android.provider.CONTACTS_STRUCTURE" + android:resource="@xml/contacts_fallback" /> + </service> <service android:name=".QueryService" /> <service android:name=".PhoneNumberTestService" /> diff --git a/tests/res/drawable/ic_contact_picture.png b/tests/res/drawable/ic_contact_picture.png Binary files differdeleted file mode 100644 index 68767774f..000000000 --- a/tests/res/drawable/ic_contact_picture.png +++ /dev/null diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml index 152811277..76cf4e479 100644 --- a/tests/res/values/donottranslate_strings.xml +++ b/tests/res/values/donottranslate_strings.xml @@ -104,7 +104,5 @@ <string name="attribution_flicker">Flicker</string> <string name="attribution_twitter">Twitter</string> - <string name="authenticator_basic_label">Test adapter</string> - <string name="test_string">TEST STRING</string> </resources> diff --git a/tests/res/xml/test_basic_authenticator.xml b/tests/res/xml/test_basic_authenticator.xml index ecd100a74..efcdadfed 100644 --- a/tests/res/xml/test_basic_authenticator.xml +++ b/tests/res/xml/test_basic_authenticator.xml @@ -18,8 +18,6 @@ --> <account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" - android:accountType="com.android.contacts.tests.authtest.basic" - android:icon="@drawable/ic_contact_picture" - android:smallIcon="@drawable/ic_contact_picture" - android:label="@string/authenticator_basic_label" + android:accountType="com.android.contacts.tests.testauth.basic" + android:label="@string/applicationLabel" /> diff --git a/tests/res/xml/test_basic_syncadapter.xml b/tests/res/xml/test_basic_syncadapter.xml index fecc0eb16..b897185db 100644 --- a/tests/res/xml/test_basic_syncadapter.xml +++ b/tests/res/xml/test_basic_syncadapter.xml @@ -19,7 +19,7 @@ <sync-adapter xmlns:android="http://schemas.android.com/apk/res/android" android:contentAuthority="com.android.contacts" - android:accountType="com.android.contacts.tests.authtest.basic" + android:accountType="com.android.contacts.tests.testauth.basic" android:supportsUploading="true" android:userVisible="true" /> diff --git a/tests/src/com/android/contacts/tests/FakeDeviceAccountTypeFactory.java b/tests/src/com/android/contacts/tests/FakeDeviceAccountTypeFactory.java index 6a500ec0f..65f8014eb 100644 --- a/tests/src/com/android/contacts/tests/FakeDeviceAccountTypeFactory.java +++ b/tests/src/com/android/contacts/tests/FakeDeviceAccountTypeFactory.java @@ -16,12 +16,10 @@ package com.android.contacts.tests; import com.android.contacts.common.model.account.AccountType; -import com.android.contacts.common.model.account.FallbackAccountType; import com.android.contacts.common.util.DeviceLocalAccountTypeFactory; import java.util.HashMap; import java.util.Map; -import java.util.Set; public class FakeDeviceAccountTypeFactory implements DeviceLocalAccountTypeFactory { diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticationService.java b/tests/src/com/android/contacts/tests/testauth/TestAuthenticationService.java index 93d1f4a90..84f3f0f80 100644 --- a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticationService.java +++ b/tests/src/com/android/contacts/tests/testauth/TestAuthenticationService.java @@ -14,7 +14,7 @@ * the License. */ -package com.android.contacts.common.tests.testauth; +package com.android.contacts.tests.testauth; import android.app.Service; import android.content.Intent; diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java b/tests/src/com/android/contacts/tests/testauth/TestAuthenticator.java index 2f676c70b..97e2e4d18 100644 --- a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java +++ b/tests/src/com/android/contacts/tests/testauth/TestAuthenticator.java @@ -14,7 +14,7 @@ * the License. */ -package com.android.contacts.common.tests.testauth; +package com.android.contacts.tests.testauth; import android.accounts.AbstractAccountAuthenticator; import android.accounts.Account; diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java b/tests/src/com/android/contacts/tests/testauth/TestSyncAdapter.java index a7c0f83c4..feef8ec30 100644 --- a/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java +++ b/tests/src/com/android/contacts/tests/testauth/TestSyncAdapter.java @@ -13,10 +13,9 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.android.contacts.common.tests.testauth; +package com.android.contacts.tests.testauth; import android.accounts.Account; -import android.accounts.AccountManager; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.ContentResolver; @@ -32,14 +31,12 @@ import android.util.Log; * */ public class TestSyncAdapter extends AbstractThreadedSyncAdapter { - private final AccountManager mAccountManager; private final Context mContext; public TestSyncAdapter(Context context, boolean autoInitialize) { super(context, autoInitialize); mContext = context.getApplicationContext(); - mAccountManager = AccountManager.get(mContext); } /** diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestSyncService.java b/tests/src/com/android/contacts/tests/testauth/TestSyncService.java index 3354cb4e1..99287771c 100644 --- a/tests/src/com/android/contacts/common/tests/testauth/TestSyncService.java +++ b/tests/src/com/android/contacts/tests/testauth/TestSyncService.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.android.contacts.common.tests.testauth; +package com.android.contacts.tests.testauth; import android.app.Service; import android.content.Intent; diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestauthConstants.java b/tests/src/com/android/contacts/tests/testauth/TestauthConstants.java index 3ce7f5abe..717ed354a 100644 --- a/tests/src/com/android/contacts/common/tests/testauth/TestauthConstants.java +++ b/tests/src/com/android/contacts/tests/testauth/TestauthConstants.java @@ -14,7 +14,7 @@ * the License. */ -package com.android.contacts.common.tests.testauth; +package com.android.contacts.tests.testauth; class TestauthConstants { public static final String LOG_TAG = "Testauth"; |