Searched refs:batteryTip (Results 1 – 9 of 9) sorted by relevance
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryTipPreferenceController.java | 103 final BatteryTip batteryTip = mBatteryTips.get(i); in updateBatteryTips() local 104 batteryTip.validateCheck(mContext); in updateBatteryTips() 105 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in updateBatteryTips() 107 batteryTip.updatePreference(mCardPreference); in updateBatteryTips() 108 mBatteryTipMap.put(mCardPreference.getKey(), batteryTip); in updateBatteryTips() local 109 batteryTip.log(mContext, mMetricsFeatureProvider); in updateBatteryTips() 110 mNeedUpdate = batteryTip.needUpdate(); in updateBatteryTips() 118 final BatteryTip batteryTip = mBatteryTipMap.get(preference.getKey()); in handlePreferenceTreeClick() local 119 if (batteryTip != null) { in handlePreferenceTreeClick() 120 if (batteryTip.shouldShowDialog()) { in handlePreferenceTreeClick() [all …]
|
D | BatteryTipUtils.java | 90 BatteryTip batteryTip, in getActionForBatteryTip() argument 93 switch (batteryTip.getType()) { in getActionForBatteryTip() 100 if (batteryTip.getState() == BatteryTip.StateType.HANDLED) { in getActionForBatteryTip() 101 return new OpenRestrictAppFragmentAction(fragment, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 103 return new RestrictAppAction(settingsActivity, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 106 return new UnrestrictAppAction(settingsActivity, (UnrestrictAppTip) batteryTip); in getActionForBatteryTip()
|
D | BatteryTipDialogFragment.java | 59 public static BatteryTipDialogFragment newInstance(BatteryTip batteryTip, int metricsKey) { in newInstance() argument 63 args.putParcelable(ARG_BATTERY_TIP, batteryTip); in newInstance()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | IncompatibleChargerDetectorTest.java | 61 BatteryTip batteryTip = mIncompatibleChargerDetector.detect(); in detect_withoutIncompatibleCharger_shouldNotShowTip() local 63 assertThat(batteryTip.isVisible()).isFalse(); in detect_withoutIncompatibleCharger_shouldNotShowTip() 64 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in detect_withoutIncompatibleCharger_shouldNotShowTip() 71 BatteryTip batteryTip = mIncompatibleChargerDetector.detect(); in detect_withIncompatibleCharger_showTip() local 73 assertThat(batteryTip.isVisible()).isTrue(); in detect_withIncompatibleCharger_showTip() 74 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in detect_withIncompatibleCharger_showTip()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | RestrictedAppDetails.java | 192 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument 194 final boolean isRestricted = batteryTip instanceof RestrictAppTip; in onBatteryTipHandled() 196 appInfo = ((RestrictAppTip) batteryTip).getRestrictAppList().get(0); in onBatteryTipHandled() 198 appInfo = ((UnrestrictAppTip) batteryTip).getUnrestrictAppInfo(); in onBatteryTipHandled() 211 final BatteryTip batteryTip = in createDialogFragment() local 216 return BatteryTipDialogFragment.newInstance(batteryTip, getMetricsCategory()); in createDialogFragment()
|
D | BatteryHeaderPreferenceController.java | 164 public void updateHeaderByBatteryTips(BatteryTip batteryTip, BatteryInfo batteryInfo) { in updateHeaderByBatteryTips() argument 165 mBatteryTip = batteryTip; in updateHeaderByBatteryTips()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/tips/ |
D | RestrictAppTipTest.java | 205 final BatteryTip batteryTip = new RestrictAppTip(BatteryTip.StateType.NEW, appInfos); in sanityCheck_appUninstalled_stateInvisible() local 207 batteryTip.validateCheck(mContext); in sanityCheck_appUninstalled_stateInvisible() 209 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in sanityCheck_appUninstalled_stateInvisible() 217 final BatteryTip batteryTip = new RestrictAppTip(BatteryTip.StateType.NEW, appInfos); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible() local 219 batteryTip.validateCheck(mContext); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible() 221 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible()
|
D | BatteryTipTest.java | 74 final BatteryTip batteryTip = new TestBatteryTip(); in parcelable() local 77 batteryTip.writeToParcel(parcel, batteryTip.describeContents()); in parcelable()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/ |
D | PowerUsageSummary.java | 267 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument
|