History log of /frameworks/base/core/java/android/os/Process.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ac16712d8aa945d7ceabcac28ebc169b8d2514e7 18-Aug-2016 Narayan Kamath <narayan@google.com> Process: Fix communication with zygote.
am: 448be0a622

Change-Id: I5d496613f53c339c75a3293845670d9d8360c90f
448be0a62209c977593d81617853a8a428d013df 09-Aug-2016 Narayan Kamath <narayan@google.com> Process: Fix communication with zygote.

Don't write partial requests, and don't return (or throw) early after
partially reading a response.

bug: 30143607
Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1
/frameworks/base/core/java/android/os/Process.java
1b15d13243d7e7f672713f21f0c46d88c3c067a2 20-Jul-2016 Srinath Sridharan <srinathsr@google.com> Adding a new getThreadScheduler() method.

bug: 30226969
Change-Id: Icbd57e99740ebf6ba744a103e6fa69a3160c9422
/frameworks/base/core/java/android/os/Process.java
9bc12a83b6768c15807c009441d486f82135d383 16-Jul-2016 Tim Murray <timmurray@google.com> Make sure StrictMode allows disk reads when calling isThreadInProcess.

If an application thread disables disk reads on the main thread,
isThreadInProcess will trigger a strict mode violation. This is bad if
the RenderThread is created after disk reads have been disallowed.

bug 30170339

Change-Id: I6918605d11f0c586c156f3168051376c3209b3f1
/frameworks/base/core/java/android/os/Process.java
4074ad01e898605c64a80a8cb14c10bdbedf1bdb 09-Jul-2016 Tim Murray <timmurray@google.com> Sets android.ui to be in the fg stune group.

setThreadGroup(TOP_APP) will place a thread in the fg stune group but
not the top_app cpuset. This allows android.ui to get more runtime to
render transitions between activities without impacting its CPU
placement.

bug 29512132

Change-Id: I95e031975f83290f88ac6e538abf1062aea27ed4
/frameworks/base/core/java/android/os/Process.java
33eb07f5759b85a5617f8057d8a335019c7d24dd 10-Jun-2016 Tim Murray <timmurray@google.com> Add new mode for SCHED_FIFO on UI and RenderThreads.

Add a new mode, controlled by sys.use_fifo_ui property, that enables the
top app's UI and RenderThread to be SCHED_FIFO. This eliminates almost
all jank due to scheduling competition with non-UI critical
threads. This mode may not be suitable for all devices.

bug 24503801

Change-Id: I7b8a31830ad80f7efa00236928d5476998ed4e00
/frameworks/base/core/java/android/os/Process.java
b89970e0fb11b71592e10570d387eac3bbb6f6d6 01-Jul-2016 Tim Murray <timmurray@google.com> Add isThreadInProcess.

Use this to make sure that the VR thread belongs to a given process when
it is assigned.

bug 28715706

Change-Id: I4e5b0d8493e69e443eb907f0a6f2a9482fb64bac
/frameworks/base/core/java/android/os/Process.java
e535a5827b7b7c7c70f4701d74051c9bb5eb0b98 28-Jun-2016 Srinath Sridharan <srinathsr@google.com> Add a new API to improve VR thread scheduling.

Adds a new API that enables device-specific scheduler optimizations for
latency-sensitive VR threads.

BUG: 29163534
Change-Id: I58d7be0eb266eca452c804cd07004784fb7daf2b
/frameworks/base/core/java/android/os/Process.java
4de5a3ac6655f76b67af38712ae5aeb6d7c15938 21-Jun-2016 Dianne Hackborn <hackbod@google.com> Reduce race when connecting to an existing content provider.

We lost the code that checks to see if the target process still
exists and aborts trying to use it if so. To reduce the race
there, we have a new explicit check of the state of the process.

Hopefully fixes some of issue #28737082.

Change-Id: I37a7a6e9767516d564168ef5e110c4adafe3fb76
/frameworks/base/core/java/android/os/Process.java
2612bbc0f5ae5422ba3e8e685ae375b2b8626fda 09-Mar-2016 Martijn Coenen <maco@google.com> Merge "API to query which cores are exclusively assigned." into nyc-dev
cd4bdf3eb91c1cc2757d32a86fc90745d0dff990 03-Mar-2016 Martijn Coenen <maco@google.com> API to query which cores are exclusively assigned.

On devices with cpuset support, the foreground app
may have a core exclusively assigned to it. Add an
API that allows apps to query which core that is,
so it can use that to set scheduling affinity.

Bug: 27381794
Change-Id: Iea148776da6d7abb745ccf9e6ad5ad46491e340a
/frameworks/base/core/java/android/os/Process.java
d98885c128e7045da244098d82751da6e792d677 02-Mar-2016 Dianne Hackborn <hackbod@google.com> Add APIs to find out the time when a process was created.

Change-Id: Id0d12c377f278fec6e31a98eab0c865a23c006ec
/frameworks/base/core/java/android/os/Process.java
48aa86bd0b30815f4c02561f713bd33b032ef2b7 10-Feb-2016 Jeff Davidson <jpd@google.com> Expose APIs to analyze UIDs in UserHandle/Process.

Clients of the NetworkStatsManager public APIs may get UIDs belonging
to other users, and UIDs which don't actually represent applications.
These APIs allow clients to understand whether a given ID belongs to
the same user as themselves, and whether an ID represents an
application or something else (e.g. a system UID).

Change-Id: Ia56d5891521ce98e5594c41da8f9d756819deb66
/frameworks/base/core/java/android/os/Process.java
25222f55f28221d49a984db465f94e9716635ad8 06-Feb-2016 Tamas Berghammer <tberghammer@google.com> Merge "Add flag to "am start" to enable native debugging"
086e09ff605f7ca26c6562f4c00b1fe0c647909f 02-Feb-2016 Tim Murray <timmurray@google.com> Merge "Add specific category for TOP_APP in ActivityManager."
df6cb282937e5f804686ebbc952ae9f2290d93c7 29-Jan-2016 Tamas Berghammer <tberghammer@google.com> Add flag to "am start" to enable native debugging

Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.

The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disbale some optimizations

Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
/frameworks/base/core/java/android/os/Process.java
b8b4e85879e93db2ba7821b7fe54710cb6a6de71 29-Jan-2016 Chien-Yu Chen <cychen@google.com> Correct cameraserver UID

