Improve battery tips cards.
Test: manual Change-Id: I356648d0fcec5dd1ea724297187ecafb5be55fd8 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:13fec0dbdb2c809f20a1e3b711e2491745f6d506) Bug: 291689623
This commit is contained in:
@@ -105,10 +105,9 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
||||
public interface OnBatteryTipsUpdatedListener {
|
||||
/**
|
||||
* The callback function for the battery tips card is updated.
|
||||
* @param title the title of the battery tip card
|
||||
* @param summary the summary of the battery tip card
|
||||
* @param powerAnomalyEvent the power anomaly event with highest score
|
||||
*/
|
||||
void onBatteryTipsUpdated(String title, String summary);
|
||||
void onBatteryTipsUpdated(PowerAnomalyEvent powerAnomalyEvent);
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +364,8 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
||||
slotUsageData, getSlotInformation(), isBatteryUsageMapNullOrEmpty());
|
||||
|
||||
if (mOnBatteryTipsUpdatedListener != null) {
|
||||
mOnBatteryTipsUpdatedListener.onBatteryTipsUpdated(null, null);
|
||||
// TODO: replace with a selected powerAnomalyEvent with highest score
|
||||
mOnBatteryTipsUpdatedListener.onBatteryTipsUpdated(null);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user