Commit Graph

6 Commits

Author SHA1 Message Date
jackqdyulei
0e06b4e2a1 Add logging for battery tip
When it is triggered, we log the type of battery tip.

Bug: 3662211
Test: RunSettingsRoboTests
Change-Id: Iab1034008796b6b21eee53297b2e574199693f7e
2018-02-26 18:06:16 -08:00
jackqdyulei
1b472be833 Add action to open the anomaly detail page
This action is used to go to the anomaly detail page.
This cl also refactored the RestrictedAppDetails to take AppInfo
as the input, not AppOpsManager.PackageOps.

Bug: 72385333
Test: RunSettingsRoboTests

Change-Id: I5b4481091635e1250629ea21c2b650db929c18ed
2018-02-21 17:58:36 -08:00
jackqdyulei
2e0bdc34f2 Only show one tip at a time
1. Update the order for each tip.
2. Change BatteryTipPreferenceController and only show one precedent
tip.
3. Update the SummaryDetector since now it doesn't need visibleTips

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: I9e2b8e72aad263f8a210c9320e0ea1eaaf8d5042
2018-01-16 14:13:13 -08:00
jackqdyulei
e682126a11 Add smart battery tip.
Also move the action method from BatteryTip to TipAction. Since it
need extra data that we don't want to store it in parcel.

Bug: 71502850
Test: RunSettingsRoboTests
Change-Id: Ib658426725158d26fcdd437fa8bf6bf24e9a8c14
2018-01-12 10:32:12 -08:00
jackqdyulei
fde637ff60 Add BatteryTipDialogFragment.
This DialogFragment handles all the tip related dialogs. This cl makes:
1. All the tips parcelable.
2. Add dialog for HighUsageTip. It also need adapter to populate app
list in dialog.
3. Add and update tests

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: Ie4c986172cfc73d8746abc7457d966c8600c6145
2018-01-09 17:33:19 -08:00
jackqdyulei
fde63fc351 Add infra for battery tip
This cl adds the basic structure for battery tip:
1. BaseBatteryTip: Model class to represent the tip and build
preference and dialog
2. SummaryTip: Display a general battery summary(i.e. your battery
is good..)
3. BatteryTipLoader: AsyncLoader to load the battery tips.
4. BatteryTipPreferenceController: preference controller for
preference group to display battery tips

This cl also:
1. Remove the anomaly code in PowerUsageSummary and we will add it
to app restriction in future.
2. Add preference_category_no_title.xml to avoid the extra 32dp
blank at the top.

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: If91a553888e2eb91d55fb1d0d7bbea69652f144c
2017-12-19 13:27:33 -08:00