Search in sources :

Example 1 with SettingsSliceProvider

use of com.android.settings.slices.SettingsSliceProvider in project android_packages_apps_Settings by omnirom.

the class Enhanced4gLteSliceHelperTest method setUp.

@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    mContext = spy(ApplicationProvider.getApplicationContext());
    mFeatureFactory = FakeFeatureFactory.setupForTest();
    mSlicesFeatureProvider = mFeatureFactory.getSlicesFeatureProvider();
    // setup for SettingsSliceProvider tests
    mProvider = new SettingsSliceProvider();
    mProvider.attachInfo(mContext, null);
    mProvider.onCreateSliceProvider();
    // setup for SliceBroadcastReceiver test
    mReceiver = spy(new SliceBroadcastReceiver());
    mQueryImsState = spy(new MockVolteQueryImsState(mContext, SUB_ID));
    mQueryImsState.setEnabledByPlatform(true);
    mQueryImsState.setIsProvisionedOnDevice(true);
    mQueryImsState.setIsTtyOnVolteEnabled(true);
    mQueryImsState.setServiceStateReady(true);
    mQueryImsState.setIsEnabledByUser(true);
    mEnhanced4gLteSliceHelper = spy(new FakeEnhanced4gLteSliceHelper(mContext));
    // Set-up specs for SliceMetadata.
    SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
}
Also used : SettingsSliceProvider(com.android.settings.slices.SettingsSliceProvider) MockVolteQueryImsState(com.android.settings.network.ims.MockVolteQueryImsState) SliceBroadcastReceiver(com.android.settings.slices.SliceBroadcastReceiver) Before(org.junit.Before)

Example 2 with SettingsSliceProvider

use of com.android.settings.slices.SettingsSliceProvider in project android_packages_apps_Settings by omnirom.

the class WifiCallingSliceHelperTest method setUp.

@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    mContext = RuntimeEnvironment.application;
    // setup for SettingsSliceProvider tests
    mProvider = spy(new SettingsSliceProvider());
    doReturn(mContext).when(mProvider).getContext();
    mProvider.onCreateSliceProvider();
    // setup for SliceBroadcastReceiver test
    mReceiver = spy(new SliceBroadcastReceiver());
    mFeatureFactory = FakeFeatureFactory.setupForTest();
    mSlicesFeatureProvider = mFeatureFactory.getSlicesFeatureProvider();
    mQueryImsState = new MockWifiCallingQueryImsState(mContext, SUB_ID);
    mQueryImsState.setIsEnabledByUser(true);
    mQueryImsState.setIsEnabledByPlatform(true);
    mQueryImsState.setIsProvisionedOnDevice(true);
    mWfcSliceHelper = spy(new FakeWifiCallingSliceHelper(mContext));
    doReturn(mQueryImsState).when(mWfcSliceHelper).queryImsState(anyInt());
    // Set-up specs for SliceMetadata.
    SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
}
Also used : SettingsSliceProvider(com.android.settings.slices.SettingsSliceProvider) SliceBroadcastReceiver(com.android.settings.slices.SliceBroadcastReceiver) MockWifiCallingQueryImsState(com.android.settings.network.ims.MockWifiCallingQueryImsState) Before(org.junit.Before)

Aggregations

SettingsSliceProvider (com.android.settings.slices.SettingsSliceProvider)2 SliceBroadcastReceiver (com.android.settings.slices.SliceBroadcastReceiver)2 Before (org.junit.Before)2 MockVolteQueryImsState (com.android.settings.network.ims.MockVolteQueryImsState)1 MockWifiCallingQueryImsState (com.android.settings.network.ims.MockWifiCallingQueryImsState)1