/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryTipPreferenceController.java | 114 final BatteryTip batteryTip = mBatteryTips.get(i); in updateBatteryTips() local 115 batteryTip.sanityCheck(mContext); in updateBatteryTips() 116 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in updateBatteryTips() 117 batteryTip.updatePreference(mCardPreference); in updateBatteryTips() 118 mBatteryTipMap.put(mCardPreference.getKey(), batteryTip); in updateBatteryTips() local 119 batteryTip.log(mContext, mMetricsFeatureProvider); in updateBatteryTips() 120 mNeedUpdate = batteryTip.needUpdate(); in updateBatteryTips() 128 final BatteryTip batteryTip = mBatteryTipMap.get(preference.getKey()); in handlePreferenceTreeClick() local 129 if (batteryTip != null) { in handlePreferenceTreeClick() 130 if (batteryTip.shouldShowDialog()) { in handlePreferenceTreeClick() [all …]
|
D | BatteryTipUtils.java | 94 public static BatteryTipAction getActionForBatteryTip(BatteryTip batteryTip, in getActionForBatteryTip() argument 96 switch (batteryTip.getType()) { in getActionForBatteryTip() 101 if (batteryTip.getState() == BatteryTip.StateType.HANDLED) { in getActionForBatteryTip() 107 if (batteryTip.getState() == BatteryTip.StateType.HANDLED) { in getActionForBatteryTip() 108 return new OpenRestrictAppFragmentAction(fragment, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 110 return new RestrictAppAction(settingsActivity, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 113 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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/ |
D | BatteryTipPreferenceController.java | 114 final BatteryTip batteryTip = mBatteryTips.get(i); in updateBatteryTips() local 115 batteryTip.sanityCheck(mContext); in updateBatteryTips() 116 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in updateBatteryTips() 117 batteryTip.updatePreference(mCardPreference); in updateBatteryTips() 118 mBatteryTipMap.put(mCardPreference.getKey(), batteryTip); in updateBatteryTips() local 119 batteryTip.log(mContext, mMetricsFeatureProvider); in updateBatteryTips() 120 mNeedUpdate = batteryTip.needUpdate(); in updateBatteryTips() 128 final BatteryTip batteryTip = mBatteryTipMap.get(preference.getKey()); in handlePreferenceTreeClick() local 129 if (batteryTip != null) { in handlePreferenceTreeClick() 130 if (batteryTip.shouldShowDialog()) { in handlePreferenceTreeClick() [all …]
|
D | BatteryTipUtils.java | 94 public static BatteryTipAction getActionForBatteryTip(BatteryTip batteryTip, in getActionForBatteryTip() argument 96 switch (batteryTip.getType()) { in getActionForBatteryTip() 101 if (batteryTip.getState() == BatteryTip.StateType.HANDLED) { in getActionForBatteryTip() 107 if (batteryTip.getState() == BatteryTip.StateType.HANDLED) { in getActionForBatteryTip() 108 return new OpenRestrictAppFragmentAction(fragment, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 110 return new RestrictAppAction(settingsActivity, (RestrictAppTip) batteryTip); in getActionForBatteryTip() 113 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/src/com/android/settings/homepage/contextualcards/slices/ |
D | BatteryFixSlice.java | 111 for (BatteryTip batteryTip : batteryTips) { in getSlice() 112 if (batteryTip.getState() == BatteryTip.StateType.INVISIBLE) { in getSlice() 115 final Drawable drawable = mContext.getDrawable(batteryTip.getIconId()); in getSlice() 116 final int iconTintColorId = batteryTip.getIconTintColorId(); in getSlice() 127 batteryTip.getTitle(mContext)); in getSlice() 130 .setTitle(batteryTip.getTitle(mContext)) in getSlice() 131 .setSubtitle(batteryTip.getSummary(mContext)) in getSlice() 209 for (BatteryTip batteryTip : batteryTips) { in refreshBatteryTips() 210 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in refreshBatteryTips() 213 .putInt(KEY_CURRENT_TIPS_TYPE, batteryTip.getType()) in refreshBatteryTips() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/slices/ |
D | BatteryFixSlice.java | 106 for (BatteryTip batteryTip : batteryTips) { in getSlice() 107 if (batteryTip.getState() == BatteryTip.StateType.INVISIBLE) { in getSlice() 111 batteryTip.getIconId()); in getSlice() 115 batteryTip.getTitle(mContext)); in getSlice() 118 .setTitle(batteryTip.getTitle(mContext)) in getSlice() 119 .setSubtitle(batteryTip.getSummary(mContext)) in getSlice() 197 for (BatteryTip batteryTip : batteryTips) { in refreshBatteryTips() 198 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in refreshBatteryTips() 201 .putInt(KEY_CURRENT_TIPS_TYPE, batteryTip.getType()) in refreshBatteryTips() 202 .putInt(KEY_CURRENT_TIPS_STATE, batteryTip.getState()) in refreshBatteryTips()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | RestrictedAppDetails.java | 188 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument 190 final boolean isRestricted = batteryTip instanceof RestrictAppTip; in onBatteryTipHandled() 192 appInfo = ((RestrictAppTip) batteryTip).getRestrictAppList().get(0); in onBatteryTipHandled() 194 appInfo = ((UnrestrictAppTip) batteryTip).getUnrestrictAppInfo(); in onBatteryTipHandled() 206 final BatteryTip batteryTip = toRestrict in createDialogFragment() local 211 batteryTip, getMetricsCategory()); in createDialogFragment()
|
D | AdvancedPowerUsageDetail.java | 310 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument
|
D | PowerUsageSummary.java | 414 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | RestrictedAppDetails.java | 188 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument 190 final boolean isRestricted = batteryTip instanceof RestrictAppTip; in onBatteryTipHandled() 192 appInfo = ((RestrictAppTip) batteryTip).getRestrictAppList().get(0); in onBatteryTipHandled() 194 appInfo = ((UnrestrictAppTip) batteryTip).getUnrestrictAppInfo(); in onBatteryTipHandled() 206 final BatteryTip batteryTip = toRestrict in createDialogFragment() local 211 batteryTip, getMetricsCategory()); in createDialogFragment()
|
D | AdvancedPowerUsageDetail.java | 310 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument
|
D | PowerUsageSummary.java | 385 public void onBatteryTipHandled(BatteryTip batteryTip) { in onBatteryTipHandled() argument
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/tips/ |
D | RestrictAppTipTest.java | 199 final BatteryTip batteryTip = new RestrictAppTip(BatteryTip.StateType.NEW, appInfos); in sanityCheck_appUninstalled_stateInvisible() local 201 batteryTip.sanityCheck(mContext); in sanityCheck_appUninstalled_stateInvisible() 203 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in sanityCheck_appUninstalled_stateInvisible() 211 final BatteryTip batteryTip = new RestrictAppTip(BatteryTip.StateType.NEW, appInfos); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible() local 213 batteryTip.sanityCheck(mContext); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible() 215 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in sanityCheck_twoRestrictedAppsWhileUninstallOne_stateVisible()
|
D | BatteryTipTest.java | 69 final BatteryTip batteryTip = new TestBatteryTip(); in parcelable() local 72 batteryTip.writeToParcel(parcel, batteryTip.describeContents()); in parcelable()
|