use of com.android.settings.widget.SwitchBarController in project android_packages_apps_Settings by omnirom.
the class BluetoothEnablerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
mRestrictedSwitchPreference = new RestrictedSwitchPreference(mContext);
mSwitchController = spy(new SwitchBarController(new SwitchBar(mContext)));
mBluetoothEnabler = new BluetoothEnabler(mContext, mSwitchController, mMetricsFeatureProvider, 123, mRestrictionUtils);
mHolder = PreferenceViewHolder.createInstanceForTests(mock(View.class));
mRestrictedSwitchPreference.onBindViewHolder(mHolder);
mBluetoothEnabler.setToggleCallback(mCallback);
mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter());
}
use of com.android.settings.widget.SwitchBarController in project android_packages_apps_Settings by omnirom.
the class MultiUserSwitchBarControllerTest method setUp.
@Before
public void setUp() {
mContext = RuntimeEnvironment.application;
mUserManager = ShadowUserManager.getShadow();
mSwitchBarController = spy(new SwitchBarController(new SwitchBar(mContext)));
mUserManager.setSupportsMultipleUsers(true);
}
Aggregations