From 1d1bd0da0b32a5b8cb1c7c5585acccb180b19849 Mon Sep 17 00:00:00 2001 From: Ihab Awad Date: Mon, 30 Jun 2014 21:24:01 -0700 Subject: Rename Telecomm "Subscription" to "Account" (3/7) Change-Id: I866e9d4f629a2b23acb3d3d3f2baeb0a674522f7 --- .../tests/calllog/FillCallLogTestActivity.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/src') 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 subscriptions = telephonyManager.getSubscriptions(); - if (mSubscription0.isChecked()) { - return subscriptions.get(0); - } else if (mSubscription1.isChecked()){ - return subscriptions.get(1); + List 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 -- cgit v1.2.3