use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by LineageOS.
the class WifiDetailActionBarObserverTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mockFragment.getActivity()).thenReturn(mockActivity);
when(mockActivity.getActionBar()).thenReturn(mockActionBar);
mObserver = new WifiDetailActionBarObserver(mContext, mockFragment);
mLifecycle.addObserver(mObserver);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by LineageOS.
the class WifiTetherPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
FakeFeatureFactory.setupForTest(mFeatureFactoryContext);
mPreference = new MasterSwitchPreference(RuntimeEnvironment.application);
when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(mConnectivityManager);
when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
when(mScreen.findPreference(anyString())).thenReturn(mPreference);
when(mConnectivityManager.getTetherableWifiRegexs()).thenReturn(new String[] { "1", "2" });
mController = new WifiTetherPreferenceController(mContext, mLifecycle);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by LineageOS.
the class DevelopmentSwitchBarControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
mSwitchBar = new SwitchBar(RuntimeEnvironment.application);
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by LineageOS.
the class BuildNumberPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mFactory = FakeFeatureFactory.setupForTest(mContext);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
mController = new BuildNumberPreferenceController(mContext, mActivity, mFragment, mLifecycle);
mPreference = new Preference(RuntimeEnvironment.application);
mPreference.setKey(mController.getPreferenceKey());
}
use of com.android.settingslib.core.lifecycle.Lifecycle in project android_packages_apps_Settings by LineageOS.
the class FirmwareVersionPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mLifecycle = new Lifecycle();
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(null);
mController = new FirmwareVersionPreferenceController(mContext, mLifecycle);
when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
}
Aggregations