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

Commit 00447e8c authored by Kihong Seong's avatar Kihong Seong Committed by Automerger Merge Worker
Browse files

Merge "Disable MapClientContentTest when telephony feature is unavailable" am: 4dce45cf

parents 6e3efdc4 4dce45cf
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothMapClient;
import android.content.ContentValues;
import android.content.Context;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
@@ -55,6 +56,7 @@ import com.android.vcard.VCardProperty;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -120,6 +122,10 @@ public class MapClientContentTest {
        MockitoAnnotations.initMocks(this);
        mTargetContext = InstrumentationRegistry.getTargetContext();

        // Do not run test if there is no telephony feature (no support for sms)
        PackageManager packageManager = mTargetContext.getPackageManager();
        Assume.assumeTrue(packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY));

        mMockSmsContentProvider = Mockito.spy(new FakeContentProvider(mTargetContext));

        mMockMmsContentProvider = Mockito.spy(new FakeContentProvider(mTargetContext));
@@ -142,7 +148,6 @@ public class MapClientContentTest {
        when(mMockSubscriptionManager.getActiveSubscriptionInfoList())
                .thenReturn(Arrays.asList(mMockSubscription));
        createTestMessages();

    }

    @After