summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIhab Awad <ihab@google.com>2014-06-30 21:21:38 -0700
committerIhab Awad <ihab@google.com>2014-07-02 12:37:00 -0700
commitad12d04e15a8a66c43893fb29cf08649bd0b675e (patch)
tree352610dcaeec877810a442937a4d72660368ded6 /tests
parentdcc47113e3a5705e32c9b7e769c38aefdd4bd0e9 (diff)
downloadandroid_packages_apps_ContactsCommon-ad12d04e15a8a66c43893fb29cf08649bd0b675e.tar.gz
android_packages_apps_ContactsCommon-ad12d04e15a8a66c43893fb29cf08649bd0b675e.tar.bz2
android_packages_apps_ContactsCommon-ad12d04e15a8a66c43893fb29cf08649bd0b675e.zip
Rename Telecomm "Subscription" to "Account" (2/7)
Change-Id: I73cd3d1a2e7ae12f2e8d94f0a093c6d91bf7c912
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java16
-rw-r--r--tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java6
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java b/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java
index 2f676c70..e6a47cda 100644
--- a/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java
+++ b/tests/src/com/android/contacts/common/tests/testauth/TestAuthenticator.java
@@ -19,7 +19,7 @@ package com.android.contacts.common.tests.testauth;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
-import android.accounts.AccountManager;
+import android.accounts.PhoneAccountManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
@@ -67,11 +67,11 @@ class TestAuthenticator extends AbstractAccountAuthenticator {
final Account account = new Account(newUniqueUserName(), accountType);
// Create an account.
- AccountManager.get(mContext).addAccountExplicitly(account, PASSWORD, null);
+ PhoneAccountManager.get(mContext).addAccountExplicitly(account, PASSWORD, null);
// And return it.
- bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
- bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
+ bundle.putString(PhoneAccountManager.KEY_ACCOUNT_NAME, account.name);
+ bundle.putString(PhoneAccountManager.KEY_ACCOUNT_TYPE, account.type);
return bundle;
}
@@ -83,9 +83,9 @@ class TestAuthenticator extends AbstractAccountAuthenticator {
String authTokenType, Bundle loginOptions) {
Log.v(TestauthConstants.LOG_TAG, "getAuthToken() account=" + account);
final Bundle bundle = new Bundle();
- bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
- bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
- bundle.putString(AccountManager.KEY_AUTHTOKEN, account.name);
+ bundle.putString(PhoneAccountManager.KEY_ACCOUNT_NAME, account.name);
+ bundle.putString(PhoneAccountManager.KEY_ACCOUNT_TYPE, account.type);
+ bundle.putString(PhoneAccountManager.KEY_AUTHTOKEN, account.name);
return bundle;
}
@@ -118,7 +118,7 @@ class TestAuthenticator extends AbstractAccountAuthenticator {
// return false (no) for any queries.
Log.v(TestauthConstants.LOG_TAG, "hasFeatures()");
final Bundle result = new Bundle();
- result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, false);
+ result.putBoolean(PhoneAccountManager.KEY_BOOLEAN_RESULT, false);
return result;
}
diff --git a/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java b/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java
index a7c0f83c..f0186d98 100644
--- a/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java
+++ b/tests/src/com/android/contacts/common/tests/testauth/TestSyncAdapter.java
@@ -16,7 +16,7 @@
package com.android.contacts.common.tests.testauth;
import android.accounts.Account;
-import android.accounts.AccountManager;
+import android.accounts.PhoneAccountManager;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
@@ -32,14 +32,14 @@ import android.util.Log;
*
*/
public class TestSyncAdapter extends AbstractThreadedSyncAdapter {
- private final AccountManager mAccountManager;
+ private final PhoneAccountManager mPhoneAccountManager;
private final Context mContext;
public TestSyncAdapter(Context context, boolean autoInitialize) {
super(context, autoInitialize);
mContext = context.getApplicationContext();
- mAccountManager = AccountManager.get(mContext);
+ mPhoneAccountManager = PhoneAccountManager.get(mContext);
}
/**