d06d1165eb3825cddab20e72cdcc292bf760507f |
|
21-May-2018 |
Lei Yu <jackqdyulei@google.com> |
When restrict, use uid inside AppInfo Before this CL, we use packageManager to get uid for battery restriction. However it may not be correct all the time. For example, RestrictedAppDetails will be opened as main user however inside we also show work profile apps, in this case we can't get correct uid by only using normal API in PackageManager. This CL change it to use uid from AppInfo, which is correct all the time. Bug: 79992590 Test: RunSettingsRoboTests Change-Id: Id33a5f6409d6bace0d756e5ac06432acb8b2cf65
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/RestrictAppAction.java
|
2b6e422ca1532a1b70772484b11524ee1b406fa4 |
|
10-Mar-2018 |
Lei Yu <jackqdyulei@google.com> |
Add log for battery tip action. For each action, we add log when it is triggered. RestrictAppAction could be triggered in multiple locations (main page vs battery app detail page), so we add metricsKey to distinguish them Bug: 73888115 Test: RunSettingsRoboTests Change-Id: I08f28431c4e891bf90816ce91f551edc671579cd
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/RestrictAppAction.java
|
c76bb78758f57b064b3e442f8e8e12af84eddbf2 |
|
14-Feb-2018 |
jackqdyulei <jackqdyulei@google.com> |
Make BatteryDatabaseManager singleton In BatteryTipLoader, two threads may access BatteryDatabaseManager simultaneously. In this case thread A may close the database thread B holds, then settings will crash. In this cl, we make the BatteryDatabaseManager as singleton and synchronize all the database related method. Then it shouldn't have the crash anymore. Bug: 73346734 Test: RunSettingsRoboTests Change-Id: Ib53b2894b25155cca0c6ec60d1a816663d27a578
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/RestrictAppAction.java
|
af2ece738730f605ecbbbffe78b6319faac39172 |
|
08-Feb-2018 |
jackqdyulei <jackqdyulei@google.com> |
Update detector and action for restrict app 1. In detector, read data from database and display it. 2. Update the RestrictAppAction to mark anomaly as handled if restriction is toggled. 3. Update the RestrictAppTip to handle state change. Bug: 72385333 Test: RunSettingsRoboTests Change-Id: I0bbe6f6fd049bf2e7a2bee1dee08d5199f922e31
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/RestrictAppAction.java
|
99a2de41ef8ff7eb4ea47413d5ad8c930c00d881 |
|
26-Jan-2018 |
jackqdyulei <jackqdyulei@google.com> |
Add restrict and unrestrict dialog Add a fake unrestrict tip so we could reuse the BatteryTipDialogFragment to build the unrestrict dialog. After this cl, restrict dialog has two types: 1. dialog to only restrict one app 2. dialog to restrict more than one app Will add dialog to restrict more than 5 apps when strings are finalized. Bug: 72385333 Bug: 72227981 Test: RunSettingsRoboTests Change-Id: Ib0328f0386efad525b331fd713dd15d060a1a649
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/RestrictAppAction.java
|