- Log the optimize mode only when leave this page and mode changed
- Update mOptimizationMode at onResume to make sure the state is sync
with framework
Bug: 195306545
Test: make SettingsRoboTests
Change-Id: Iab116220cd7d2b1bdb1c170c4b47016c763bf4fe
- Present empty string when this app consumed power but no usage time,
usually they are some system components
Bug: 197749108
Test: make -j64 RunSettingsRoboTest
Change-Id: I1e88babb30c871748fa1f5fc23c7b4d834e384fd
- Reverts commit e7cca4cd81
- Add try-catch to handle unexpected operate
Reason for revert: Previous fix will cause a side effect which makes app stuck at Optimize mode after switching state from Unrestricted to Optimize, add a try catch to handle previous issue first
BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy naming, not edit by this code change
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I3b1850ab66bbf4cd605f14152a244a8ed7edd578
Merged-In: I3b1850ab66bbf4cd605f14152a244a8ed7edd578
This reverts commit 3f7839cad0.
Reason for revert: This fix will cause a side effect which makes app switch state from Unrestricted to Optimize then it will lock at Optimize mode only, will prepare other cl to fix the previous issue
Change-Id: Ic5232eb0099fa1591f15e72747eca4d08b9af9b9
- Check PowerSaveWhitelistExceptIdle list before update each apps
optimizaton mode to avoid duplicate remove action
- Make those apps which under PowerSaveWhitelistExceptIdle list keep at
optimized mode only
BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy naming, not edit by this code change
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I3cd10cf51b5132fc12a83e9554801ec4e8578cd1
Merged-In: I3cd10cf51b5132fc12a83e9554801ec4e8578cd1
- Check PowerSaveWhitelistExceptIdle list before update each apps
optimizaton mode to avoid duplicate remove action
- Make those apps which under PowerSaveWhitelistExceptIdle list keep at
optimized mode only
BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy naming, not edit by this code change
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I3cd10cf51b5132fc12a83e9554801ec4e8578cd1
Invoke BackupManager.dataChanged() when app optimization mode is changed
to notify BackupManager to execute Settings agent to backup data in the
next backup session, when performing the partial backup event.
Bug: 192523697
Bug: 197608038
Bug: 194633034
Test: make SettingsRoboTests
Change-Id: I456acc2594d22503763e4ce286435148ae0644a4
This change is to reduce ambiguity as we're adding the option to style the preference like a checkbox as well.
Bug: 190180868
Test: SelectorWithWidgetPreferenceTest, RunSettingsLibRoboTests
Change-Id: Ie414347bf67ed394ef495604890c5851fc42dbc7
- Add new battery entry to app info battery preference, support both
legacy and new args, controlled by P/H
- Add a method to check is work profile app or not, use owner context to
query correct context for feature provider
- Add string for new args
Bug: 178197718
Test: make RunSettingsRoboTests
Change-Id: Ic93142a0c5e2851917cb3e224340a6e3e81fd801
- Update active time string with "last full charge" when new graph disabled
Bug: 187666107
Test: make SettingsRoboTests
Change-Id: Ie790600dcbe8b845ad63edd46b4a95a317c623a3
- Add a flag to divide legacy and new design
- Add new layout for tristate design
Bug: 178197718
Test: make SettingsRoboTests
Change-Id: I61f694cad8ac9cea8195191feacbe80bac2df62e
- Make the text of active time support different states like foreground or background usage time less than one minutes
Bug: 178197718
Test: make SettingsRoboTests
Change-Id: I20be88e5b23a679c15f97bac4b9d400557685463
- Improve the UX from 2 different preference column to 3 radio button,
make the restriction state more easy to control and recognize
Screenshot: https://screenshot.googleplex.com/4nCBnF5FzwePqrL.png
Bug: 178197718
Test: make SettingsRoboTests
Change-Id: Ic354ac91e5496c0e44c5b44142627ac8a090e30f
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
- Remove LayoutPreference in Settings source code.
- Remove unused style, layout
- Replace old imports to com.android.settingslib.widget.LayoutPreference
- Replace old XML tag to com.android.settingslib.widget.LayoutPreference
Test: robotest, manual test
Bug: 120005054
Change-Id: I9ae1ae14a16f443e11ac5d75b6038c7c5e253844
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
1. Remove unused class and resources
2. Update function in AdvancedPowerUsageDetail since
we don't need pass in anomaly anymore
Change-Id: I96fbe5ddaae902b34b756c7aae0338e49afef1f3
Bug: 74529048
Test: 1. manual test in settings page. 2. robo test still pass
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.
Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
Because now we use different time format across the settings app.
We need to update all the tests.
Bug: 76113036
Test: RunSettingsRoboTests
Change-Id: Id4f7d55775adfdeb1aa0ae234f35d515ced4f450
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
In battery tips, we need synchronized method to get batteryInfo.
This cl move the logic to BatteryUtils, then in battery tips we
could use this method directly.
Bug: 70570352
Test: robotest still pass
Change-Id: Id69349a25395ae472a9b3152c6f04127ee32c4e1
Two issues:
1. UID of settings app == system UID. But isSystemUid failed to recognize
Settings in secondary user is also a system uid.
2. For USER drain type, we should launch the detail page in current
user.
Fix: 64506728
Test: make ROBOTEST_FILTER=AdvancedPowerUsageDetailTest -j40 RunSettingsRoboTests
Test: Switch to seconday user. Go to Settings->Battery, tap owner user
battery entry, observe that detail page is shown.
Test: Stay long enough in Settings app, make sure no
either Settings nor Android Framework battery entry.
Change-Id: I8d66ad55f18fcb3d9567b3bf753f737f5b98c609
Advacned battery page doesn't show background toggle because it
doesn't get uid from battery stats. This cl make it get uid by
package name even though without battery stats.
Bug: 64049162
Test: RunSettingsRoboTests
Change-Id: Ie0f67ce9d080c02763a8382740e0640a66ce6053
The BatteryEntry need a background thread to update the
package name and icon. However in InstalledAppDetails we
don't have this thread and it is unnecessary because we
already has the package name.
This cl:
1. Use the mPackageName from InstalledAppDetails directly in
BatteryEntry
2. Double check the defaultPackageName in AdvancedPowerUsageDetail,
use packageName from sipper if default is null
This cl is cherry picked from oc-dr to fix the test breakage.
Bug: 64127162
Test: RunSettingsRoboTests
Change-Id: I5d21afca17f177817976758c28ed86b3a10e95eb
Add foreground service time to foreground usage time of apps. This will
account for app usage that user is aware of but is not being displayed
on screen, such as playing music while screen is locked.
Change-Id: Ica9fe0819e46b50299eb2eab7f0483ea01441fb0
Fixes: 38313557
Test: RunSettingsRoboTests
This cl make it could have multiple actions for each anomaly type.
This includes:
1. Add field "targetSdkVersion", "bgRestrictionEnabled" in Anomaly
2. Add new action which includes "force stop" and "background check"
3. Add "sdkVersion" and "bgRestrictionEnabled" method in BatteryUtils
4. Update BackgroundCheckAction to check sdkVersion first
5. Update serveral tests and add new test
Bug: 63037765
Test: RunSettingsRoboTests
Change-Id: Iea7a131ee57d501f7737ae4a3ba672d948d05cd8
For now it uses MIN(STATE_TOP_TIME, FOREGROUND_ACTIVITY_TIME) and this
method is used in both display and screen smearing.
Bug: 63080621
Test: RunSettingsRoboTests
Change-Id: I2ca3109697aa66fae67d8b2f4f10c4d08bb99d59