Bug: 24511454
Change-Id: I967c50c781d03754a093bae6a64b2e35a023f046
/frameworks/base/core/java/android/os/Process.java
ece6a22f00de4ab815588e2f7951203adcd2b9c4 14-Jan-2016 Tim Murray <timmurray@google.com> Add specific category for TOP_APP in ActivityManager.

Differentiate the top app from other foreground apps in
ActivityManager. This lets us place the top app in its own cpuset, where
it can have its own exclusive core.

Change-Id: I90f5c39272724db37f0da226785b03d08e2e04c4
/frameworks/base/core/java/android/os/Process.java
75cade0a5fd5ec432870de9977f81091ab389423 11-Jan-2016 Chien-Yu Chen <cychen@google.com> Add cameraserver process

Add UID and permissions for cameraserver process.

Bug: 24511454
Change-Id: Iccbda4b42e5584a1f56f9afe5e15a16f40dd2922
/frameworks/base/core/java/android/os/Process.java
ed0ea40a41aae8e65bc189efe6b631ca78259383 30-Oct-2015 Andy Hung <hunga@google.com> Add Android permissions for audioserver

audioserver has the same permissions as mediaserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: Id7abddd79a730ad95b554a94207df3aa4b676f2a
/frameworks/base/core/java/android/os/Process.java
9abbf45c8dcdb2e5b13b615e5138ad996fe8afa3 05-Nov-2015 Nicolas Geoffray <ngeoffray@google.com> Remove DEBUG_JIT from Zygote flags.

The flag is being obsolete by the move to JIT.

Change-Id: Ifb9fab7c561c7f5137aa78c34dd55c552a9505f5
/frameworks/base/core/java/android/os/Process.java
02cb6e773b323a0d54b21f43460a23f668b7727c 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I0346a3368de53f4bb4b6e054349f19adac959d7f
/frameworks/base/core/java/android/os/Process.java
9249a9097707bb57ae0a7d114eff54bc82ad462d 26-Sep-2015 Bart Sears <bsears@google.com> Revert "Added --restricted option for create-user command"

This reverts commit 737b216b5c28f7d7162f219136d4e8a9eb1a486b.

Change-Id: I4c43967933bb2e46cdb8ad6e643d7037d722cab2
/frameworks/base/core/java/android/os/Process.java
737b216b5c28f7d7162f219136d4e8a9eb1a486b 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I5f0d48bcbd3c0b51927926b874fd057c15ac5219
/frameworks/base/core/java/android/os/Process.java
9527b223a9d4a4d149bb005afc77148dbeeff785 25-Jun-2015 Jeff Sharkey <jsharkey@android.com> Let's reinvent storage, yet again!

Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app. This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that. This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions. When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I62fb25d126dd815aea699b33d580e3afb90f8fd2
/frameworks/base/core/java/android/os/Process.java
065075e1f993a68579ed7f8034ab09d96ec957a9 28-May-2015 David Srbecky <dsrbecky@google.com> Replace --include-cfi with --generate-debug-info.

This follows a change in dex2oat.

(cherry picked from commit f39477b592e6e17fe41ace2e18602a69b2dd1619)

Bug: 21924613
Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
/frameworks/base/core/java/android/os/Process.java
ee0cdce2a80f8cc033378134e37092bc467c0f38 09-Jun-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Add is64Bit method to Process

Add a public method to Process to query whether the current runtime
is running in 64-bit mode.

Bug: 21069469
Change-Id: Ifaf4251f05bbe5eba135fa977190e475632856bd
/frameworks/base/core/java/android/os/Process.java
27c39f1adeaf1a653fb41a5af64ee815b8048dd6 27-Apr-2015 Andreas Gampe <agampe@google.com> am b6d14a00: resolved conflicts for merge of c29791d5 to mnc-dev-plus-aosp

* commit 'b6d14a009e43a4d61ae2a4f98f6e3b914148d0a9':
Frameworks/base: Add debug.gencfi property

(cherry picked from commit a5b55a017a984608eacdf414bc1cbcd7615f1c13)
/frameworks/base/core/java/android/os/Process.java
4887789e44cdb16b042a35e8ec03983213e88ac6 18-Mar-2015 Jeff Sharkey <jsharkey@android.com> Progress towards dynamic storage support.

Storage devices are no longer hard-coded, and instead bubble up from
whatever Disk and VolumeBase that vold uncovered, turning into
sibling Java objects in MountService. We now treat vold events as
the source-of-truth for state, and synchronize our state by asking
vold to "reset" whenever we reconnect.

We've now moved to a model where all storage devices are mounted in
the root mount namespace (user boundaries protected with GIDs), so
we no longer need app-to-vold path translation. This also means that
zygote only needs to bind mount the user-specific /mnt/user/n/ path
onto /storage/self/ to make legacy paths like /sdcard work. This
grealy simplifies a lot of system code.

Many parts of the platform depend on a primary storage device always
being present, so we hack together a stub StorageVolume when vold
doesn't have a volume ready yet.

StorageVolume isn't really a volume anymore; it's the user-specific
view onto a volume, so MountService now filters and builds them
based on the calling user. StorageVolume is now immutable, making
it easier to reason about.

Environment now builds all of its paths dynamically based on active
volumes. Adds utility methods to turn int types and flags into
user-readable strings for debugging purposes.

Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.

Simplify unmount logic, since vold will now gladly trigger EJECTING
broadcast and kill stubborn processes.

Bug: 19993667
Change-Id: I9842280e61974c91bae15d764e386969aedcd338
/frameworks/base/core/java/android/os/Process.java
7a49028aa2f25364042fae031d95f9283844e645 17-Mar-2015 Mathieu Chartier <mathieuc@google.com> Add JIT late override property

Required for JIT debug property since user builds can't restart
the shell.

Bug: 19735273

Change-Id: I1983852e80010c344b45e0bb459de47c56adfce8
/frameworks/base/core/java/android/os/Process.java
f48029f00a66e23d7872a00b56fbcf88528ba476 08-Jan-2015 Narayan Kamath <narayan@google.com> Remove support for --classpath and make --runtime-init the default.

--classpath hasn't been properly supported or used for as long as
git history exists, and the non --runtime-init classpath is useless
without it.

Also, forking and exec' a bare dalvikvm instance from the zygote seems
somewhat pointless since we might as well just execute it directly.

