Lines Matching refs:process
8 <li>Every application runs in its own process and all components of the application run in that
9 process, by default</li>
34 running, the Android system starts a new Linux process for the application with a single thread of
35 execution. By default, all components of the same application run in the same process and thread
36 (called the "main" thread). If an application component starts and there already exists a process
38 started within that process and uses the same thread of execution. However, you can arrange for
40 threads for any process.</p>
47 <p>By default, all components of the same application run in the same process and most applications
48 should not change this. However, if you find that you need to control which process a certain
56 <provider>}</a>—supports an {@code android:process} attribute that can specify a
57 process in which that component should run. You can set this attribute so that each component runs
58 in its own process or so that some components share a process while others do not. You can also set
59 {@code android:process} so that components of different applications run in the same
60 process—provided that the applications share the same Linux user ID and are signed with the
64 <application>}</a> element also supports an {@code android:process} attribute, to set a
67 <p>Android might decide to shut down a process at some point, when memory is low and required by
69 components running in the process that's killed are consequently destroyed. A process is started
73 the user. For example, it more readily shuts down a process hosting activities that are no longer
74 visible on screen, compared to a process hosting visible activities. The decision whether to
75 terminate a process, therefore, depends on the state of the components running in that process. The
81 <p>The Android system tries to maintain an application process for as long as possible, but
84 and which to kill, the system places each process into an "importance hierarchy" based on the
85 components running in the process and the state of those components. Processes with the lowest
90 types of processes in order of importance (the first process is <em>most important</em> and is
94 <li><b>Foreground process</b>
95 <p>A process that is required for what the user is currently doing. A
96 process is considered to be in the foreground if any of the following conditions are true:</p>
122 <li><b>Visible process</b>
123 <p>A process that doesn't have any foreground components, but still can
124 affect what the user sees on screen. A process is considered to be visible if either of the
137 <p>A visible process is considered extremely important and will not be killed unless doing so
141 <li><b>Service process</b>
142 <p>A process that is running a service that has been started with the {@link
150 <li><b>Background process</b>
151 <p>A process holding an activity that's not currently visible to the user (the activity's
155 visible, or service process. Usually there are many background processes running, so they are kept
156 in an LRU (least recently used) list to ensure that the process with the activity that was most
158 correctly, and saves its current state, killing its process will not have a visible effect on
165 <li><b>Empty process</b>
166 <p>A process that doesn't hold any active application components. The only reason to keep this
167 kind of process alive is for caching purposes, to improve startup time the next time a component
169 resources between process caches and the underlying kernel caches.</p>
174 <p>Android ranks a process at the highest level it can, based upon the importance of the
175 components currently active in the process. For example, if a process hosts a service and a visible
176 activity, the process is ranked as a visible process, not a service process.</p>
178 <p>In addition, a process's ranking might be increased because other processes are dependent on
179 it—a process that is serving another process can never be ranked lower than the process it is
180 serving. For example, if a content provider in process A is serving a client in process B, or if a
181 service in process A is bound to a component in process B, process A is always considered at least
182 as important as process B.</p>
184 <p>Because a process running a service is ranked higher than a process with background activities,
190 Using a service guarantees that the operation will have at least "service process" priority,
207 components that run in the same process are instantiated in the UI thread, and system calls to
210 or a lifecycle callback method) always run in the UI thread of the process.</p>
298 using a {@link android.os.Handler} in your worker thread, to process messages delivered from the UI
378 method implemented in an {@link android.os.IBinder} originates in the same process in which the
380 However, when the call originates in another process, the method is executed in a thread chosen from
381 a pool of threads that the system maintains in the same process as the {@link android.os.IBinder
382 IBinder} (it's not executed in the UI thread of the process). For example, whereas a service's
384 service's process, methods implemented in the object that {@link android.app.Service#onBind
397 getType()}—are called from a pool of threads in the content provider's process, not the UI
398 thread for the process. Because these methods might be called from any number of threads at the
406 remotely (in another process), with any result returned back to the
408 understand, transmitting it from the local process and address space to the remote process and