Loading android/app/tests/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java +6 −1 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ import android.content.Intent; import android.support.test.filters.MediumTest; import android.test.AndroidTestCase; import com.android.bluetooth.R; import com.android.bluetooth.btservice.AdapterService; @MediumTest public class HeadsetClientServiceTest extends AndroidTestCase { // Time to wait for the service to be initialized private static final int SERVICE_START_TIMEOUT_MS = 5000; // 5 sec private static final int STATE_MACHINE_TRANSITION_TIMEOUT_MS = 5000; // 5 sec private HeadsetClientService mService = null; private BluetoothAdapter mAdapter = null; Loading Loading @@ -41,6 +41,11 @@ public class HeadsetClientServiceTest extends AndroidTestCase { @Override protected void setUp() throws Exception { // On phone side, HeadsetClientService may not be included in the APK and thus the test // should be skipped if (!getContext().getResources().getBoolean(R.bool.profile_supported_hfpclient)) { return; } startServices(); } Loading android/app/tests/src/com/android/bluetooth/pbapclient/PbapParserTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public class PbapParserTest extends AndroidTestCase { } catch (Exception e) { fail("Setup Failure Unable to get resources" + e.toString()); } cleanupCallLog(); } // testNoTimestamp should parse 1 poorly formed vcard and not crash. Loading Loading @@ -114,6 +115,10 @@ public class PbapParserTest extends AndroidTestCase { assertTrue(verifyCallLog("", "1483232580000", "3")); } void cleanupCallLog() { mContext.getContentResolver().delete(Calls.CONTENT_URI, null, null); } // Find Entries in call log with type matching number and date. // If number or date is null it will match any number or date respectively. boolean verifyCallLog(String number, String date, String type) { Loading Loading
android/app/tests/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java +6 −1 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ import android.content.Intent; import android.support.test.filters.MediumTest; import android.test.AndroidTestCase; import com.android.bluetooth.R; import com.android.bluetooth.btservice.AdapterService; @MediumTest public class HeadsetClientServiceTest extends AndroidTestCase { // Time to wait for the service to be initialized private static final int SERVICE_START_TIMEOUT_MS = 5000; // 5 sec private static final int STATE_MACHINE_TRANSITION_TIMEOUT_MS = 5000; // 5 sec private HeadsetClientService mService = null; private BluetoothAdapter mAdapter = null; Loading Loading @@ -41,6 +41,11 @@ public class HeadsetClientServiceTest extends AndroidTestCase { @Override protected void setUp() throws Exception { // On phone side, HeadsetClientService may not be included in the APK and thus the test // should be skipped if (!getContext().getResources().getBoolean(R.bool.profile_supported_hfpclient)) { return; } startServices(); } Loading
android/app/tests/src/com/android/bluetooth/pbapclient/PbapParserTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public class PbapParserTest extends AndroidTestCase { } catch (Exception e) { fail("Setup Failure Unable to get resources" + e.toString()); } cleanupCallLog(); } // testNoTimestamp should parse 1 poorly formed vcard and not crash. Loading Loading @@ -114,6 +115,10 @@ public class PbapParserTest extends AndroidTestCase { assertTrue(verifyCallLog("", "1483232580000", "3")); } void cleanupCallLog() { mContext.getContentResolver().delete(Calls.CONTENT_URI, null, null); } // Find Entries in call log with type matching number and date. // If number or date is null it will match any number or date respectively. boolean verifyCallLog(String number, String date, String type) { Loading