use of com.android.settings.widget.CardPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BatteryTipPreferenceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mCardPreference = spy(new CardPreference(mContext));
when(mPreferenceScreen.getContext()).thenReturn(mContext);
doReturn(mCardPreference).when(mPreferenceScreen).findPreference(KEY_PREF);
mFeatureFactory = FakeFeatureFactory.setupForTest();
mOldBatteryTips = new ArrayList<>();
mOldBatteryTips.add(new SummaryTip(BatteryTip.StateType.NEW, AVERAGE_TIME_MS));
mNewBatteryTips = new ArrayList<>();
mNewBatteryTips.add(new SummaryTip(BatteryTip.StateType.INVISIBLE, AVERAGE_TIME_MS));
mBatteryTipPreferenceController = buildBatteryTipPreferenceController();
mBatteryTipPreferenceController.mCardPreference = mCardPreference;
mBatteryTipPreferenceController.mPrefContext = mContext;
}
Aggregations