Search in sources :

Example 1 with HardwareInfoPreferenceController

use of com.android.settings.deviceinfo.HardwareInfoPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class HardwareInfoPreferenceControllerTest method setUp.

@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    mContext = RuntimeEnvironment.application;
    mController = new HardwareInfoPreferenceController(mContext, KEY);
    mPreference = new Preference(mContext);
    mPreference.setKey(KEY);
    final PreferenceManager preferenceManager = new PreferenceManager(mContext);
    mPreferenceScreen = preferenceManager.createPreferenceScreen(mContext);
    mPreferenceScreen.addPreference(mPreference);
}
Also used : HardwareInfoPreferenceController(com.android.settings.deviceinfo.HardwareInfoPreferenceController) Preference(androidx.preference.Preference) PreferenceManager(androidx.preference.PreferenceManager) Before(org.junit.Before)

Example 2 with HardwareInfoPreferenceController

use of com.android.settings.deviceinfo.HardwareInfoPreferenceController in project android_packages_apps_Settings by omnirom.

the class HardwareInfoPreferenceControllerTest method setUp.

@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    mContext = RuntimeEnvironment.application;
    mController = new HardwareInfoPreferenceController(mContext, KEY);
    mPreference = new Preference(mContext);
    mPreference.setKey(KEY);
    final PreferenceManager preferenceManager = new PreferenceManager(mContext);
    mPreferenceScreen = preferenceManager.createPreferenceScreen(mContext);
    mPreferenceScreen.addPreference(mPreference);
}
Also used : HardwareInfoPreferenceController(com.android.settings.deviceinfo.HardwareInfoPreferenceController) Preference(androidx.preference.Preference) PreferenceManager(androidx.preference.PreferenceManager) Before(org.junit.Before)

Aggregations

Preference (androidx.preference.Preference)2 PreferenceManager (androidx.preference.PreferenceManager)2 HardwareInfoPreferenceController (com.android.settings.deviceinfo.HardwareInfoPreferenceController)2 Before (org.junit.Before)2