diff options
author | Yorke Lee <yorkelee@google.com> | 2013-11-22 18:24:59 -0800 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-11-22 18:24:59 -0800 |
commit | 62280c72fd651b00dd5499f4c3b32f30be57ce0d (patch) | |
tree | f9770e5a35eb5c49ea4a4f4fbcb4b5f841973251 /tests | |
parent | 5c432033aed8c083f225b79c49c570d2b24618c1 (diff) |
Remove use of hidden TelephonyManager methods
Bug: 6948882
Change-Id: Ibce04c24e64fdb33fba532c0f0e5dca3b11f1b6c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogFragmentTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java index 7ceec8f08..515040493 100644 --- a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java @@ -20,6 +20,7 @@ import android.app.FragmentManager; import android.app.FragmentTransaction; import android.content.ComponentName; import android.content.ContentUris; +import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.database.MatrixCursor; @@ -119,7 +120,9 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme // Wait for the fragment to be loaded. getInstrumentation().waitForIdleSync(); - mVoicemail = TelephonyManager.getDefault().getVoiceMailNumber(); + final TelephonyManager telephonyManager = + (TelephonyManager) mActivity.getSystemService(Context.TELEPHONY_SERVICE); + mVoicemail = telephonyManager.getVoiceMailNumber(); mAdapter = mFragment.getAdapter(); // Do not process requests for details during tests. This would start a background thread, // which makes the tests flaky. |