Change-Id: Ib07d822d448e7b431d7564381f9cd11735fd1113
/frameworks/base/core/java/android/os/Process.java
343f478241fab49c909b229d6876ff8405e7b0d5 10-Nov-2014 Narayan Kamath <narayan@google.com> Tell installd when boot completes.

installd can then clear the ".booting" marker from the dalvik-cache
(owned by root). This marker is used to detect boot loops.

bug: 18280671

(cherry picked from commit 76a748e62f354c799342044f724e1f4b80121837)

Change-Id: I2364c05837ac04d428b5a34ab1802964a11d2df4
/frameworks/base/core/java/android/os/Process.java
a103ebed6e9a44a406b31636791d2970c882ec44 25-Sep-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of dfdabe37 to lmp-dev-plus-aosp

Change-Id: Ia9c350dcfb41f9d04400a86bd7e5f2cf2af656f1
2eacd06bfb82b33dfcbccafbcfc0bf1218484bb5 10-Sep-2014 jgu21 <jinghui.gu@intel.com> Frameworks/base: Early init native bridge

Add the app directory to the arguments for starting a process.
Add a check for NeedsNativeBridge and a call to PreInitializeBridge
in the native fork code.

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2
/frameworks/base/core/java/android/os/Process.java
dc84c6ca86290393fec2bb730f125575ee9e168e 05-Sep-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 82ad9ec3 to lmp-dev-plus-aosp

Change-Id: I7ae05c4f1b072906932a9ed47bdbad881b8e0d37
aec67dcc02362e4d2f7641c6605405b839bd1bd4 03-Sep-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Add native bridge post-fork initialization

Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
/frameworks/base/core/java/android/os/Process.java
1cb2d0d4bba387665128c62c342e59103ea4be26 31-Jul-2014 Jeff Sharkey <jsharkey@android.com> Persist install sessions, more lifecycle.

To resume install sessions across device boots, persist session
details and read at boot. Drop sessions older than 3 days, since
they're probably buggy installers.

Add session callback lifecycle around open/close to give home apps
details about active installs. Also give them a well-known intent
to show session details.

Extend Session to list staged APKs and open them read-only, giving
installers a mechanism to verify delivered bits, for example using
MessageDigest, before committing.

Switch to generating random session IDs instead of sequential.

Defensively resize app icons if too large. Reject runaway
installers when they have too many active sessions.

Bug: 16514389
Change-Id: I66c2266cb82fc72b1eb980a615566773f4290498
/frameworks/base/core/java/android/os/Process.java
08cfaf672604422dd355d6703aec78f3aa5ee74e 08-May-2014 Torne (Richard Coles) <torne@google.com> Use the WebView's loader library to load the real library.

Load libwebviewchromiumloader and use it to load the real WebView
library, to enable sharing of the relro segment between different
application processes without requiring that the library be preloaded in
the zygote. A system service is added to track whether the relro segment
file has been prepared, and block loading of the library until it has
been.

Bug: 13005501
Change-Id: I846b37c7b8e2a4eb8a39e4fd455bccbb2048c173
/frameworks/base/core/java/android/os/Process.java
0769e550011d8f8a19e333efe1706ef0e6cc6a5f 03-Jun-2014 Colin Cross <ccross@android.com> android.os.Process: add killProcessGroup

Add Process.killProcessGroup to interface between ActivityManager and
libprocessgroup.

Bug: 15313911
Change-Id: I5226a6d86153b863e30d936cf1c84e256f0d7ea5
/frameworks/base/core/java/android/os/Process.java
c774caff86d2e5dc5ca3a0008007cb0fd384568b 04-Jun-2014 Robin Lee <rgl@google.com> am 4891a9f9: am e46e6004: Merge "Assign AID_EVERYONE gid to newly-created processes"

* commit '4891a9f9cfee569c0d362f1781f44493f5e320c0':
Assign AID_EVERYONE gid to newly-created processes
e46e60041215249a285384cd2282de9f4d956a04 04-Jun-2014 Robin Lee <rgl@google.com> Merge "Assign AID_EVERYONE gid to newly-created processes"
35b884f88e39c97056e71f329e73812a142103b5 15-May-2014 Narayan Kamath <narayan@google.com> am be3dc575: am 402120a2: Merge "Wait for secondary zygote before bringing up the system_server."

* commit 'be3dc5754fd081f54a86df9894763c0da915eed3':
Wait for secondary zygote before bringing up the system_server.
64cd907af99ce9702e8975a657ee437c2626f8b5 13-May-2014 Narayan Kamath <narayan@google.com> Wait for secondary zygote before bringing up the system_server.

The zygote that's responsible for starting up the system server
now checks if there's another zygote on the system, and waits
for it to start up. Also, a few minor clean ups :

- Address a long standing TODO about zygote retries.
- Have functions throw IOException where appropriate and
wrap them in ZygoteStartFailedEx with a filled in cause.

bug: 14869939

Change-Id: I9e514659b79b3d2c98a4c5f93c0c376843f6c881
/frameworks/base/core/java/android/os/Process.java
3a951e52d93697b7e232501b78f9ffb0ec605516 01-May-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 69da8a12 to klp-modular-dev-plus-aosp

Change-Id: Ie07b88f324749afcf8417b50d4dbbc6e2a271a2a
0349e8c4785ed467d8de2ff383e28be3e41bdc3b 01-May-2014 Narayan Kamath <narayan@google.com> Package manager changes for dual zygote stack.

- Pass down the app's instruction set to dexopt so that
it can compile the dex file for the right architecture.

- Also pass down the app's instruction set to rmdex, movedex
and getSize so that they can construct the cache file
location properly.

- Temporarily compile "system" jars such as am,wm etc. for
both architectures. A follow up change will ensure that
they're compiled only for one architecture (the same
arch. as the system server).

- Java "shared" libraries are now compiled for the right
architecture when an app requires them.

- Improve the app native library ABI detection to account
for system apps installed in /system/lib{64}/<packagename>
and also handle sdcard and forward locked apps correctly.

(cherry-picked from commit b4d35dc8e9702f9d0d82d35a105f0eea35672b52)
/frameworks/base/core/java/android/os/Process.java
e66b6890ee59d108ae5c608f6ec8d4ad20cb06a8 29-Apr-2014 Robin Lee <rgl@google.com> Assign AID_EVERYONE gid to newly-created processes

