Home
last modified time | relevance | path

Searched refs:mBatteryTipPreferenceController (Results 1 – 3 of 3) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipPreferenceControllerTest.java75 private BatteryTipPreferenceController mBatteryTipPreferenceController; field in BatteryTipPreferenceControllerTest
95 mBatteryTipPreferenceController = buildBatteryTipPreferenceController(); in setUp()
96 mBatteryTipPreferenceController.mCardPreference = mCardPreference; in setUp()
97 mBatteryTipPreferenceController.mPrefContext = mContext; in setUp()
102 mBatteryTipPreferenceController.displayPreference(mPreferenceScreen); in testDisplayPreference_isInvisible()
109 mBatteryTipPreferenceController.updateBatteryTips(mOldBatteryTips); in testUpdateBatteryTips_tipsStateNew_isVisible()
116 mBatteryTipPreferenceController.updateBatteryTips(mNewBatteryTips); in testUpdateBatteryTips_tipsStateInvisible_isInvisible()
123 mBatteryTipPreferenceController.updateBatteryTips(mOldBatteryTips); in testUpdateBatteryTips_logBatteryTip()
132 assertThat(mBatteryTipPreferenceController.getCurrentBatteryTip()).isNull(); in testGetCurrentBatteryTip_noTips_isNull()
137 mBatteryTipPreferenceController.updateBatteryTips(mNewBatteryTips); in testGetCurrentBatteryTip_tipsInvisible_isNull()
[all …]
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DPowerUsageSummary.java79 BatteryTipPreferenceController mBatteryTipPreferenceController; field in PowerUsageSummary
108 mBatteryTipPreferenceController.getCurrentBatteryTip(), batteryInfo);
129 mBatteryTipPreferenceController.updateBatteryTips(data);
131 mBatteryTipPreferenceController.getCurrentBatteryTip(), mBatteryInfo);
150 mBatteryTipPreferenceController = use(BatteryTipPreferenceController.class); in onAttach()
151 mBatteryTipPreferenceController.setActivity(activity); in onAttach()
152 mBatteryTipPreferenceController.setFragment(this); in onAttach()
153 mBatteryTipPreferenceController.setBatteryTipListener(this::onBatteryTipHandled); in onAttach()
172 mBatteryTipPreferenceController.restoreInstanceState(icicle); in onCreate()
281 mNeedUpdateBatteryTip = icicle == null || mBatteryTipPreferenceController.needUpdate(); in updateBatteryTipFlag()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DPowerUsageSummaryTest.java174 mFragment.mBatteryTipPreferenceController = mock(BatteryTipPreferenceController.class); in refreshUi_deviceRotate_doNotUpdateBatteryTip()
175 when(mFragment.mBatteryTipPreferenceController.needUpdate()).thenReturn(false); in refreshUi_deviceRotate_doNotUpdateBatteryTip()
185 mFragment.mBatteryTipPreferenceController = mock(BatteryTipPreferenceController.class); in refreshUi_batteryLevelChanged_doNotUpdateBatteryTip()
186 when(mFragment.mBatteryTipPreferenceController.needUpdate()).thenReturn(true); in refreshUi_batteryLevelChanged_doNotUpdateBatteryTip()
196 mFragment.mBatteryTipPreferenceController = mock(BatteryTipPreferenceController.class); in refreshUi_tipNeedUpdate_updateBatteryTip()
197 when(mFragment.mBatteryTipPreferenceController.needUpdate()).thenReturn(true); in refreshUi_tipNeedUpdate_updateBatteryTip()