Fix a regression caused by a previous overzealous refactoring. (Oops.)
Watch those conditionals, everyone!
Bug 9866559
Change-Id: Ia88a4ee38edef378e70bdc7151c825375a3d482d
inflateViews() and updateNotification() reference the same objects
with different names, and it was confusing. #cleanup
Bug: 6497005
Change-Id: I0d9a94d7ec156b6bfcf4b85c777f9b58311d07d0
1. Delayed accessibility events sent when a view subtree changes may be
be delivered after accessibility is disabled leading to a crash. It is
possible that accessibility was disabled while we were waiting for
the timeout before sending the event. Added a check before dispatching.
2. When refreshing a cached node the accessibility node info cache was
not using the correct bypass cache argument value and as result was
not getting the latest node but its cached value. We really want to
get the latest state to update the cache.
3. The debugging cache integrity verification logic was incorrectly
removing nodes from the cache while doing its work.
4. Removed the comments for some debug logging.
bug:9857067
Change-Id: I20ee1a6ffa65ad35457b51d3f2dc0bc5d8d784e6
These new constants are a better mapping to the kind of
information that procstats is wanting to collect about
processes. In doing this, the process states are tweaked
to have a bit more information that we care about for
procstats.
This changes the format of the data printed by procstats,
so the checkin version is bumped to 2. The structure is
the same, however the codes for process states have all
changed. The new codes are, in order of precedence:
p -- persistent system process.
t -- top activity; actually any visible activity.
f -- important foreground process (ime, wallpaper, etc).
b -- important background process
u -- performing backup operation.
w -- heavy-weight process (currently not used).
s -- background process running a service.
r -- process running a receiver.
h -- process hosting home/launcher app when not on top.
l -- process hosting the last app the user was in.
a -- cached process hosting a previous activity.
c -- cached process hosting a client activity.
e -- cached process that is empty.
In addition, we are now collecting uss along with pss
data for each process, so the pss checkin entries now
have three new values at the end of the min/avg/max uss
values of that process.
With this switch to using process state constants more
fundamentally, I realized that they could actually be
used by the core oom adj code to make it a lot cleaner.
So that change has been made, that code has changed quite
radically, and lost a lot of its secondary states and flags
that it used to use in its computation, now relying on
primarily the oom_adj and proc state values for the process.
This also cleaned up a few problems -- for example for
purposes of determing the memory level of the device, if a
long-running service dropped into the cached oom_adj level,
it would start being counted as a cached process and thus
make us think that the memory state is better than it is.
Now we do this based on the proc state, which always stays
as a service regardless of what is happening like this, giving
as a more consistent view of the memory state of the device.
Making proc state a more fundamentally part of the oom adj
computation means that the values can also be more carefully
tuned in semantic meaning so the value assigned to a process
doesn't tend to change unless the semantics of the process
has really significantly changed.
For example, a process will be assigned the service state
regardless of whether that services is executing operations
in the foreground, running normally, or has been dropped to
the lru list for pruning. The top state is used for everything
related to activities visible to the user: when actually on
top, visible but not on top, currently pausing, etc.
There is a new Context.BIND_SHOWING_UI added for when system
services bind to apps, to explicitly indicate that the app
is showing UI for the system. This gives us a better metric
to determine when it is showing UI, and thus when it needs
to do a memory trim when it is no longer in that state. Without
this, services could get in bad states of continually trimming.
Finally, more HashSet containers have been changed to ArraySet,
reducing the temporary iterators created for iterating over
them.
Change-Id: I1724113f42abe7862e8aecb6faae5a7620245e89
System server always forks from Zygote so we no longer need
the system_server executable which was probably broken anyhow.
This makes the initialization sequence slightly more intelligible.
Likewise, we don't need the GrimReaper anymore because init
will automatically take care of restarting the system when the
service manager dies.
Change-Id: I02c88d9392f7c8133d9cde9d0d978da89ed80452
Add support for routing sockets as if they were another user's.
This is for services that handle delegated network tasks like MediaServer and DownloadManager.
Change-Id: Id20efc1f5c2cce6f8838d777762f6c0a703a9437
We were allowing the system and the shell user to access use the
screen introspection APIs but the root user was not able to to so.
This change enableS the root user to also use these APIs. Note that
we usually allow the root user to access privileged functionality
similarly to the shell user of the system.
bug:8877685
Change-Id: Ie4008339e864b835bd3a2d5e06b042e4431c5270
Looks like an oversight. The other state sets are public, and we
reference this one in the public docs.
Change-Id: I1c2d8bec3cb277ebfb55ccaacefab0cb38703177
Fix links in @throws clauses, typos, redundant "returns"
and use @code for true + false in returns.
Change-Id: Ic3c4c75d6061732d997a386dc3232475c992c188
VPNs are now per user instead of global. A VPN set by user A routes only
user A's traffic and no other user can access it.
Change-Id: Ia66463637b6bd088b05768076a1db897fe95c46c