Change-Id: I0ec45e07d77a4e6a47b6ba0d761c8375f433f528
/frameworks/base/core/java/android/os/Process.java
3ce4f3d0af8b20f915631ab927aafa76a6105135 28-Apr-2014 Elliott Hughes <enh@google.com> am 685a0a72: am bbd87eb9: Merge "Track libcore.os\' move to android.system."

* commit '685a0a72d445515167a2071330679cdf9b53a62d':
Track libcore.os' move to android.system.
34385d352da19805ae948215e2edbeedd16b7941 28-Apr-2014 Elliott Hughes <enh@google.com> Track libcore.os' move to android.system.

(This is partial, but should cover everything in AOSP master except
for the zygote.)

Change-Id: I1042c99245765746a744c44e714095cb2c6cb75d
/frameworks/base/core/java/android/os/Process.java
88a996455b1f3906765cc177c461d38cc9bfda92 11-Apr-2014 Narayan Kamath <narayan@google.com> am 97953b30: am 4f4892d0: Merge "Workaround 64 bit devices that don\'t have zygotes yet."

* commit '97953b308f9159a73061ae047e368eac503c1931':
Workaround 64 bit devices that don't have zygotes yet.
2d84a406bfc69eaad952078b01c3d5c76a489b41 11-Apr-2014 Narayan Kamath <narayan@google.com> Workaround 64 bit devices that don't have zygotes yet.

This can be fixed by tweaking their BoardConfig as well,
but that leads to all sorts of other problems.

For now, fall back to the primary zygote if the secondary
is unavailable. This will fail if shared libraries for the
primary zygote ABI are unavailable, but that won't be the
case just yet.

bug: 13970103
Change-Id: Ifa107e43ca95023d57a0d9c641e4fddaccd9a888
/frameworks/base/core/java/android/os/Process.java
9e289d70a8baaed0030413b5991653792e2a816d 10-Apr-2014 Narayan Kamath <narayan@google.com> am 1d26a3f1: am 09e13cc5: Merge "System services detect and register app CPU ABIs"

* commit '1d26a3f1efd0d965e8751e8515608c31789bdbe2':
System services detect and register app CPU ABIs
ff0c470833b2cb4130a30895093630242d5f238d 01-Apr-2014 Ramin Zaghi <ramin.zaghi@arm.com> System services detect and register app CPU ABIs

This patch uses the NativeLibraryHelper class to
match native libraries in an .apk package with
those listed in 'ro.cpu.abilist' property.
The result is stored in packages.xml and the
ApplicationInfo class.

This information will be used by the ActivityManager
to decide which zygote to use to launch the given
app.

Change-Id: I3ec3d050996d8f4621f286ca331b9ad47ea26fa0
/frameworks/base/core/java/android/os/Process.java
769a247595cb78536fa159e8f5d54191a4ef90c6 09-Apr-2014 Narayan Kamath <narayan@google.com> am b6ab8c17: am a6f5e79d: Merge "Allow connections to multiple zygotes."

* commit 'b6ab8c17bd0163bf07ff3dbe03ab352d58b61cb3':
Allow connections to multiple zygotes.
4444dcd0adc7e035cca030b90ed91f0cff9a772b 03-Apr-2014 Narayan Kamath <narayan@google.com> Allow connections to multiple zygotes.

Adds a new String argument "abi" to Process.start.
This method will now query the zygotes to
determine what ABIs the primary and the secondary
zygote support (the secondary is optional) and dispatch
a fork request over the right zygote connection.

Both zygotes are assumed to be active at all points.

Change-Id: I460319b4481ff1c1666e8172223691820658a35c
/frameworks/base/core/java/android/os/Process.java
71ab4f4f48a9b8b485d80adf18d568ef6265b1e8 02-Apr-2014 Narayan Kamath <narayan@google.com> am ea9e5eca: am 17b1b8fe: Merge "Move zygote startup logic to the frameworks."

* commit 'ea9e5ecac1e5240370f0e3f998b9c8b159ee9320':
Move zygote startup logic to the frameworks.
973b4663b0b5ee62006522bf4742af076096e548 31-Mar-2014 Narayan Kamath <narayan@google.com> Move zygote startup logic to the frameworks.

The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
/frameworks/base/core/java/android/os/Process.java
91ecb36df50be3446809e9da2a8f571d157f7549 11-Jul-2013 Todd Poynor <toddpoynor@google.com> ActivityManagerService use lmkd low memory killer daemon -- DO NOT MERGE

Change-Id: Ie2f8af1e411c28d7f03be56c356ec39e1d71558e
/frameworks/base/core/java/android/os/Process.java
8715dc1401557f5ec068f9214ab0712291a3b403 25-Sep-2013 Dianne Hackborn <hackbod@android.com> am 4213e68f: am 3a7d5f71: Merge "Replace SEAndroid with SELinux."

* commit '4213e68f67d59c0912d2a8729fcec4539197756a':
Replace SEAndroid with SELinux.
3a7d5f71456b57f712b0f878beb5317f0ce6d564 25-Sep-2013 Dianne Hackborn <hackbod@android.com> Merge "Replace SEAndroid with SELinux."
184a0100abc431fc3d6d8dd1b20212b84958cada 11-Jul-2013 Jeff Sharkey <jsharkey@android.com> Allow packages.list access with new GID.

The FUSE daemon is using packages.list to map from package name to
appId after it drops permissions, so create a new "package_info" GID
to grant read access.

Also switches FileUtils to use Libcore.os.

Change-Id: I9451ca4e90e8a985526805c6df0888a244a1db36
/frameworks/base/core/java/android/os/Process.java
2a805f930463ece57bc0d0fd8dee7f5d50681b22 01-Aug-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of 368d81fe to master

Change-Id: I4bc59cd9a54cbc1b62ac135cf86dc73ac85968d5
6d4b1e24aef5b74b40de4d8f6e63c21874ce8e3a 01-Aug-2013 Elliott Hughes <enh@google.com> Switch Process.myTid over to the libcore JNI too.

Change-Id: I80eaecff014fabf809f4be3c9ee8b26aa64bf0cf
/frameworks/base/core/java/android/os/Process.java
406ec15647b7664cadadde41dbaaa10e298c582b 30-Jul-2013 Jeff Hao <jeffhao@google.com> Replace native Process getpid/getuid with calls to libcore equivalents.

