For the lowest music volume steps 1 and 2, restrict the gain to 50% and
75%. This will avoid the lowest volume steps being too loud for some
accessories. For music volume 0, set phone gain to 0 as some
accessories won't mute on their end.
Change-Id: I24e0fa7be8c8635b428a11c91ea153aad7cec55f
Signed-off-by: Liejun Tao <baibai@motorola.com>
If we try scheduling a pass before the system is ready, record a
pending event and dispatch once we're actually ready.
Bug: 26863668
Change-Id: I028285383c8bbe8b653aeaa7544eefe3d41277bc
(cherry picked from commit 538c11cf2175d4e30337e8776401bfede85866be)
Screen on time should be measured in elapsed realtime, not wallclock.
Cause a checkIdleStates to occur when reloading stats
(on rollover and on time change).
When time changes occur in the negative direction, the new stats file
we create can overlap the previous one with regards to its end timestamp.
Use the begin timestamp to determine which of the latest stats to merge.
(b/22716352)
Bug: 26488100
Change-Id: If31b29bbbee9e98401205b5e26bce86e181286e7
Syncs were being dropped when appIdleMode was on for
an app. This CL backs off the sync instead of dropping
it. When the app becomes non-idle, backoff is cleared
and the sync is performed.
Bug: 26355386
Change-Id: I2040dfd847011d3ca902e66a8cd52b2a429177c1
(cherry picked from commit 2c051498b2b0e2608740d906e70867b74083107d)
am: 5c9378f310 -s ours
* commit '5c9378f310acd4ab375ed8a5d703a86522ab814c':
DO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle
am: bca4317a3b -s ours
* commit 'bca4317a3bbbdfdda083283d73a26e9c078c84f2':
DO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time would cause crash
am: 7e03454985 -s ours
* commit '7e0345498528611f538d8a5f259acc3440c1a649':
DO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time
am: 1559fed4c4 -s ours
* commit '1559fed4c47a4bd219e61f7d34e50d46b8929f8a':
DO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle
am: 2bd90c6abc -s ours
* commit '2bd90c6abce3e43af6db4eaa7a34459e8341b3a0':
DO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time would cause crash
am: 9c7b543325 -s ours
* commit '9c7b543325db1a6f8913403ec3a5cbe041b25043':
DO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time
And ensure that the listeners are informed of app standby transitions
that might occur during time changes.
Fix for apps that sometimes don't have network access until reboot.
Bug: 26488100
Change-Id: Ic342c188a6cd19faee88f50b2c6a342a6968cb23
(cherry picked from commit c465e71cdc401e1565c29a895a5c6d366ba5344c)
Ignores the old, re-appropriated key "idle_duration" which is now
set to a high value in order to force disable app idle on devices
with bug b/26355386
Bug:26355386
Change-Id: Iff9de843ad6e547d29c1583687fc7f7ce7e15090
With the updated rolling window of stats for app idleness, we need to make sure
it is populated before we initialize some defaults.
Now that we look at older entries to figure out idleness, if those
entries are in the future (due to time change), set them to the current
screen on time.
Bug:26504153
Change-Id: Ia22add0e8eaf0f137002bbe3e91d747fef5b7d69
App Idle queries are very frequent and so they only check in memory stats.
However, in memory stats can be missing some entries, especially after a rollover, but also
due to a larger bug fixed in master (too risky to take now).
The fix is to do a deep query (reading older files from disk) and maintain a parallel cache
of stats for app idle. That way the rolling window of data required to serve app idle queries
stays in memory.
Bug:26355386
Change-Id: I6a29bbc25214f6a3c2f24c8c079936e66f99e42e
This fixes the crash that occurs when getAllValidScorers() is invoked by
a non-primary user when a scorer is active.
BUG: 23040221
Change-Id: I42c9e18d74389be3191258ca5626f2c433ca7cc7
(cherry picked from commit 5b294b45d0d7afbed71fd2e59342c5ad7b8b7d76)