Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a836b2cc authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Gerrit Code Review
Browse files

Merge "Skip PbapServiceTest if feature is not supported" into main

parents 785876e4 6f58417c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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