The Process natives were getting called were getting called while
handling a jdwp packet before the vm had a chance to register them.

(cherry-pick of 5bce6a308fc8a3c1e449cf905b8b6e8ace4ef3e2.)

Change-Id: Ia2b4f79b11e427283a712b2d0c52948f394640bf
/frameworks/base/core/java/android/os/Process.java
bd19b9ee305c11d8aa3cbb105bf2d3a6b06389b5 12-Apr-2013 Stephen Smalley <sds@tycho.nsa.gov> Replace SEAndroid with SELinux.

Change-Id: Ibbe544a9f025d71ad416bc01cee2145b62d7b2d4
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/frameworks/base/core/java/android/os/Process.java
5534ba91ac0a0c9af822af62bcf92e2c5a8d6ec8 13-Jul-2013 Rom Lemarchand <romlem@google.com> Increase swappiness of processes when memcgroups are enabled

When memcgroups are enabled, migrate heavier and lower priority processes
to the sw memcgroup.

Change-Id: Iba07a723037a599736ef23dea16a30a26634428a
/frameworks/base/core/java/android/os/Process.java
13ac041b9f21043bc7c848a743be618bfd7a67e9 26-Jun-2013 Dianne Hackborn <hackbod@google.com> Update procstats to start collecting/reporting pss.

Completely reworked how it manages its data, since trying
to keep track of all of the possible pss data with the old
data structures would have made it huge. Now we have a sparse
data structure for pss and process times. (Will switch service
times over to it soon.)

Currently the only thing that collects pss data is running
"dumpsys meminfo". More will be added later.

Modified checkin output to also scale better as more distinct
data categories are added, and added output of pss data. Now
instead of dumping every possible entry as a comma-separated
list, it dumps a comma-separated list of only the entries with
data, tagged with the state they go with.

Also fixed some problems in the checkin reporting of batterystats
(it needs to escape commas), added checkin reporting of the history
list, fixed parsing of kernel wake locks to strip quotes, fixed
wake lock name that the sync manager generates to be more sane.

Change-Id: Ibf4010838a9f685ebe1d93aff86c064ccc52b861
/frameworks/base/core/java/android/os/Process.java
80b12fcaaec458377d966803c3a61504f0897ea1 30-May-2013 Romain Guy <romainguy@google.com> Disable the AssetAtlas when running under valgrind
Bug #9191438

When running under valgrind, the ppid will be different from the ppid
of the system server (which always gets forked from zygote.)

Change-Id: I42cbf99fd0084aeab76c30de9beb7c49ed1fc7d8
/frameworks/base/core/java/android/os/Process.java
2323dd8d1e2564e5a7b912bf57838802571e8777 10-Apr-2013 Dianne Hackborn <hackbod@google.com> Fix issue #7691456: adbd CPU usage identified as Bluetooth in battery stats

Bluetooth GID was wrong and pointless and dumb and now gone.

Change-Id: Ibde563ef0c10c6d316428e1e683b013005b934d4
/frameworks/base/core/java/android/os/Process.java
9e57c414f39e1a31349bc215635fdcfaf1902cee 17-Jan-2013 Jeff Sharkey <jsharkey@android.com> Add method to get process group.

Change-Id: Ia62223228a54a6a4e3cdfc5c2e8c73ee194e77ef
/frameworks/base/core/java/android/os/Process.java
e091f22e226f7177e45e23850670c1ad9b63fd75 12-Sep-2012 Kenny Root <kroot@google.com> Use shared app gid for forward-locked processes

Use a shared app gid for each app across different users which allows
forward-locked applications to share the same APK file.

Change-Id: Ifecf51ee7865547117746f83e9733083d3dd5111
/frameworks/base/core/java/android/os/Process.java
e217ee4d7a8223289a1af7363627c69956c46d41 29-Aug-2012 Jeff Sharkey <jsharkey@android.com> Access to all users' external storage.

System services holding this permission have external storage bound
one level higher, giving them access to all users' files.

Bug: 7003520
Change-Id: Ib2bcb8455740c713ebd01f71c9a2b89b4e642832
/frameworks/base/core/java/android/os/Process.java
2bca868361b41ff6a8228824cbecadc4c5deb44e 22-Aug-2012 Jeff Sharkey <jsharkey@android.com> Iteration on multi-user external storage.

Remove single-user bind mounts, since they need to remain as raw
mounts to correctly propagate when remounted. This means we're back
to using sdcard_r GID to enforce READ_EXTERNAL_STORAGE.

Bug: 6925012
Change-Id: I41b5d7ddc985a5df2e288632a0a80d4724089e00
/frameworks/base/core/java/android/os/Process.java
79af1dd54c16cde063152922b42c96d72ae9eca8 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
/frameworks/base/core/java/android/os/Process.java
c584b65b2093396c9a0c9303dab6ff6cb81ac315 16-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Multi-user external storage support." into jb-mr1-dev
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/core/java/android/os/Process.java
5b1ada2562c17921adf6a62ea62bcb445160983c 15-Aug-2012 Jeff Sharkey <jsharkey@android.com> Multi-user external storage support.

Emulated external storage always has multi-user support using paths
like "/data/media/<user_id>". Creates and destroys these paths along
with user data. Uses new ensure_dir() to create directories while
always ensuring permissions.

Add external storage mount mode to zygote, supporting both single-
and multi-user devices. For example, devices with physical SD cards
are treated as single-user. Begin migrating to mount mode instead
of relying on sdcard_r GID to enforce READ_EXTERNAL_STORAGE.

Bug: 6925012
Change-Id: I9b872ded992cd078e2c013567d59f9f0032ec02b
/frameworks/base/core/java/android/os/Process.java
7d19e0242faac8017033dabb872cdf1542fa184c 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
/frameworks/base/core/java/android/os/Process.java
1abb1cb3a8fe17f7866150604c2fd73751da787e 26-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Changes to Bluetooth Service structure.

Changes to make Bluetooth Service part of the system_service.
These changes may be temporary.

Changes to update to the new disable API.

Change-Id: If89dba17e6e6c6daa53c37684221763a2da076e9

Conflicts:

