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

Commit d91824db authored by Omer Ozer's avatar Omer Ozer
Browse files

Disable nfc foreground tests when the role flag is disabled.

Bug: 315194263
Test: SettingsRoboTests:com.android.settings.nfc.NfcForegroundPreferenceControllerTest
Change-Id: I21037ac3323d4a0322c10450be0dfbb8c9d0d3a0
parent ca456508
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@ import static org.mockito.Mockito.when;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.pm.PackageManager;
import android.platform.test.annotations.RequiresFlagsDisabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;

import androidx.preference.ListPreference;
import androidx.preference.PreferenceScreen;
@@ -33,6 +36,7 @@ import com.android.settings.R;
import com.android.settings.testutils.FakeFeatureFactory;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -43,10 +47,14 @@ import org.robolectric.RuntimeEnvironment;
import java.util.ArrayList;

@RunWith(RobolectricTestRunner.class)
@RequiresFlagsDisabled(android.permission.flags.Flags.FLAG_WALLET_ROLE_ENABLED)
public class NfcForegroundPreferenceControllerTest {

    private static final String PREF_KEY = PaymentSettingsTest.FOREGROUND_KEY;

    @Rule
    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();

    @Mock
    private PaymentBackend mPaymentBackend;
    @Mock