diff options
Diffstat (limited to 'tests/src/com')
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java | 1 | ||||
-rw-r--r-- | tests/src/com/android/dialer/calllog/PhoneCallDetailsHelperTest.java | 1 | ||||
-rw-r--r-- | tests/src/com/android/dialer/calllog/calllogcache/TestTelecomCallLogCache.java (renamed from tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java) | 4 | ||||
-rw-r--r-- | tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java | 14 |
4 files changed, 9 insertions, 11 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index a97fce3f7..28caed469 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -26,6 +26,7 @@ import android.view.View; import com.android.contacts.common.CallUtil; import com.android.dialer.PhoneCallDetails; import com.android.dialer.R; +import com.android.dialer.calllog.calllogcache.TestTelecomCallLogCache; import com.android.dialer.util.AppCompatConstants; /** diff --git a/tests/src/com/android/dialer/calllog/PhoneCallDetailsHelperTest.java b/tests/src/com/android/dialer/calllog/PhoneCallDetailsHelperTest.java index 23ee7b311..b6202b904 100644 --- a/tests/src/com/android/dialer/calllog/PhoneCallDetailsHelperTest.java +++ b/tests/src/com/android/dialer/calllog/PhoneCallDetailsHelperTest.java @@ -28,6 +28,7 @@ import android.widget.TextView; import com.android.dialer.PhoneCallDetails; import com.android.dialer.R; +import com.android.dialer.calllog.calllogcache.TestTelecomCallLogCache; import com.android.dialer.util.AppCompatConstants; import com.android.dialer.util.LocaleTestUtils; diff --git a/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java b/tests/src/com/android/dialer/calllog/calllogcache/TestTelecomCallLogCache.java index fcf988412..077a498c9 100644 --- a/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java +++ b/tests/src/com/android/dialer/calllog/calllogcache/TestTelecomCallLogCache.java @@ -14,14 +14,12 @@ * limitations under the License */ -package com.android.dialer.calllog; +package com.android.dialer.calllog.calllogcache; import android.content.Context; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; -import com.android.dialer.calllog.calllogcache.CallLogCache; - /** * Modified version of {@link com.android.dialer.calllog.calllogcache.CallLogCache} to be used in * tests that allows injecting the voicemail number. diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java index ae0dba822..da41dfce4 100644 --- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java +++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java @@ -39,7 +39,6 @@ import android.provider.VoicemailContract.Status; import android.provider.VoicemailContract.Voicemails; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; -import android.telecom.TelecomManager; import android.text.Editable; import android.text.TextWatcher; import android.text.format.DateFormat; @@ -56,8 +55,10 @@ import android.widget.TextView; import android.widget.TimePicker; import android.widget.Toast; +import com.android.contacts.common.compat.telecom.TelecomManagerCompat; import com.android.dialer.tests.R; import com.android.dialer.util.AppCompatConstants; +import com.android.dialer.util.TelecomUtil; import java.util.Calendar; import java.util.List; @@ -439,9 +440,8 @@ public class FillCallLogTestActivity extends Activity { } private PhoneAccountHandle getManualAccount() { - TelecomManager telecomManager = - (TelecomManager) getSystemService(Context.TELECOM_SERVICE); - List <PhoneAccountHandle> accountHandles = telecomManager.getCallCapablePhoneAccounts(); + List <PhoneAccountHandle> accountHandles = TelecomUtil.getCallCapablePhoneAccounts(this); + //TODO: hide the corresponding radio buttons if no accounts are available. if (mAccount0.isChecked()) { return accountHandles.get(0); } else if (mAccount1.isChecked()){ @@ -567,11 +567,9 @@ public class FillCallLogTestActivity extends Activity { final ContentResolver resolver = getContentResolver(); int numberPresentation = Calls.PRESENTATION_ALLOWED; - TelecomManager tm = (TelecomManager) getSystemService(Context.TELECOM_SERVICE); - String accountAddress = null; - if (tm != null && accountHandle != null) { - PhoneAccount account = tm.getPhoneAccount(accountHandle); + if (accountHandle != null) { + PhoneAccount account = TelecomUtil.getPhoneAccount(this, accountHandle); if (account != null) { Uri address = account.getSubscriptionAddress(); if (address != null) { |