services/java/com/android/server/pm/PackageManagerService.java
/frameworks/base/core/java/android/os/Process.java
ae017c55824ca345186b0c9fc204401153bd8a23 21-Jun-2012 Kenny Root <kroot@android.com> am a9543a3d: Merge "Pass additional inputs when spawning apps via the Zygote and add SELinux permission checks."

* commit 'a9543a3dad0da58f30580bdf99b76bc2ab97a2df':
Pass additional inputs when spawning apps via the Zygote and add SELinux permission checks.
f72467ad9843bf5d4b75fb308386e77ebb5c3447 09-Jun-2012 Dianne Hackborn <hackbod@google.com> Include important native processes in watchdog stacks.

Helps us track down deadlocks involving native service processes.

Bug: 6615693
Change-Id: I580047550772e29586195a8cf440141574e3f40c
/frameworks/base/core/java/android/os/Process.java
59325eb31f25704bb88c348160bb69e7c1aa3b48 10-May-2012 Dianne Hackborn <hackbod@google.com> Add new API to find total RAM.

Change-Id: Iad2dff3c44f471515f093e7f0d0d959528881ab9
/frameworks/base/core/java/android/os/Process.java
bb9d6e6d8f3062302f229b8e2d133eae312a148b 25-Apr-2012 Jeff Sharkey <jsharkey@android.com> Merge "Relax global restrict for system services."
5294a2fc2f401cd248a4bc3f0f9ee1e2854f4e9a 25-Apr-2012 Jeff Sharkey <jsharkey@android.com> Relax global restrict for system services.

Since we control system services, we can ensure they are using little
data when data usage is globally restricted. Continue restricting
AID_MEDIA and AID_DRM, since they respond to app requests.

Bug: 6377903, 5772564
Change-Id: I196bf334f903397ea6a67e6802240ee792e47b54
/frameworks/base/core/java/android/os/Process.java
07b0465095bd9ab3412caefa4fcacbdc3825c64b 24-Apr-2012 Glenn Kasten <gkasten@google.com> Scheduling policy service

Change-Id: I6178b96896ffbb3323210f93784a65d724a3e694
/frameworks/base/core/java/android/os/Process.java
f1b56449f58963e4f0473d5e26961f68c31759f4 16-Mar-2012 Glenn Kasten <gkasten@google.com> Scheduling group cleanup

The C++ API for scheduling groups is going away, so use the C API.

Renumber THREAD_GROUP_* constants to have the same values as SP_*.
They are @hide so this should be OK.

The old THREAD_GROUP_FG_BOOST constant is removed, and replaced by a
(private) THREAD_GROUP_FOREGROUND constant that is just a placeholder
to correspond to SP_FOREGROUND. It is not usable at this level.

Improved performance of android_os_Process_setProcessGroup:
avoid unnecessary syscall to getpriority for each tid.

Fixed error handling in android_os_Process_setThreadGroup.
It raises an exception if set_sched_policy() returns an error.

Add comments and fix typos in existing comments.

Change-Id: Ib922e92c945985c695ef0addbd2b83b8e82865f8
/frameworks/base/core/java/android/os/Process.java
83d9eda9c2c411e3480c52f01e192bf3c86be8e9 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Pass additional inputs when spawning apps via the Zygote and add SELinux permission checks.

When spawning an app process, the ActivityManagerService has additional information
about the app package that may be useful in setting a SELinux security context on the
process. Extend the Process.start() interface to allow passing such information
to the Zygote spawner. We originally considered using the existing zygoteArgs
argument, but found that those arguments are appended after the class name and
left uninterpreted by ZygoteConnection, merely passed along to the class or wrapper.
Thus we introduce a new seInfo argument for this purpose.

Modify the ZygoteConnection to interpret the new option and convey it to
forkAndSpecialize, as well as passing the nice name as a further input.
Also modify the ZygoteConnection to apply SELinux permission checks on
privileged operations.

Change-Id: I66045ffd33ca9898b1d026882bcc1c5baf3adc17
/frameworks/base/core/java/android/os/Process.java
26993b37d525fd64efebd51daec1b4abfebd8a74 19-Mar-2012 Kenny Root <kroot@google.com> Add VPN UID to list in Process

The VPN user ID is defined in android_filesystem_config.h as 1016. Add
it to android.os.Process so it can be referred to in Java code.

Change-Id: If3da3765747afda4e5e0761e289c45eebc7cddd5
/frameworks/base/core/java/android/os/Process.java
21fbd1f7da53dc044737803dccddf8099f1fc1e9 10-Feb-2012 Dianne Hackborn <hackbod@google.com> Some cruft removal.

Change-Id: If4a94bfd4a033748eb13e8f3ff25e24382746778
/frameworks/base/core/java/android/os/Process.java
a0c283eac33dd2da72235751bbfa4f2d9898d5ea 09-Feb-2012 Dianne Hackborn <hackbod@google.com> Add new feature for running services in "isolated" sandbox processes.

This reserves a range of uids (for each user) in which these processes
run. These uids are not associated with an application, so they
effectively run with no permissions. When a Service requests to
run in such a process through android:isolatedProcess="true", each
time it is brought up a new isolated process is started with its
own unique uid.

What we have so far gives us the basic infrastructure; more work
remains to further lock down what these uids have access to.

Change-Id: Ibfd27c75619cba61f528f46ede9113f98dc5f45b
/frameworks/base/core/java/android/os/Process.java
a7f656206550dea94e51dd8c9bb2dd8734bcdf92 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Add android.os.Process.setThreadScheduler"
a5cb9f42174a52afbeb7e33dab64282f52f8cedb 21-Nov-2011 Nick Pelly <npelly@google.com> Replace vendor specific NfcGoogle.apk with generic Nfc.apk

The access control changes allow us to just use Nfc.apk with
the regular platform certificate, instead of the custom signed
NfcGoogle.apk. So we can compeltely get rid of vendor/google/apps/NfcGoogle
and just build it out of packages/apps/Nfc now.

The package name is also reverted from com.android.nfc3 to com.android.nfc

The NFC uid needs to get bumped (25 to 27) to allow the cert change.

Bug: 5608249
Change-Id: I09a81a896ff3cceb5a8de331d3399921b870932a
/frameworks/base/core/java/android/os/Process.java
6793ac943afeb16642f477c43ddfd27e498db37b 13-Jul-2011 Glenn Kasten <gkasten@google.com> Add android.os.Process.setThreadScheduler

