| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
app idle
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
first time would cause crash
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think what probably happened is that since we only report an app
going in to the "interaction" state as an interaction event to usage
stats, apps that sit around in that state forever will only see one
interaction at the start and never again. So usage stats could start
thinking they are idle.
Fix this by having the activity manager report an interaction event
for such long running applications at least once a day.
Also, because it is correct and for paranoia by protected us another
way, system uids should never go in to standby.
Change-Id: I8a3805bfca86cbe78560488a649ecd07427da99a
|
|
|
|
|
|
|
|
|
|
| |
There were a few subtle bugs in app idle parole scheduling that
would cause us to never end a parole period we had entered. The
updated logic in this change concentrates the registration for the
next event in one place in setAppIdleParoled().
Bug: 24050462
Change-Id: I1efe43cd6e00a547f70c4a4a37e1f3ef52a7e706
|
|
|
|
| |
Change-Id: I34d4fcdc103b3a6ea5c4ed78895f2fe18597237a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have a new whitelist you can put apps in, which
opts them out of the old battery saver mode and new app idle,
but doesn't keep them from going in to doze. This is for a few
special cases that we had previously whitelisted for battery saver,
and inherited to the new modes... ultimately we should figure out
how to get these apps out of the whitelist completely, but this
will help for now.
Apps in this new whitelist are not shown in the UI, because they
are still significantly restricted by not being able to operate
normally in doze. This also means they are still visible in the
list of all apps for the user to be able to put them on/off the
complete whitelist if that is what they really want.
In the course of doing this, I needed to clean up code in the
network policy manager to better separate management of the
two firewall rules that now have different whitelists applied
to them. This also hopefully just generally simplifies and cleans
up that code. Hopefully!
Change-Id: I92e15f2f85899571dd8b049b5e3eb1354f55f353
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 22667334
Change-Id: I97085e653c146eff148458440bbac0a2ac64d6d2
|
| |
| |
| |
| |
| |
| |
| |
| | |
With lots of usage stats files, the log gets spammy
when the time changes and we are moving files around.
Bug:22549399
Change-Id: I9da39399b090066d52568dea6fc5b59aba063c5a
|
|/
|
|
|
|
|
|
| |
Not sure how useful this is, since renames should be atomic. If the filesystem
is corrupt I'm sure other parts of the system will break. Good to be safe though!
Bug:22172659
Change-Id: Iad339be2869d170bcf736c59feb93830a51905e1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.
There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states... we now do that.
Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager. This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.
Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.
Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when app idle parole state changes, all idle apps' states
are updated one by one including firewall modifications which are
very expensive. This optimization gets rid of individual firewall
rule changes and makes sure we only modify the firewall once at child
chain level.
BUG: 21446713
Change-Id: Iafc415fe0bc127826fe17894d4fedcf1755cb17d
|
|
|
|
|
|
|
|
| |
Doze and app standby are now off in the default platform config.
The Google overlay turns them on. Other people can do that as
well, if they are feeling like it.
Change-Id: Ic8a87f696df94f2d8354fe0772d03b672f464e32
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set sync adapters to active if the associated content providers are used
at foreground process state.
Minimize how frequently published content providers are reported by
keeping track of last reported time.
Also cache sync adapters associated with an authority in SyncManager.
Bug: 21785111
Change-Id: Ic2c8cb6a27f005d1a1d0aad21d36b1510160753a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.
Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.
Issue #21814212: Need to allow configuration of alarm manager parameters
The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.
Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
|
|
|
|
|
|
| |
Add the API. Clean up a few related things.
Change-Id: I190adad1812f36f6095b98a1001fedb94874e8b5
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Initialize the beginIdleTime to 0 rather than current time.
Bug: 21699099
Change-Id: Ib94a9198c4e80aea5d9de68c5cf5d6f8cfc79e0a
|
|/
|
|
|
|
|
| |
Use settings instead of hardcoded constants, and listen for their changes.
Bug:21640379
Change-Id: Id8305bb234f93f7c64c1a5e82e26b31504624324
|
|
|
|
|
|
|
|
| |
Also reduce idle checks to the target user if possible.
Optimized calls to some internal methods
Bug: 21639147
Change-Id: If1faf26f862e5c4ca905f2603a4ba52a8d1af954
|
|
|
|
|
|
|
|
|
|
|
| |
SYSTEM_INTERACTION events are signals to the system for a package's
implicit actions (service bound, etc).
These should not affect the API visible stats like lastTimeUsed, etc.
USER_INTERACTION is for user initiated actions (notification interaction, etc).
Bug:21761781
Change-Id: I4585cf35fbb158612a3c737710108bec34e89183
|
|
|
|
|
|
|
| |
Also introduce a way to check if a package has
carrier privileges for any active phone.
Change-Id: If5c5fe07f05ffc90fc21431eb27cf48030c0175b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API to allow an app to be whitelisted for network and wakelock
access for a short period. So even if the device is in idle
mode, such apps can be given a chance to download the payload
related to a high priority cloud-to-device message.
This API is meant for system apps only.
A new permission CHANGE_DEVICE_IDLE_TEMP_WHITELIST is required
to make this call.
Bug: 21525864
Change-Id: Id7a761a664f21af5d7ff55aa56e8df98d15511ca
|
|
|
|
|
|
|
|
| |
12 hours of screen-on time and 2 days of wallclock time
must elapse before considering an app idle.
Bug: 20066058
Change-Id: Ie7b584b40e644d868aa2708876723c3391fd432e
|
|
|
|
| |
Change-Id: I57efb4b5fa69c9a268025fb1ef83de36c4cc83ca
|
|
|
|
|
|
|
|
|
| |
"dumpsys usagestats history" will show the
active state of each app for the last 100 hours,
if the device hasn't rebooted.
Bug: 20066058
Change-Id: I703e5bc121298e4363c202da56fffb0b8534bcaf
|
|
|
|
|
|
|
|
| |
Triggers are device idle mode changing as well as
internal delayed message handlers.
Bug: 20066058
Change-Id: I0627cfbcc16cfc2b8ac7d298fd2c681a5a6571dd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use screen on time as timebase for idling out apps
that have been inactive.
Store the time when an app was last active as an additional
package state in UsageStats. Compare it to screenOnTime to decide
if it's inactive.
Exclude device idle whitelist from apps that can go inactive.
Bug: 20066058
Change-Id: I709f9f31a9affa7ca6e1ae3e4c5729c5fb221669
|
|
|
|
|
|
|
| |
Change to setAppInactive and isAppInactive in a few places.
Bug: 20823737
Change-Id: Ie57dbc0dd2842e771bb5fd9f69b8041aacaa005c
|
|
|
|
|
|
|
|
| |
Track package names of bound app widgets and use the list when
querying for idle apps.
Bug: 20066058
Change-Id: If8039397a061ef04bb13aa38d57cd7f0221f5fc7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Track apps going in and out of idle in the NetworkPolicyManagerService.
Apply DROP rules in firewall controller if app is to be blacklisted
for network access.
Firewall can now be in whitelist (old) or blacklist mode. When in
blacklist, it allows all by default and we can selectively DENY
some uids.
Track app idle in UsageStats and update periodically.
Track charging/discharging states.
TODO: Check for appidle temporary parole state
Bug: 20066058
Change-Id: Ia65d7544204b3bcb78a517310ef4adcc05aac6fb
|
|
|
|
|
|
|
|
|
| |
Notification listeners can now report that a notification
has been seen by the user and that package is then marked
as active.
Bug: 20066058
Change-Id: I336040a52c44c21fd0d78b02ec9a19d448c64b40
|
|
|
|
|
|
|
|
|
| |
Add am shell command to set and get idle
Add public API to check if an app is idle
Bug: 20534955
Bug: 20493806
Change-Id: Ib48b3fe847c71f05ef3905563f6e903cf060c498
|
|
|
|
|
|
|
|
| |
Apps that haven't been in use for a while and are considered idle
are not synced until the device is charging or the app is used.
Bug: 20066058
Change-Id: I3471e3a11edae04777163b0dbd74e86495743caa
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a fresh boot or update to M, mark existing apps
as being used if there is no existing entry in the
usage stats. On subsequent OTAs, make sure that at
least the new system apps are marked as used.
Reduce idle threshold to 1 day.
Bug: 20066058
Change-Id: I9a273c051d04432877bacd381c85bf6e721c1a85
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First pass at delaying jobs from apps that are idle.
TODO: Throttle syncs
TODO: Provide a periodic point at which apps are checked for idleness.
Apps that switch to foreground process state are tracked by UsageStats
as an INTERACTION event that affects the last-used timestamp.
JobScheduler's logic for when an app is ready is trumped by the idleness
of the app, and only if the battery is not charging. When charging state
changes, we update the idle state of all the tracked jobs.
android package is whitelisted.
Bug: 20066058
Change-Id: I0a0acb517b100a5c7b11e3f435f4141375f3451f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This would cause an exception to be thrown when querying stats
that included a deleted file and cause only in-memory stats to be
returned.
This change now re-indexes after deleting files.
Furthermore, we continue reading UsageStats files in order
to return more useful data if some other issue (file corruption)
leads us to fail reading a file.
Change-Id: I4a52739624d68e719e3d7d324a0b16709a62ac7a
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This will allow for updating a package's last time used
property for packages that are interacted in ways other than
launching their activities (interacting with notifications, etc.)
Change-Id: Ic6f9519f46fa04abd37ea6fc9475bcd9ea721003
|
|/
|
|
|
| |
Bug: 19529542
Change-Id: Iacb1a245a40c6b88ae15740797217f59d5fca1e6
|
|
|
|
|
|
|
|
|
| |
We seem to have renamed a file as checked-in twice, which means
we checked it in twice and created a malformed name with the suffix
"-c-c" instead of the correct suffix "-c".
Bug:18280677
Change-Id: Ie3164010898a333e5d9b97151d285ea376de799e
|
|
|
|
|
|
|
|
|
| |
UsageStatsService
- Forgot to increment loop variable :S
Bug:18239732
Change-Id: Ie37a83584d7849108dbfd3bd4cbb595520d488b1
|
|\
| |
| |
| | |
support" into lmp-mr1-dev
|
| |
| |
| |
| |
| | |
Bug:17814138
Change-Id: If414ae5f4b8e4a2838f63f52d80e764915cee934
|
|/
|
|
|
| |
Bug: 17191977
Change-Id: I33e18459e49afa42b8e8218574a2434e5205a6da
|