use of com.android.settingslib.widget.FooterPreference in project platform_packages_apps_Settings by BlissRoms.
the class BluetoothDetailsMacAddressControllerTest method macAddress.
@Test
public void macAddress() {
showScreen(mController);
FooterPreference footer = (FooterPreference) mScreen.findPreference(mController.getPreferenceKey());
assertThat(footer.getTitle().toString()).endsWith(mDeviceConfig.getAddress());
}
use of com.android.settingslib.widget.FooterPreference in project android_packages_apps_Settings by omnirom.
the class BluetoothPairingDetailTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mFragment = spy(new BluetoothPairingDetail());
doReturn(mContext).when(mFragment).getContext();
doReturn(mResource).when(mFragment).getResources();
mAvailableDevicesCategory = spy(new BluetoothProgressCategory(mContext));
mFooterPreference = new FooterPreference(mContext);
mFragment.mLocalAdapter = mLocalAdapter;
mFragment.mLocalManager = mLocalManager;
mFragment.mDeviceListGroup = mPreferenceGroup;
mFragment.mAlwaysDiscoverable = new AlwaysDiscoverable(mContext, mLocalAdapter);
}
use of com.android.settingslib.widget.FooterPreference in project android_packages_apps_Settings by omnirom.
the class BluetoothSettingsTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
FakeFeatureFactory.setupForTest(mContext);
mFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext);
mFragment = spy(new BluetoothSettings());
doReturn(mContext).when(mFragment).getContext();
doReturn(mResource).when(mFragment).getResources();
doReturn(mActivity).when(mFragment).getActivity();
mContainer = new View(mContext);
mEmptyMessage = new TextView(mContext);
doReturn(mContainer).when(mActivity).findViewById(android.R.id.list_container);
doReturn(mEmptyMessage).when(mActivity).findViewById(android.R.id.empty);
mFooterPreference = new FooterPreference(RuntimeEnvironment.application);
mFragment.setLocalBluetoothAdapter(mLocalAdapter);
mFragment.mPairingPrefController = mPairingPreferenceController;
}
use of com.android.settingslib.widget.FooterPreference in project android_packages_apps_Settings by omnirom.
the class BluetoothDetailsMacAddressControllerTest method macAddress.
@Test
public void macAddress() {
showScreen(mController);
FooterPreference footer = (FooterPreference) mScreen.findPreference(mController.getPreferenceKey());
assertThat(footer.getTitle().toString()).endsWith(mDeviceConfig.getAddress());
}
use of com.android.settingslib.widget.FooterPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BluetoothPairingDetailTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mFragment = spy(new BluetoothPairingDetail());
doReturn(mContext).when(mFragment).getContext();
doReturn(mResource).when(mFragment).getResources();
mAvailableDevicesCategory = spy(new BluetoothProgressCategory(mContext));
mFooterPreference = new FooterPreference(mContext);
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter());
mBluetoothDevice = mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS);
mFragment.mBluetoothAdapter = mBluetoothAdapter;
mFragment.mLocalManager = mLocalManager;
mFragment.mDeviceListGroup = mPreferenceGroup;
mFragment.mAlwaysDiscoverable = new AlwaysDiscoverable(mContext);
}
Aggregations