summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-11-25 18:55:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-25 18:55:04 +0000
commit757ecedc09bf053875a3208832e13b38ea194fb9 (patch)
tree23870ea7248a2122624d680922e4c114de5d5da1 /tests
parentb3c6951e15865ac5a9007d281e12f380a16967e8 (diff)
parent62280c72fd651b00dd5499f4c3b32f30be57ce0d (diff)
downloadandroid_packages_apps_Dialer-757ecedc09bf053875a3208832e13b38ea194fb9.tar.gz
android_packages_apps_Dialer-757ecedc09bf053875a3208832e13b38ea194fb9.tar.bz2
android_packages_apps_Dialer-757ecedc09bf053875a3208832e13b38ea194fb9.zip
Merge "Remove use of hidden TelephonyManager methods"
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/dialer/calllog/CallLogFragmentTest.java5
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 4ccdaaf33..d0a87259c 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;
@@ -121,7 +122,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.