Searched refs:thread (Results 1 - 25 of 49) sorted by relevance

12

/frameworks/base/core/java/com/android/internal/view/
H A DWindowManagerPolicyThread.java22 * Static storage of the thread running the window manager policy, to
29 public static void set(Thread thread, Looper looper) { argument
30 mThread = thread;
/frameworks/base/core/tests/coretests/src/android/content/
H A DContentQueryMapTest.java34 /** Helper class to run test code in a new thread with a Looper. */
54 LooperThread thread = new LooperThread() {
99 thread.start();
100 thread.join();
101 if (thread.mError != null) throw thread.mError;
102 assertTrue(thread.mSuccess);
/frameworks/base/media/java/android/mtp/
H A DMtpServer.java36 Thread thread = new Thread(this, "MtpServer");
37 thread.start();
/frameworks/base/core/java/android/app/
H A DIntentService.java31 * thread, and stops itself when it runs out of work.
34 * from an application's main thread. The IntentService class exists to
37 * will receive the Intents, launch a worker thread, and stop the service as
40 * <p>All requests are handled on a single worker thread -- they may take as
73 * @param name Used to name the worker thread, important only for debugging.
107 HandlerThread thread = new HandlerThread("IntentService[" + mName + "]");
108 thread.start();
110 mServiceLooper = thread.getLooper();
150 * This method is invoked on the worker thread with a request to process.
152 * worker thread tha
[all...]
H A DService.java45 * thread of their hosting process. This means that, if your service is going
47 * networking) operations, it should spawn its own thread in which to do that
51 * as a standard implementation of Service that has its own thread where it
80 * <li> A Service is <b>not</b> a thread. It is not a means itself to do work off
81 * of the main thread (to avoid Application Not Responding errors).
103 * main thread. It is up to the Service to implement these with the appropriate
104 * behavior, such as creating a secondary thread in which it does its work.</p>
211 * to schedule work to be done asynchronously or in another thread, then you
354 * and spawns a thread to do its networking. If its process is killed
415 * service's main thread
676 attach( Context context, ActivityThread thread, String className, IBinder token, Application application, Object activityManager) argument
[all...]
/frameworks/base/core/java/com/google/android/mms/util/
H A DPduCache.java102 HashSet<Uri> thread = mThreads.get(threadId);
103 if (thread == null) {
104 thread = new HashSet<Uri>();
105 mThreads.put(threadId, thread);
112 thread.add(finalKey);
214 HashSet<Uri> thread = mThreads.get(entry.getThreadId());
215 if (thread != null) {
216 thread.remove(key);
222 Log.v(TAG, "Purge cache in thread: " + threadId);
225 HashSet<Uri> thread
[all...]
/frameworks/base/media/libstagefright/foundation/
H A DALooper.cpp129 sp<LooperThread> thread; local
135 thread = mThread;
141 if (thread == NULL && !runningLocally) {
145 if (thread != NULL) {
146 thread->requestExit();
151 if (!runningLocally && !thread->isCurrentThread()) {
152 // If not running locally and this thread _is_ the looper thread,
154 thread->requestExitAndWait();
/frameworks/base/core/java/android/speech/tts/
H A DBlockingMediaPlayer.java40 // Only accessed on the Handler thread
62 * Can be called from any thread.
68 HandlerThread thread = new HandlerThread(MEDIA_PLAYER_THREAD_NAME);
69 thread.start();
70 Handler handler = new Handler(thread.getLooper());
83 // No new messages should get posted to the handler thread after this
92 * Can be called from any thread.
100 * Called on the handler thread.
135 * Called on the handler thread.
/frameworks/base/core/tests/coretests/src/android/database/
H A DDatabaseLockTest.java71 * same database at the same time with the same prioritization, neither thread
95 * This function is to create the second thread for testLockFairness() test.
98 Thread thread = new DatabaseFairnessThread();
99 thread.start();
153 * This function is to create the second thread for testLockLatency() test.
156 Thread thread = new DatabaseLatencyThread();
157 thread.start();
H A DDatabaseStatementTest.java289 StatementTestThread thread = new StatementTestThread(mDatabase, statement);
290 thread.start();
292 thread.join();
/frameworks/base/services/audioflinger/
H A DAudioFlinger.cpp77 // allow less retry attempts on direct output thread.
92 // minimum sleep time for the mixer thread loop when tracks are active but in underrun
94 // maximum divider applied to the active sleep time in the mixer thread loop
405 PlaybackThread *thread = checkPlaybackThread_l(output); local
407 if (thread == NULL) {
408 LOGE("unknown output thread");
449 track = thread->createTrack_l(client, streamType, sampleRate, format,
452 // move effect chain to this output thread if an effect on same session was waiting
455 Mutex::Autolock _dl(thread->mLock);
457 moveEffectChain_l(lSessionId, effectThread, thread, tru
479 PlaybackThread *thread = checkPlaybackThread_l(output); local
490 PlaybackThread *thread = checkPlaybackThread_l(output); local
501 PlaybackThread *thread = checkPlaybackThread_l(output); local
512 PlaybackThread *thread = checkPlaybackThread_l(output); local
523 PlaybackThread *thread = checkPlaybackThread_l(output); local
664 PlaybackThread *thread = NULL; local
714 PlaybackThread *thread = checkPlaybackThread_l(output); local
765 sp<RecordThread> thread = mRecordThreads.valueAt(i); local
787 sp<ThreadBase> thread; local
1221 sp<ThreadBase> thread = mThread.promote(); local
3126 addOutputTrack(MixerThread *thread) argument
3143 removeOutputTrack(MixerThread *thread) argument
3175 sp <ThreadBase> thread = outputTracks[i]->thread().promote(); local
3197 TrackBase( const wp<ThreadBase>& thread, const sp<Client>& client, uint32_t sampleRate, uint32_t format, uint32_t channelMask, int frameCount, uint32_t flags, const sp<IMemory>& sharedBuffer, int sessionId) argument
3358 Track( const wp<ThreadBase>& thread, const sp<Client>& client, int streamType, uint32_t sampleRate, uint32_t format, uint32_t channelMask, int frameCount, const sp<IMemory>& sharedBuffer, int sessionId) argument
3395 sp<ThreadBase> thread = mThread.promote(); local
3414 sp<ThreadBase> thread = mThread.promote(); local
3514 sp<ThreadBase> thread = mThread.promote(); local
3555 sp<ThreadBase> thread = mThread.promote(); local
3584 sp<ThreadBase> thread = mThread.promote(); local
3607 sp<ThreadBase> thread = mThread.promote(); local
3655 sp<ThreadBase> thread = mThread.promote(); local
3672 RecordTrack( const wp<ThreadBase>& thread, const sp<Client>& client, uint32_t sampleRate, uint32_t format, uint32_t channelMask, int frameCount, uint32_t flags, int sessionId) argument
3699 sp<ThreadBase> thread = mThread.promote(); local
3746 sp<ThreadBase> thread = mThread.promote(); local
3757 sp<ThreadBase> thread = mThread.promote(); local
3785 OutputTrack( const wp<ThreadBase>& thread, DuplicatingThread *sourceThread, uint32_t sampleRate, uint32_t format, uint32_t channelMask, int frameCount) argument
3850 sp<ThreadBase> thread = mThread.promote(); local
3919 sp<ThreadBase> thread = mThread.promote(); local
4138 RecordThread *thread; local
4909 PlaybackThread *thread = NULL; local
4985 DuplicatingThread *thread = new DuplicatingThread(this, thread1, id); local
4997 sp <PlaybackThread> thread; local
5033 PlaybackThread *thread = checkPlaybackThread_l(output); local
5048 PlaybackThread *thread = checkPlaybackThread_l(output); local
5068 RecordThread *thread = NULL; local
5148 sp <RecordThread> thread; local
5186 PlaybackThread *thread = mPlaybackThreads.valueAt(i).get(); local
5315 PlaybackThread *thread = NULL; local
5325 PlaybackThread *thread = checkPlaybackThread_l(output); local
5337 RecordThread *thread = NULL; local
5352 PlaybackThread *thread = mPlaybackThreads.valueAt(i).get(); local
5363 PlaybackThread *thread = primaryPlaybackThread_l(); local
5554 ThreadBase *thread = checkRecordThread_l(io); local
6105 sp<ThreadBase> thread = mThread.promote(); local
6141 sp<ThreadBase> thread = mThread.promote(); local
6242 sp<ThreadBase> thread = mThread.promote(); local
6349 sp<ThreadBase> thread = mThread.promote(); local
6463 sp<ThreadBase> thread = mThread.promote(); local
6499 sp<ThreadBase> thread = mThread.promote(); local
6865 sp<ThreadBase> thread = mEffect->thread().promote(); local
6902 sp<ThreadBase> thread = mEffect->thread().promote(); local
6924 sp<ThreadBase> thread = mEffect->thread().promote(); local
7089 sp<ThreadBase> thread = mThread.promote(); local
7155 sp<ThreadBase> thread = mThread.promote(); local
7204 sp<ThreadBase> thread = mThread.promote(); local
[all...]
H A DAudioFlinger.h321 TrackBase(const wp<ThreadBase>& thread,
402 PMDeathRecipient(const wp<ThreadBase>& thread) : mThread(thread) {} argument
580 Track( const wp<ThreadBase>& thread,
668 OutputTrack( const wp<ThreadBase>& thread,
681 wp<ThreadBase>& thread() { return mThread; } function in class:android::AudioFlinger::PlaybackThread::OutputTrack
878 void addOutputTrack(MixerThread* thread);
879 void removeOutputTrack(MixerThread* thread);
934 // record thread
942 RecordTrack(const wp<ThreadBase>& thread,
1110 setThread(const wp<ThreadBase>& thread) argument
1111 wp<ThreadBase>& thread() { return mThread; } function in class:android::AudioFlinger::EffectModule
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/os/
H A DHandlerThread_Delegate.java44 for (HandlerThread thread : list) {
45 thread.quit();
57 // record the thread so that it can be quit() on clean up.
/frameworks/base/core/java/android/widget/
H A DFilter.java104 HandlerThread thread = new HandlerThread(
106 thread.start();
107 mThreadHandler = new RequestHandler(thread.getLooper());
128 * <p>Invoked in a worker thread to filter the data according to the
132 * will then be published in the UI thread through
149 * <p>Invoked in the UI thread to publish the filtering results in the
211 * <p>Worker thread handler. When a new filtering request is posted from
265 * handled in the UI thread.</p>
270 * UI thread. The processing involves calling
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DPackageHelperTests.java91 Thread thread = new Thread(r1);
94 thread.start();
/frameworks/base/services/tests/servicestests/src/com/android/server/location/
H A DLocationBasedCountryDetectorTest.java211 // Wait for query thread ending
234 // There is no way to stop the thread, let's test it could be stopped, after get country
236 // Wait for query thread ending
313 // Wait for query thread ending
336 // Wait for query thread ending
358 private void waitForThreadEnding(Thread thread) { argument
360 thread.join(5000);
375 Thread thread = detector.getQueryThread();
376 assertTrue(thread != null);
377 return thread;
[all...]
/frameworks/base/core/java/android/content/
H A DAbstractThreadedSyncAdapter.java29 * An abstract implementation of a SyncAdapter that spawns a thread to invoke a sync operation.
32 * When a startSync() is received and there is no sync operation in progress then a thread
33 * will be started to run the operation and {@link #onPerformSync} will be invoked on that thread.
34 * If a cancelSync() is received that matches an existing sync operation then the thread
35 * that is running that sync operation will be interrupted, which will indicate to the thread
124 * at the same time, each in their own thread. This must be consistent with the setting
215 * The thread that invokes {@link AbstractThreadedSyncAdapter#onPerformSync}. It also acquires
217 * this thread in order to cancel the sync.
296 * thread than the sync thread an
321 onSyncCanceled(Thread thread) argument
[all...]
H A DAsyncQueryHandler.java83 // which will make the first access on the main thread a lot faster.
129 HandlerThread thread = new HandlerThread("AsyncQueryWorker");
130 thread.start();
132 sLooper = thread.getLooper();
/frameworks/base/services/java/com/android/server/
H A DCountryDetectorService.java172 Thread thread = new Thread(this, "CountryDetectorService");
173 thread.start();
H A DNativeDaemonConnector.java82 HandlerThread thread = new HandlerThread(TAG + ".CallbackHandler");
83 thread.start();
84 mCallbackHandler = new Handler(thread.getLooper(), this);
/frameworks/base/core/java/android/pim/
H A DContactsAsyncHelper.java221 HandlerThread thread = new HandlerThread("ContactsAsyncWorker");
222 thread.start();
223 sThreadHandler = new WorkerHandler(thread.getLooper());
297 // notify the thread to begin working
/frameworks/base/core/java/android/webkit/
H A DWebViewWorker.java30 * WebViewWorker executes in a separate thread other than UI and WebViewCore. To
82 HandlerThread thread = new HandlerThread(THREAD_NAME,
85 thread.start();
86 sWorkerHandler = new WebViewWorker(thread.getLooper());
/frameworks/base/telephony/java/com/android/internal/telephony/cat/
H A DIconLoader.java83 HandlerThread thread = new HandlerThread("Cat Icon Loader");
84 thread.start();
85 return new IconLoader(thread.getLooper(), fh);
/frameworks/base/services/java/com/android/server/am/
H A DProcessRecord.java50 IApplicationThread thread; // the actual proc... may be null only if field in class:ProcessRecord
176 pw.print(prefix); pw.print("thread="); pw.print(thread);
275 thread = _thread;
314 if (deathRecipient != null && thread != null) {
315 thread.asBinder().unlinkToDeath(deathRecipient, 0);
/frameworks/base/tests/CoreTests/android/core/
H A DSSLSocketTest.java333 * a different thread was sitting in a blocking read or write.
435 android.util.Log.d("SSLSocketTest", "testMultithreadedFetch() started thread #" + i);
441 android.util.Log.d("SSLSocketTest", "testMultithreadedFetch() joined thread #" + i);
841 Thread thread = new Thread() {
856 thread.start();
859 thread.join(10000);
871 Thread thread = new Thread() {
884 thread.start();
895 thread.join(5000);

Completed in 374 milliseconds

12