And add the associated SCHED_* constants
and remove redundant parameter to signalExceptionForPriorityError
and signalExceptionForGroupError.

Change-Id: I5a4e9652155aef2e5d544185e0d73a0120f89d97
/frameworks/base/core/java/android/os/Process.java
007e62172fea3a3e5848c65cc781a2496d137889 14-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Add MEDIA_UID"
8b7d1b4d4a33e9429c5cedaa6317efcaad95da68 14-Jul-2011 Glenn Kasten <gkasten@google.com> Add MEDIA_UID

Change-Id: Iaf03913dce95420e21c79226031b7caaaedf2ce8
/frameworks/base/core/java/android/os/Process.java
3f9dd287b99340efaaa257759e71a8f81b2ed113 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Increase activity timeouts when using a wrapper process.

This patch enables the Zygote to tell the ActivityManager when
it has started a process with a wrapper attached so that the
ActivityManager can allow it extra time to start up or process
events.

This is useful when wrapping an app with Valgrind or other tools
which add significant runtime overhead.

Bug: 4584468
Change-Id: I5db6f2f15cd30b0ec40f547d2fadfa216de2926d
/frameworks/base/core/java/android/os/Process.java
10e89712863f5b91a2982dc1783fbdfe39c1485d 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
/frameworks/base/core/java/android/os/Process.java
e1dfcb7ab01fb991079ec1f70f75281a0ca9073e 08-Jul-2011 Elliott Hughes <enh@google.com> Pass the targetSdkVersion through to the zygote-forked dalvik.

This will let dalvik implement backwards-compatibile behaviors based on
an app's targetSdkVersion.

Bug: 4772166
Change-Id: I935c5ea9144e8b4e6e21089547287486e2234b7f
/frameworks/base/core/java/android/os/Process.java
ae07ecf3766c38af1c12822458b98036b28bd4c0 07-Jul-2011 Elliott Hughes <enh@google.com> Add the "debug.jni.logging" property so third-party developers can debug their JNI problems.

This turns on the super-verbose but indispensible logging of all native method
calls and all calls to JNI functions (for third-party code only). In particular,
if you have a local reference bug, you can search for the reference given in
the crash and see exactly where it came from. In every case I've seen so far,
that's pinpointed the bug exactly.

Change-Id: Ifb7ba02ae637bdd53cd8500febdcb9d4d7799bda
/frameworks/base/core/java/android/os/Process.java
f4b92ec567477fcdea24fdd18116b045dfcf9852 01-Jul-2011 Brian Carlstrom <bdc@google.com> Revert "Add keychain user with special keystore access permissions"

This reverts commit 8c2a1a90a81f04573bfa578eab32f5fd4a30eafb.

Conflicts:

cmds/keystore/keystore.c

Bug:4970237
Change-Id: I626023d695becfada47e5f319b18e0889b766563
/frameworks/base/core/java/android/os/Process.java
ebed7d6e35f7f960e6e6add2b8ab7c7a31a511c3 17-May-2011 Jeff Brown <jeffbrown@google.com> Support wrapping app processes to inject debug instrumentation.
Bug: 4437846

Change-Id: I4552501c693716b14714afb5c5248edaca9547ab
/frameworks/base/core/java/android/os/Process.java
40c266ef4868876f75d1b7b96f6117d7497c4e41 11-Apr-2011 Jeff Hamilton <jham@android.com> am a83bc160: am 7bb236c3: am 84d34078: Make the NFC UID forward compatible.

* commit 'a83bc160892078c20489897190ee163d5c4d3783':
Make the NFC UID forward compatible.
a83bc160892078c20489897190ee163d5c4d3783 11-Apr-2011 Jeff Hamilton <jham@android.com> am 7bb236c3: am 84d34078: Make the NFC UID forward compatible.

* commit '7bb236c3b5e49f53b3110855276d99e664b29931':
Make the NFC UID forward compatible.
8c2a1a90a81f04573bfa578eab32f5fd4a30eafb 08-Apr-2011 Brian Carlstrom <bdc@google.com> Add keychain user with special keystore access permissions

Change-Id: I02fe5171add62c5cd9f57b01bc137f3bc1cb3a69
/frameworks/base/core/java/android/os/Process.java
84d340781b1e148ead9fb4790755737c9dcc1cde 01-Apr-2011 Jeff Hamilton <jham@android.com> Make the NFC UID forward compatible.

Change-Id: I67316ee7906c29ba11ca7c8eb36ca1b736fe59b1
/frameworks/base/core/java/android/os/Process.java
0c691f0eb3bc844e778f9a61e777076658879dfd 30-Mar-2011 Jeff Hamilton <jham@android.com> am ad91eee2: am 9c1ef098: Update the value for the NFC shared UID.

* commit 'ad91eee2774e18204a14d473242efe5640b91152':
Update the value for the NFC shared UID.
9c1ef098837bd73044cb970545344dd03f66daa0 25-Mar-2011 Jeff Hamilton <jham@android.com> Update the value for the NFC shared UID.

Change-Id: Id25e1c9f0c074d17440838a9da7bf59619726832
/frameworks/base/core/java/android/os/Process.java
dcaa10cd361a543cfa93bbb5c53444f437bd07a4 16-Dec-2010 Mike Lockwood <lockwood@android.com> Add Process.MEDIA_RW_GID constant

Change-Id: I2358e5ef1e55ee4b1b9725451ce06cfbf3ed54a4
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Process.java
cd0e839a2448deea50f79bddeba782c546b33893 14-Oct-2010 Nick Pelly <npelly@google.com> NFC: Move NFC service implementation out of system_server.

NFC service is now an application service in packages/apps/Nfc.

NFC service is registered through ServiceManager.addService(), and the proxy
object NfcAdapter obtains a handle to it through ServiceManager.getService().

**Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and
modify service_manager.c, Process.java and PackageManagerService.java in order
to force the com.android.nfc process to take a fixed uid, so that it can use
ServiceManager.addService().

Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and
NdefMessage require some in-process native code, so android_com_NdefMessage.cpp
and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to
a very small library libnfc_ndef.so that implements NDEF message parsing. This
has been added to core.mk so all devices (even without NFC hardware) can work
with NDEF data.

