Use the virtual screen resolution returned by getBaseDisplaySize
instead of the physical screen resolution returned by
getInitialDisplaySize. The memory required by apps will scale
with graphics buffer size, which are generally relative to the
virtual screen resolution.
Change-Id: I0476e4afad99eca2f4f56042a8dbef5b3c7889db
Add properties ro.config.density_override and ro.config.size_override
to provide build-time virtual screen sizes. A device with no
override set with "wm size" will use the size specified by the property.
"wm size reset" will go back to the physical size.
Change-Id: I07a585eb2e0f91365fac2b64c53de3af138a2a85
Since this is an operation that could take a few seconds to run and needs to be
completed even if Settings dies, best to do it in the user manager.
Refactored PIN challenge/setup UI with a field to verify existing pin
when changing to a new one.
Change-Id: I0b7df5b2ccb7f343aa9282a9245d3bc2b577a794
It used to be set at boot, but that was too quick to pick up carrier
specific resources. With this change even if you switch sims subequent
checks get the new values.
bug:9865616
Change-Id: I8c270c6b02fc6bdd3c3d76ceea58172df25e058d
We now keep track of all of the active start operations per
non-system process, so they can be cleaned up if the process
goes away.
Change-Id: I9d05f1e0281c47dbe1213de014f0491f1359685c
The default Alarm Manager behavior for KLP+ apps will be to aggressively
coalesce alarms, trading exact timeliness of delivery for minimizing the
number of alarm-delivery points, especially wakeup points.
There is new API in AlarmManager, setExact() and setExactRepeating(),
for use by apps that absolutely *must* get their alarms at a specific
point in time.
Bug 9532215
Change-Id: I40b4eea90220211cc958172d2629664b921ff051
Move away from storing the configs in the Intent to prevent issues with
PendingIntents and multiple configs.
The Dialog now queries ConnectivityService for the configuration to
display in the management dialog.
Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
A simple mechanism for doing this is to take advantage of the fact
that we require the device to reboot after a sim has been changed.
Thus when connectivity service is started we wait to get a connection
then call checkMobileProvisioning once. We also add a check that
the DEVICE_PROVISIONED is true, i.e. SetupWizard has been run.
Bug: 9784024
Change-Id: I5c1936744f6fc55a447ae44cd36eec3849d27e21
If a window's task stack has no sibling, restore old behavior
of allowing frame to go below the nav bar.
Bug:9884905
Change-Id: Ifc38901a6633cf431dba8740a65258d0618c0fd0
The display wake lock and other internal state could become
out of sync if we happened to execute the power manager's update
function concurrently due to the missing lock.
This bug can be trigged due to display state changes or proximity
sensor updated. Although it would be extremely rare, we have
some evidence of this happening on at least a few devices resulting
in rapid power drain with the screen off or a crash.
Bug: 9880044
Change-Id: I3c674ce429621a50cbb36c3a01883d5f388205b2
(cherry picked from commit d91e417b06388694db213257b4df6b4dd78e0d49)
The display wake lock and other internal state could become
out of sync if we happened to execute the power manager's update
function concurrently due to the missing lock.
This bug can be trigged due to display state changes or proximity
sensor updated. Although it would be extremely rare, we have
some evidence of this happening on at least a few devices resulting
in rapid power drain with the screen off or a crash.
Bug: 9880044
Change-Id: I3c674ce429621a50cbb36c3a01883d5f388205b2
Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.
Change-Id: I1d8a3b040175cb88b98f6a7e97cab06d17d5706b
Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.
Change-Id: Ie0c537608532cfb36f34d976cc6eacd21bad98cd
1. Now a user state has ins own spooler since the spooler app is
running per user. The user state registers an observer for the state
of the spooler to get information needed to orchestrate unbinding
from print serivces that have no work and eventually unbinding from
the spooler when all no service has any work.
2. Abstracted a remote print service from the perspective of the system
in a class that is transparently managing binding and unbinding to
the remote instance.
3. Abstracted the remote print spooler to transparently manage binding
and unbinding to the remote instance when there is work and when
there is no work, respectively.
4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to
enable implementing the all callbacks on a thread of choice. If
the document is really small, using the main thread makes sense.
Now if an app that does not need the UI state to layout the printed
content, it can schedule all the work for allocating resources, laying
out, writing, and releasing resources on a dedicated thread.
5. Added info class for the printed document that is now propagated
the the print services. A print service gets an instance of a
new document class that encapsulates the document info and a method
to access the document's data.
6. Added APIs for describing the type of a document to the new document
info class. This allows a print service to do smarts based on the
doc type. For now we have only photo and document types.
7. Renamed the systemReady method for system services that implement
it with different semantics to systemRunning. Such methods assume
the the service can run third-party code which is not the same as
systemReady.
8. Cleaned up the print job configuration activity.
9. Sigh... code clean up here and there. Factoring out classes to
improve readability.
Change-Id: I637ba28412793166cbf519273fdf022241159a92
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
fixScale(float) method has been extracted from the code but the original
code has been kept in place. Because of this, the animation scale is
"fixed" twice which is not necessary. This patch, simply call
fixScale(float) once and stores the result of it in the scale variable.
Change-Id: I50aeacbc2c13ebbf447506ae4309d50c0e313837
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
The activity manager now keeps a new "process state" for
each process, indicating the general execution and memory
state of the process. This closely follows the out-of-memory
adjustment and scheduling class that it currently tracks,
but roles these together (plus a little more info) into one
more semantically meaningful number.
This value is reported to each process as it changes, so they
can do things like tune the Dalvik garbage collector to match
the current process state.
I think I should also switch to this for process states. It
will give is more meaningful divisions of time for each process.
Also fix a problem in the activity stack where the previous
process was not being set correctly when moving between
activity stacks.
Change-Id: I598b1667dc46547f8fadae304e210c352cc9d41f
- Only log battery levels on level changes, not voltage or temp.
- Reduce the text in the start service log to only the suffix
of the service component, and a uid field.
Change-Id: I6d65e6700e021b3b005dccc90d64f36c1f97137f