Loading android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.bluetooth.pbap; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import static org.junit.Assume.assumeNotNull; import static org.junit.Assume.assumeTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; Loading @@ -31,6 +33,7 @@ import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Message; import android.os.UserManager; import android.os.test.TestLooper; Loading Loading @@ -97,6 +100,10 @@ public class BluetoothPbapServiceTest { mService = new BluetoothPbapService(mAdapterService, mNotificationManager); mService.start(); mService.setAvailable(true); PackageManager pm = mTargetContext.getPackageManager(); assumeNotNull(pm); assumeTrue(pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)); } @After Loading Loading
android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.bluetooth.pbap; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import static org.junit.Assume.assumeNotNull; import static org.junit.Assume.assumeTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; Loading @@ -31,6 +33,7 @@ import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Message; import android.os.UserManager; import android.os.test.TestLooper; Loading Loading @@ -97,6 +100,10 @@ public class BluetoothPbapServiceTest { mService = new BluetoothPbapService(mAdapterService, mNotificationManager); mService.start(); mService.setAvailable(true); PackageManager pm = mTargetContext.getPackageManager(); assumeNotNull(pm); assumeTrue(pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)); } @After Loading