summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIhab Awad <ihab@google.com>2014-06-30 21:24:01 -0700
committerIhab Awad <ihab@google.com>2014-07-02 12:38:30 -0700
commit1d1bd0da0b32a5b8cb1c7c5585acccb180b19849 (patch)
tree9bca7648e00e95e177c8fd52fa775f3e16769228 /tests
parente9b9290142e0e0e767536bc0e8f89f80f7ad3926 (diff)
downloadandroid_packages_apps_Dialer-1d1bd0da0b32a5b8cb1c7c5585acccb180b19849.tar.gz
android_packages_apps_Dialer-1d1bd0da0b32a5b8cb1c7c5585acccb180b19849.tar.bz2
android_packages_apps_Dialer-1d1bd0da0b32a5b8cb1c7c5585acccb180b19849.zip
Rename Telecomm "Subscription" to "Account" (3/7)
Change-Id: I866e9d4f629a2b23acb3d3d3f2baeb0a674522f7
Diffstat (limited to 'tests')
-rw-r--r--tests/res/layout/fill_call_log_test.xml14
-rw-r--r--tests/res/values/donottranslate_strings.xml8
-rw-r--r--tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java24
3 files changed, 23 insertions, 23 deletions
diff --git a/tests/res/layout/fill_call_log_test.xml b/tests/res/layout/fill_call_log_test.xml
index c81a679db..7651b0827 100644
--- a/tests/res/layout/fill_call_log_test.xml
+++ b/tests/res/layout/fill_call_log_test.xml
@@ -179,28 +179,28 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/call_subscription" />
+ android:text="@string/call_account" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
- android:id="@+id/subscription0"
+ android:id="@+id/account0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/subscription0"
+ android:text="@string/account0"
android:textSize="9sp" />
<RadioButton
- android:id="@+id/subscription1"
+ android:id="@+id/account1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/subscription1"
+ android:text="@string/account1"
android:textSize="9sp" />
<RadioButton
- android:id="@+id/no_subscription"
+ android:id="@+id/no_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/no_subscription"
+ android:text="@string/no_account"
android:textSize="9sp" />
</RadioGroup>
<Button
diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml
index cfc70c4d6..553b3c0a6 100644
--- a/tests/res/values/donottranslate_strings.xml
+++ b/tests/res/values/donottranslate_strings.xml
@@ -51,8 +51,8 @@
<string name="presentation_unknown">Unknown</string>
<string name="presentation_payphone">Payphone</string>
<string name="delta_after_add">Offset call time after add (min): </string>
- <string name="call_subscription">Subscription</string>
- <string name="subscription0">Subscription 0</string>
- <string name="subscription1">Subscription 1</string>
- <string name="no_subscription">No Subscription</string>
+ <string name="call_account">Account</string>
+ <string name="account0">Account 0</string>
+ <string name="account1">Account 1</string>
+ <string name="no_account">No Account</string>
</resources>
diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
index e12a2a2aa..e495ca742 100644
--- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
+++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
@@ -31,7 +31,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.provider.CallLog.Calls;
-import android.telecomm.Subscription;
+import android.telecomm.PhoneAccount;
import android.telephony.TelephonyManager;
import android.text.format.DateFormat;
import android.util.Log;
@@ -86,8 +86,8 @@ public class FillCallLogTestActivity extends Activity {
private int mCallDateYear;
private int mCallDateMonth;
private int mCallDateDay;
- private RadioButton mSubscription0;
- private RadioButton mSubscription1;
+ private RadioButton mAccount0;
+ private RadioButton mAccount1;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -132,8 +132,8 @@ public class FillCallLogTestActivity extends Activity {
mCallDate = (TextView) findViewById(R.id.call_date);
mPhoneNumber = (TextView) findViewById(R.id.phone_number);
mOffset = (EditText) findViewById(R.id.delta_after_add);
- mSubscription0 = (RadioButton) findViewById(R.id.subscription0);
- mSubscription1 = (RadioButton) findViewById(R.id.subscription1);
+ mAccount0 = (RadioButton) findViewById(R.id.account0);
+ mAccount1 = (RadioButton) findViewById(R.id.account1);
// Use the current time as the default values for the picker
final Calendar c = Calendar.getInstance();
@@ -395,13 +395,13 @@ public class FillCallLogTestActivity extends Activity {
}
}
- private Subscription getManualSubscription() {
+ private PhoneAccount getManualAccount() {
TelephonyManager telephonyManager = new TelephonyManager(this);
- List <Subscription> subscriptions = telephonyManager.getSubscriptions();
- if (mSubscription0.isChecked()) {
- return subscriptions.get(0);
- } else if (mSubscription1.isChecked()){
- return subscriptions.get(1);
+ List <PhoneAccount> accounts = telephonyManager.getAccounts();
+ if (mAccount0.isChecked()) {
+ return accounts.get(0);
+ } else if (mAccount1.isChecked()){
+ return accounts.get(1);
} else {
return null;
}
@@ -489,7 +489,7 @@ public class FillCallLogTestActivity extends Activity {
dateTime.set(mCallDateYear, mCallDateMonth, mCallDateDay, mCallTimeHour, mCallTimeMinute);
Calls.addCall(null, this, mPhoneNumber.getText().toString(), getManualPresentation(),
- getManualCallType(), getManualSubscription(), dateTime.getTimeInMillis(),
+ getManualCallType(), getManualAccount(), dateTime.getTimeInMillis(),
RNG.nextInt(60 * 60));
// Subtract offset from the call date/time and store as new date/time