Restricted App list can be update in RestrictedAppDetails page and
go back to SmartBatterySettings page without update the App list.
We need to update the list in updateState() again.
Fixes: 140585454
Test: manual, robolectric
Change-Id: I48a197351ffb9b07490f1de7ba1f7417102458a2
Move hide preference logic to getAvailabilityStatus, it can remove
the preference before onresume.
Fixes: 140366463
Test: manual, robolectric
Change-Id: Ie11b5357b1e9340b30b8f19eac60c479cdb7687e
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
1. Dismiss this tip once user clicks it and goes to detail page.
2. In auto restriction, since apps are automatically restricted,
we need to remove apps in list that unrestricted by user.
3. Refactor the code to remove the unnecessary parameter(i.e.
SettingsActivity)
Bug: 78187414
Test: RunSettingsRoboTests
Change-Id: I1c950f7c55df35795641c2ea8579ce9e011dba28
Filter out the restricted apps that not belong to the correct user, in
this way secondary user cannot see what apps been restricted by primary
user.
Bug: 74076658
Test: RunSettingsRoboTests
Change-Id: I8471f07be747c177f8611cdc1973a8420dc41296
Show different summary based on whether it is on and there is restricted
apps.
Also move method to get restricted app list to BatteryTipUtils since it
is used in 2 places.
Bug: 73018395
Test: RunSettingsRoboTests
Change-Id: Ib2306e0fd1f520fde6d1403ce9c527c241d36005
Before this cl, we use getPackagesForOps() to populate restrict app
list. However in that API not all the apps are currently restricted,
so in this cl we filter out all the allowed apps.
Bug: 73085780
Test: RunSettingsRoboTest
Change-Id: Ia7c1eb95b07a1a0d203b394eb64dcd98d25bd561
The uid is needed to distinguish the same app used
by different users(even work profile user). So
we need to store the correct uid in AppInfo and
use it across the settings app.
Bug: 74022362
Test: RunSettingsRoboTests
Change-Id: Iaa0ea1ac1fbd3a3a1251e0cd1096d6a8c75c4ed8
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
1. Move force standby action to BatteryUtils
2. Add click action for restricted preference(go to detail page)
3. Build app list in detail page using packageOps list
Bug: 71502850
Test: RunSettingsRoboTests
Change-Id: I1e6733e5402e7a854b07a8bbb43a86255276bfaa