Arc Wang f81d22ef28 Fix battery optimization display problems
Root cause:
RequestIgnoreBatteryOptimizations adds package in
PowerWhitelistManager#addToWhitelist for intent
Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.

Settings UI uses PowerAllowlistBackend to check if
an APP is in power allow list. Each UI component should
PowerAllowlistBackend#refreshList() or UI will get
a stale result.

Solution:
This change fixes below display problems by refreshing
allow list from DeviceIdleController service.

1. Battery optimization summary in Battery usage details.
2. Battery optimization list.

BYPASS_INCLUSIVE_LANGUAGE_REASON=I need the object name
to describe the root cause.

Bug: 171064162
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BatteryOptimizationPreferenceControllerTest
      manual
      Switch battery optimazion of a APP and observer the UI display.
Change-Id: I75b269eec5d1b904dcaa71948798f169d4e4ddfa
2020-11-24 16:28:04 +08:00
2019-04-04 12:49:15 -07:00
2019-11-25 20:28:35 +09:00
2020-09-30 16:09:05 +08:00
2020-09-24 10:18:08 +00:00
2019-02-06 15:44:40 +00:00
2020-02-03 01:03:46 +00:00
Description
No description provided
3.1 GiB
Languages
Java 89.8%
Kotlin 10.2%