ACTION_CHARGING is sent when the device is in a good enough charging
state for power-heavy work to be done. It was sent immediately when this
determination was done:
1. plugged in and level >= 90
2. plugged in and level is increasing
However this lead to many jobs being ungated when this happen, and
defeats the purpose of plugging in your device to get a quick boost.
In the case of 2. we defer the sending of ACTION_CHARGING by a
configurable time, defaulting to 15minutes, after said determination.
The adb command to play with this is:
adb shell settings put global battery_stats_constants battery_charged_delay_ms=90000
Bug: 111360323
Test: Set the delay to 15s, then cmd battery unplug and reset,
verify that broadcast is sent in dumpsys activity broadcasts
Change-Id: I71f8d06604041efeba12fbdfd0374aaff2f04807
Some apps - like launcher and settings' FallbackHome - generate view-level events before ever
starting an activity (probably because they're using dialogs). Hence, we were scheduling a
flush request, but never cancelling it.
Bug: 120494182
Bug: 122959591
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I4a5448f19902ae51c8f2679eb0c468757b98c3ff
DEVICE_SHUTDOWN event is used to close all open usage events that do
not have matching closing event when device is shut down. For example,
ACTIVITY_RESUMED or FOREGROUND_SERVICE_START are open events, the
DEVICE_SHUTDOWN event will close the usage session of the open events.
At orderly shutdown like selecting Power Off or Restart after pressing
power button, a DEVICE_SHUTDOWN event is sent to UsageStats.
UsageStats persists UsageStatsDatabase to disk immediately.
When power button is pressed for 3.5 seconds (configured by
config_veryLongPressTimeout in config.xml). A DEVICE_SHUTDOWN
event is sent to UsageStats. UsageStats persists UsageStatsDatabase
to disk immediately.
This is the mechanism that we do not lose UsageStats data when the
device is shut down.
When the device boots up, if the last event is not
DEVICE_SHUTDOWN, we add a DEVICE_SHUTDOWN with timestamp set to be the last
time database file is persisted. This is to handle the case device
shutdown abruptly due to power drained or cold temperature.
Bug: 111464278
Test: atest UsageStatsTest.java
Change-Id: I1e88063ba71d09042d02c6deb9f07d8581a15c30
As long as FragmentManagerImpl in AndroidX is not fixed, we need to keep
this annotation, or FragmentManagerImpl will crash.
Bug: 122893665
Test: atest AnimationTest
Change-Id: I5e21ee5f3ffb4c314ae7b5ea8f32d3880e2f2550
* changes:
[MS06] Add the relevance utils.
[MS05] Pretty print the data classes of IPMS.
[MS04] Add an executor to the memory store.
[MS03] Add the contract for the IPMS database.
The attribute is copied when parceling/unparceling so should also be
preserved in the copy constructor.
Test: tests based on this pass
Change-Id: Ia48d94fc075e6414f537dad181a236be5a32b41b
* changes:
Add Power Status query steps in Device Discovery Action.
Unmute when turning system audio mode on.
Make sure the device route to HOME when OneTouchPlay is triggered.
Add APIs to expose some cec control to other services.
Fix port id mismatch temporarily.
Add dump info of local active port and routing port.
Set routing feature enabled to default false and dump its status.
Add a thread safe copy of connected device list.
ag/5398143
We exposed Power on/Power off/Device select/Connected device list
query from HdmiControlManager.
Test: local tested
Bug: 117775357
Change-Id: Iee495e7131f44282a60e83ad827faa1431a30389
* changes:
Adding HDMI_CEC_SWITCH_ENABLE Global property to enable/disable Routing Control feature.
Fix spelling errors in HdmiCecMessage.toString
More skeleton code for <RequestShortAuidoDescriptor>
Add a getPhysicalAddress api to hdmicontrolservice.
Set System Audio Mode on when switch to Audio Only source
Call HdmiCecLocalDeviceAudioSystem to report audio status.
Add a delay state into DeviceDiscoveryAction.
The previous check was disabling it for "non-system" apps that were bundled
in the system...
Bug: 121045049
Fixes: 122915433
Test: manual verification
Test: atest CtsAutoFillServiceTestCases
Change-Id: I2352fc21de27750509715035ba2f9c2dc2371428
Also updated documentation and added the relevant test.
Bug: 122887441
Test: atest com.android.server.pm.UserManagerTest#testSwitchUserByHandle_ThrowsException
Change-Id: Ic936570ff24d4879732017c717d8c81f38356553
- Remove unused IntFlagMapping.Builder#clear()
- Rename IntFlagMapping#namesOf(int) to #get(int)
- Change signature of IntFlagMapping#get(int) to return a Set
- Add doc comment explaing desing rationale to PropertyReader
- Remove IntEnumMapping in favor of SparseArray. Note that this removes
the immutability gaurantees of IntEnumMapping.
- Miscelaneous doc fixes
Test: atest IntFlagMappingTest
Bug: 122518089
Change-Id: I94acf03431b238d84afcd74cdbdd347431381c40
This API will be used by Android Studio layout inspector to
query where a given resource attribute originated from to allow
developers to have an easier way to find what needs to be changed
to affect a given resource attribute.
Test: CTS added in the topic
Bug: 111439551
Change-Id: Ifbb52b39912ed0444030a86164290a1cd4155250