Introduce a lever we can use to enable / disable all new backup
eligibility behaviours from one place.
Bug: 174216309
Test: m -j
Change-Id: I17618a72c04f138204c5c0ca2c23330044c169e7
This CL was merged earlier (ag/13484966) and then reverted due to the
new behaviour breaking D2D transfers.
Merge it again with all changes being controlled by a flag (default
off), see UserBackupManagerService:getOperationTypeFromTransport in this
CL. View the diff between patchsets 1 and 2 to only see what's changed
between the earlier reverted code and the fixed version of it (i.e. with
the flag).
The flag can be changed via adb for now, we will set it to true by
default once other components are ready.
Bug: 174216309
Test: atest UserBackupManagerServiceTest
Change-Id: I7473c9b4f8d0c4d20155be76930279184ffb17c4
1. Parse the new config and prefer it over the old config specified by
android:fullBackupContent.
2. Add a new parameter to LocalTransportParameters to allow testing this
functionality in CTS.
Bug: 180522596
Test: atest FullBackupRulesHostSideTest
Change-Id: If18edfcdb2b9637d380251f48fdbc56cca6af3ec
Introduce the attribute apps targeting Android S+ can use to point to an
XML file that contains rules for copying app data during backup and
transfer operations. If this attribute is specified, the config pointed
to by the existing 'fullBackupContent' will be ignored.
Bug: 174216309
Test: m -j
Change-Id: I6ad57a24b40cf5b80b312c719747e8ba89aa0a93
When UHID device receives UHID_SET_REPORT event, call onDeviceSetReprot
callback function to set the report output.
Bug: 161633625
Test: atest android.hardware.input.cts.tests.SonyDualshock3UsbTest#testLights
Change-Id: I02923203ddf5a2f2090a11434db19925bbaeaf05
It is possible for old uids to be reported to BatteryStats
in updateCustomMeasuredEnergyDataLocked().
This can happen, e.g., if a uid was uninstalled between
successive custom energy updates, so that the uid did use non-zero
energy but BatteryStats doesn't care anymore since the uid is gone.
If this happens,
we don't want to recreate any removed Uid objects, so we need
to be careful to only consider Uids that aren't removed.
In practice, this method will only be called after the CPU update,
which means that BatteryStats should already know about all active
uids (assuming they used CPU). Therefore, there shouldn't be any
unknown uids actively using custom energy buckets at this point.
We therefore simply ignore any unknown uids (just log them), on
the assumption that they refer to removed uids or stopped users.
Test: atest BatteryStatsTests
Bug: 180030409
Change-Id: If4fee7a1d11b148ca16d464d6ce4720c5a251130
Using a service context has potential corner cases where it tries
to create UI using it, causing issues.
Test: presubmit
Bug: 180931292
Change-Id: I3a6d13ff69797cb5c7c2f25b810785e458d69430