Bug: 3041259
Bug: 3097445
Change-Id: If7f00cd8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/java/android/os/Process.java
bc21fdefdfbeba1754c6cd339c7dd8e8f1d6fd48 14-Oct-2010 Nick Pelly <npelly@google.com> NFC: Move NFC service implementation out of system_server.

NFC service is now an application service in packages/apps/Nfc.

NFC service is registered through ServiceManager.addService(), and the proxy
object NfcAdapter obtains a handle to it through ServiceManager.getService().

**Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and
modify service_manager.c, Process.java and PackageManagerService.java in order
to force the com.android.nfc process to take a fixed uid, so that it can use
ServiceManager.addService().

Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and
NdefMessage require some in-process native code, so android_com_NdefMessage.cpp
and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to
a very small library libnfc_ndef.so that implements NDEF message parsing. This
has been added to core.mk so all devices (even without NFC hardware) can work
with NDEF data.

Bug: 3041259
Bug: 3097445
Change-Id: If8f00ce8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/java/android/os/Process.java
58fd98accbff409601587b3357f2b3acf370f606 24-Sep-2010 Mike Lockwood <lockwood@android.com> Add constant for SDCARD_RW group ID.

Change-Id: I3b009cd06d3c1bc308ba82694db7383134709f75
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Process.java
160edb3645f8b7012bab70ae6e6e8c4a5733082b 01-Jul-2010 Christopher Tate <ctate@google.com> Add ability to guard a thread against setting its own prio to bg

The guard is compiled out by default because it adds overhead to
android.os.Process.setPriority().

Change-Id: Ibb2a648c6349b381abb7ae62a358888b04fba871
/frameworks/base/core/java/android/os/Process.java
906497c574d45d8dfd295b16dece0d0bc32c0895 11-May-2010 Dianne Hackborn <hackbod@google.com> Hopefully fix issue #2662536: Why is launcher being killed?

It looks like there was a subtle bug where Process.setOomAdj() could
return false just because the given process doesn't exist, even though
it is documented to only return false if OOM killing is not supported
at all. This would cause the activity manager to fall into its code
path of trying to clean up processes itself, which it does a much
poorer problem at. I am thinking we may be seeing this problem more
now that the activity manager is killing background processes itself
when there are too many of them.

In addition, this change cleans up and reduces some of the logging
around killing processes.

Finally, try to improve process LRU management a bit by taking
into account process dependencies. Any dependent processes are
pulled up in the LRU list with the processes that is actually
moving. Also, we bring a process up if someone accesses its content
provider.

Change-Id: I34ea161f839679345578ffe681e8d9c5d26ab948
/frameworks/base/core/java/android/os/Process.java
23085b781e145ed684e7270af1d5ced6800b8eff 09-Feb-2010 Ben Cheng <bccheng@android.com> Support per-application switch to execute the VM in safe mode.

The new attribute can be set by adding android:safeMode="true"
in AndroidManifest.xml with the SDK.

Tested with pairing locally compiled SDK with Eclipse and verified that the JIT
(the only component currently included in the safe mode) is indeed disabled
with the new attribute.

Bug: 2267583
/frameworks/base/core/java/android/os/Process.java
d42685d5de1dbd6d75b48d42418f370adaa4daef 03-Sep-2009 Mike Lockwood <lockwood@android.com> Add support for running apps with uid/gid AID_LOG by specifying android.uid.log in the manifest

This is needed to allow the BugReportService to start the dumpstate service.

Change-Id: I12cab23767c919592da102c654b6b80416717661
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Process.java
0bca96bcbfe559f9330a01f723c5c9cba51ec05a 17-Jul-2009 Marco Nelissen <marcone@google.com> Make Process.getFreeMemory() return a long instead of an int, to better
work on the simulator now, and phones 2 years from now.
/frameworks/base/core/java/android/os/Process.java
854060af30f928c0a65591e9c8314ae17056e6b8 10-Jul-2009 Dianne Hackborn <hackbod@google.com> Fix bug #1873249i: Apps can DoS/brick device

This is the problem where various things are listening for broadcasts
(such as battery status, PIN/PUK/Network) that an application can send
to cause harm to the system.

Solving this is tricky because many of these broadcasts are sticky,
and I have never figured out how to do permissions with sticky
broadcasts in a sane way. So instead, I am going to punt on the
general problem and just brute force it:

There is new a way for system components to declare specific
broadcast actions to be protected, which means that only the system
and the phone can send them. This is good enough for now. None
of it is exposed in the public API so we can make something a little
less stupid in the future if we ever need to.
/frameworks/base/core/java/android/os/Process.java
d158214511a3c04753de04fa6389e46d33135c38 09-Jul-2009 Amith Yamasani <yamasani@google.com> Restore audio settings and wifi.

Optimize backups by writing an entity only if the checksum of the data has changed.
Call into the hidden AudioService API to apply changed audio settings.
After restoring wifi data, make sure that the permissions and ownership are set
properly for the supplicant process to access it.
Locale isn't restoring properly - TODO added.
/frameworks/base/core/java/android/os/Process.java
819f928f6a9dc3fdf408236f33e17f03a7dfed2c 25-Jun-2009 Amith Yamasani <yamasani@google.com> Add a method to Process to get uid for a pid.

Use the uids to track native processes. Cache the uids to avoid
checking /proc every time.
/frameworks/base/core/java/android/os/Process.java
3e458241d9930465a20a861ecb42744355d48e48 19-May-2009 San Mehat <san@google.com> process: Add setProcessGroup() hidden API call to set the cgroup of
a process and all its child threads.

Signed-off-by: San Mehat <san@google.com>
/frameworks/base/core/java/android/os/Process.java
e9d376b801b7890b1ef5006ed55de4208e64bb63 21-Apr-2009 San Mehat <san@google.com> Add support for changing a threads scheduler group. Three groups are available (default, background non interactive, foreground boost). Setting a thread priority to PRIORITY_BACKGROUND will transparently change groups to background

Signed-off-by: San Mehat <san@google.com>
/frameworks/base/core/java/android/os/Process.java
c64edde69d18498fb2954f71a546357b07ab996a 18-Apr-2009 Evan Millar <> AI 146853: Add kernel wakelock data to batteryinfo dump.
BUG=1755458

Automated import of CL 146853
/frameworks/base/core/java/android/os/Process.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Process.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Process.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/os/Process.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Process.java