App anomaly tips on PowerUsage App list
Screenshots: [in bg - banner] https://screenshot.googleplex.com/MzLC6LfX93TkkYf [in bg - hints] https://screenshot.googleplex.com/9JLXNsRiVG8arAU [in fg - banner] https://screenshot.googleplex.com/9oYbwUkeeLbQX2t [in fg - hints] https://screenshot.googleplex.com/53DTTUCUnf8rsoE [apps anomaly highlight hint + settings anomaly banner] https://screenshot.googleplex.com/8NdS2VMrSzwv2DM Bug: 291689643 Bug: 291689623 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bfd0f5859b6e5ffef4727ee562009f2050de7a58) Change-Id: Ic02db49cb3794ef134759d9dcec5f5ef32454a95
This commit is contained in:
@@ -221,14 +221,20 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
boolean isHighlightSlotFocused() {
|
||||
return (mDailyHighlightSlotIndex != BatteryChartViewModel.SELECTED_INDEX_INVALID
|
||||
&& mDailyHighlightSlotIndex == mDailyChartIndex
|
||||
&& mHourlyHighlightSlotIndex != BatteryChartViewModel.SELECTED_INDEX_INVALID
|
||||
&& mHourlyHighlightSlotIndex == mHourlyChartIndex);
|
||||
}
|
||||
|
||||
void onHighlightSlotIndexUpdate(int dailyHighlightSlotIndex, int hourlyHighlightSlotIndex) {
|
||||
if (mDailyHighlightSlotIndex == dailyHighlightSlotIndex
|
||||
&& mHourlyHighlightSlotIndex == hourlyHighlightSlotIndex) {
|
||||
return;
|
||||
}
|
||||
mDailyHighlightSlotIndex = dailyHighlightSlotIndex;
|
||||
mHourlyHighlightSlotIndex = hourlyHighlightSlotIndex;
|
||||
refreshUi();
|
||||
if (mOnSelectedIndexUpdatedListener != null) {
|
||||
mOnSelectedIndexUpdatedListener.onSelectedIndexUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
void selectHighlightSlotIndex() {
|
||||
@@ -405,7 +411,7 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
||||
final String slotInformation = getSlotInformation();
|
||||
return slotInformation == null
|
||||
? mPrefContext.getString(
|
||||
R.string.battery_usage_breakdown_title_since_last_full_charge)
|
||||
R.string.battery_usage_breakdown_title_since_last_full_charge)
|
||||
: mPrefContext.getString(
|
||||
R.string.battery_usage_breakdown_title_for_slot, slotInformation);
|
||||
}
|
||||
|
Reference in New Issue
Block a user