Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 306) sorted by relevance

12345678910>>...13

/frameworks/av/services/audioflinger/
DAudioFlinger.cpp643 PlaybackThread *thread = checkPlaybackThread_l(output); in createTrack() local
644 if (thread == NULL) { in createTrack()
681 track = thread->createTrack_l(client, streamType, sampleRate, format, in createTrack()
690 Mutex::Autolock _dl(thread->mLock); in createTrack()
692 moveEffectChain_l(lSessionId, effectThread, thread, true); in createTrack()
698 if (thread->isValidSyncEvent(mPendingSyncEvents[i])) { in createTrack()
710 setAudioHwSyncForSession_l(thread, lSessionId); in createTrack()
737 ThreadBase *thread = checkThread_l(ioHandle); in sampleRate() local
738 if (thread == NULL) { in sampleRate()
742 return thread->sampleRate(); in sampleRate()
[all …]
DTracks.cpp67 ThreadBase *thread, in TrackBase() argument
80 mThread(thread), in TrackBase()
100 mThreadIoHandle(thread->id()) in TrackBase()
154 const sp<MemoryDealer> roHeap(thread->readOnlyHeap()); in TrackBase()
169 mBufferMemory = thread->pipeMemory(); in TrackBase()
350 PlaybackThread *thread, in Track() argument
363 : TrackBase(thread, client, sampleRate, format, channelMask, frameCount, in Track()
373 mMainBuffer(thread->mixBuffer()), in Track()
406 mName = thread->getTrackName_l(channelMask, format, sessionId, uid); in Track()
417 ALOG_ASSERT(thread->mFastTrackAvailMask != 0); in Track()
[all …]
DEffects.cpp58 AudioFlinger::EffectModule::EffectModule(ThreadBase *thread, in EffectModule() argument
65 mThread(thread), mChain(chain), mId(id), mSessionId(sessionId), in EffectModule()
73 mAudioFlinger(thread->mAudioFlinger) in EffectModule()
79 mStatus = EffectCreate(&desc->uuid, sessionId, thread->id(), &mEffectInterface); in EffectModule()
90 setOffloaded(thread->type() == ThreadBase::OFFLOAD, thread->id()); in EffectModule()
343 sp<ThreadBase> thread; in configure() local
352 thread = mThread.promote(); in configure()
353 if (thread == 0) { in configure()
359 channelMask = thread->channelMask(); in configure()
377 mConfig.inputCfg.samplingRate = thread->sampleRate(); in configure()
[all …]
DPatchPanel.cpp264 sp<ThreadBase> thread = in createAudioPatch() local
266 newPatch->mPlaybackThread = (MixerThread *)thread.get(); in createAudioPatch()
267 if (thread == 0) { in createAudioPatch()
332 sp<ThreadBase> thread = audioflinger->checkRecordThread_l( in createAudioPatch() local
334 if (thread == 0) { in createAudioPatch()
340 status = thread->sendCreateAudioPatchConfigEvent(patch, &halHandle); in createAudioPatch()
381 sp<ThreadBase> thread = in createAudioPatch() local
383 if (thread == 0) { in createAudioPatch()
389 if (thread == audioflinger->primaryPlaybackThread_l()) { in createAudioPatch()
396 status = thread->sendCreateAudioPatchConfigEvent(patch, &halHandle); in createAudioPatch()
[all …]
DEffects.h44 EffectModule(ThreadBase *thread,
93 void setThread(const wp<ThreadBase>& thread) { mThread = thread; } in setThread() argument
94 const wp<ThreadBase>& thread() { return mThread; } in thread() function
260 EffectChain(ThreadBase *thread, audio_session_t sessionId);
281 ThreadBase *thread,
359 bool isCompatibleWithThread_l(const sp<ThreadBase>& thread) const;
388 void clearInputBuffer_l(sp<ThreadBase> thread);
390 void setThread(const sp<ThreadBase>& thread);
/frameworks/base/docs/html-intl/intl/in/guide/components/
Dprocesses-and-threads.jd19 <li><a href="#ThreadSafe">Metode thread-safe</a></li>
29 berjalan, sistem Android akan memulai proses Linux baru untuk aplikasi dengan satu thread
31 thread yang sama (disebut thread "utama"). Jika komponen aplikasi dimulai dan sudah ada
33 akan dimulai dalam proses itu dan menggunakan thread eksekusi yang sama. Akan tetapi, Anda bisa
34 …n berbeda di aplikasi agar berjalan di proses terpisah, dan Anda bisa membuat thread tambahan untuk
37 <p>Dokumen ini membahas cara kerja proses dan thread di aplikasi Android.</p>
179 membuat thread pekerja&mdash;khususnya jika operasi mungkin akan berlangsung lebih lama daripada ak…
184 menjalankan layanan daripada hanya menempatkan operasi yang menghabiskan waktu di thread.</p>
191 <p>Bila aplikasi diluncurkan, sistem akan membuat thread eksekusi untuk aplikasi tersebut, yang dib…
193 antarmuka pengguna yang sesuai, termasuk kejadian menggambar. Ini juga merupakan thread yang
[all …]
/frameworks/base/docs/html-intl/intl/id/guide/components/
Dprocesses-and-threads.jd19 <li><a href="#ThreadSafe">Metode thread-safe</a></li>
29 berjalan, sistem Android akan memulai proses Linux baru untuk aplikasi dengan satu thread
31 thread yang sama (disebut thread "utama"). Jika komponen aplikasi dimulai dan sudah ada
33 akan dimulai dalam proses itu dan menggunakan thread eksekusi yang sama. Akan tetapi, Anda bisa
34 …n berbeda di aplikasi agar berjalan di proses terpisah, dan Anda bisa membuat thread tambahan untuk
37 <p>Dokumen ini membahas cara kerja proses dan thread di aplikasi Android.</p>
179 membuat thread pekerja&mdash;khususnya jika operasi mungkin akan berlangsung lebih lama daripada ak…
184 menjalankan layanan daripada hanya menempatkan operasi yang menghabiskan waktu di thread.</p>
191 <p>Bila aplikasi diluncurkan, sistem akan membuat thread eksekusi untuk aplikasi tersebut, yang dib…
193 antarmuka pengguna yang sesuai, termasuk kejadian menggambar. Ini juga merupakan thread yang
[all …]
/frameworks/base/docs/html/training/multiple-threads/
Drun-code.jd32 The previous lesson showed you how to define a class that manages thread pools and the tasks
33 that run on them. This lesson shows you how to run a task on a thread pool. To do this,
34 you add the task to the pool's work queue. When a thread becomes available, the
36 thread.
41 time, you can cancel the thread the task is running on. For example, if you are downloading
48 To start a task object on a thread in a particular thread pool, pass the
50 ThreadPoolExecutor.execute()}. This call adds the task to the thread pool's work queue. When an
51 idle thread becomes available, the manager takes the task that has been waiting the longest and
52 runs it on the thread:
72 thread, it automatically calls the object's {@link java.lang.Runnable#run run()} method.
[all …]
Dcommunicate-ui.jd31 In the previous lesson you learned how to start a task on a thread managed by
33 from the task to objects running on the user interface (UI) thread. This feature allows your
37 Every app has its own special thread that runs UI objects such as {@link android.view.View}
38 objects; this thread is called the UI thread. Only objects running on the UI thread have access
39 to other objects on that thread. Because tasks that you run on a thread from a thread pool
40 <em>aren't</em> running on your UI thread, they don't have access to UI objects. To move data
41 from a background thread to the UI thread, use a {@link android.os.Handler} that's
42 running on the UI thread.
48 Normally, you create a {@link android.os.Handler} for a new thread, but you can
49 also create a {@link android.os.Handler} that's connected to an existing thread.
[all …]
Dcreate-threadpool.jd35 separate thread. If you only want to run the task once, this may be all you need. If you want
40 {@link java.util.concurrent.ThreadPoolExecutor}, which runs a task from a queue when a thread
44 A thread pool can run multiple parallel instances of a task, so you should ensure that your
45 code is thread-safe. Enclose variables that can be accessed by more than one thread in a
46 <code>synchronized</code> block. This approach will prevent one thread from reading the variable
60 Use static variables for thread pools
63 You may only want a single instance of a thread pool for your app, in order to have a
65 {@link java.lang.Runnable} types, you may want to have a thread pool for each one, but each
89 * Constructs the work queues and thread pools used to download
99 Start your tasks by calling methods in the thread pool class.
[all …]
Dindex.jd47 separate thread.
51 thread pool object. You'll also learn how to define code to run on a thread and how to
52 communicate between one of these threads and the UI thread.
75 Learn how to run a {@link java.lang.Runnable} on a thread from the thread pool.
81 Learn how to communicate from a thread in the thread pool to the UI thread.
Ddefine-runnable.jd33 in its {@link java.lang.Runnable#run Runnable.run()} method on a separate thread. You can also
34 pass a {@link java.lang.Runnable} to another object that can then attach it to a thread and
56 * Code you want to run on the thread goes here
67 though, that the {@link java.lang.Runnable} won't be running on the UI thread, so it can't
69 the UI thread, you have to use the techniques described in the lesson
73 At the beginning of the {@link java.lang.Runnable#run run()} method, set the thread to use
77 resource competition between the {@link java.lang.Runnable} object's thread and the UI
78 thread.
/frameworks/base/libs/hwui/renderthread/
DRenderProxy.cpp60 CREATE_BRIDGE4(createContext, RenderThread* thread, bool translucent, in CREATE_BRIDGE4() argument
62 return new CanvasContext(*args->thread, args->translucent, in CREATE_BRIDGE4()
72 args->thread = &mRenderThread; in RenderProxy()
253 CREATE_BRIDGE2(invokeFunctor, RenderThread* thread, Functor* functor) { in CREATE_BRIDGE2() argument
254 CanvasContext::invokeFunctor(*args->thread, args->functor); in CREATE_BRIDGE2()
260 RenderThread& thread = RenderThread::getInstance(); in invokeFunctor() local
262 args->thread = &thread; in invokeFunctor()
270 thread.queue(task); in invokeFunctor()
358 CREATE_BRIDGE2(trimMemory, RenderThread* thread, int level) { in CREATE_BRIDGE2() argument
359 CanvasContext::trimMemory(*args->thread, args->level); in CREATE_BRIDGE2()
[all …]
/frameworks/base/docs/html/topic/performance/
Dthreads.jd40 working with the UI, or main, thread; the relationship between app lifecycle and
41 thread priority; and, methods that the platform provides to help manage thread
49 process</a> along with an execution thread. This <strong>main thread,</strong>
50 also known as the UI thread, is responsible for everything that happens
52 main thread for the best possible performance.
56 The main thread has a very simple design: Its only job is to take and execute
57 blocks of work from a thread-safe work queue until its app is terminated. The
67 layout inflation, or draw. When something triggers an event, the thread where the event
68 happened pushes the event out of itself, and into the main thread’s message
69 queue. The main thread can then service the event.
[all …]
/frameworks/base/docs/html/guide/components/
Dprocesses-and-threads.jd29 running, the Android system starts a new Linux process for the application with a single thread of
30 execution. By default, all components of the same application run in the same process and thread
31 (called the "main" thread). If an application component starts and there already exists a process
33 started within that process and uses the same thread of execution. However, you can arrange for
182 simply create a worker thread&mdash;particularly if the operation will likely outlast the activity.
187 employ services rather than simply put time-consuming operations in a thread.</p>
194 <p>When an application is launched, the system creates a thread of execution for the application,
195 called "main." This thread is very important because it is in charge of dispatching events to
196 the appropriate user interface widgets, including drawing events. It is also the thread in which
198 android.widget} and {@link android.view} packages). As such, the main thread is also sometimes
[all …]
/frameworks/opt/telephony/src/java/com/google/android/mms/util/
DPduCache.java104 HashSet<Uri> thread = mThreads.get(threadId); in put() local
105 if (thread == null) { in put()
106 thread = new HashSet<Uri>(); in put()
107 mThreads.put(threadId, thread); in put()
114 thread.add(finalKey); in put()
232 HashSet<Uri> thread = mThreads.get(entry.getThreadId()); in removeFromThreads() local
233 if (thread != null) { in removeFromThreads()
234 thread.remove(key); in removeFromThreads()
243 HashSet<Uri> thread = mThreads.remove(threadId); in purgeByThreadId() local
244 if (thread != null) { in purgeByThreadId()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/
DContentQueryMapTest.java56 LooperThread thread = new LooperThread() { in testContentQueryMap() local
101 thread.start(); in testContentQueryMap()
102 thread.join(); in testContentQueryMap()
103 if (thread.mError != null) throw thread.mError; in testContentQueryMap()
104 assertTrue(thread.mSuccess); in testContentQueryMap()
/frameworks/base/docs/html/training/articles/
Dperf-anr.jd55 (frequently a network access) on the UI thread so the system can't
58 structure or computing the next move in a game on the UI thread. It's always important to make
63 <strong>you should not perform the work on the UI thread</strong>, but instead create a
64 worker thread and do most of the work there. This keeps the UI thread (which drives the user
86 <p>Android applications normally run entirely on a single thread by default
87 the "UI thread" or "main thread").
88 This means anything your application is doing in the UI thread that
93 <p>Therefore, any method that runs in the UI thread should do as little work
94 as possible on that thread. In particular, activities should do as little as possible to set
99 resizing bitmaps should be done in a worker thread (or in the case of databases
[all …]
/frameworks/av/media/libstagefright/foundation/
DALooper.cpp133 sp<LooperThread> thread; in stop() local
139 thread = mThread; in stop()
145 if (thread == NULL && !runningLocally) { in stop()
149 if (thread != NULL) { in stop()
150 thread->requestExit(); in stop()
159 if (!runningLocally && !thread->isCurrentThread()) { in stop()
162 thread->requestExitAndWait(); in stop()
/frameworks/base/libs/hwui/tests/microbench/
DFrameBuilderBench.cpp62 TestUtils::runOnRenderThread([&state](RenderThread& thread) { in BM_FrameBuilder_defer() argument
75 TestUtils::runOnRenderThread([&state](RenderThread& thread) { in BM_FrameBuilder_deferAndRender() argument
78 RenderState& renderState = thread.renderState(); in BM_FrameBuilder_deferAndRender()
115 TestUtils::runOnRenderThread([&state](RenderThread& thread) { in BM_FrameBuilder_defer_scene() argument
131 TestUtils::runOnRenderThread([&state](RenderThread& thread) { in BM_FrameBuilder_deferAndRender_scene() argument
136 RenderState& renderState = thread.renderState(); in BM_FrameBuilder_deferAndRender_scene()
/frameworks/opt/bitmap/src/com/android/bitmap/
DNamedThreadFactory.java35 final Thread thread = mDefaultThreadFactory.newThread(runnable); in newThread() local
36 thread.setName(mBaseName + "-" + mCount.getAndIncrement()); in newThread()
37 return thread; in newThread()
/frameworks/base/docs/html/training/improving-layouts/
Dsmooth-scrolling.jd33 thread (the UI thread) free from heavy processing. Ensure you do any disk access, network access, or
34 SQL access in a separate thread. To test the status of your app, you can enable {@link
40 <p>Using a background thread ("worker thread") removes strain from the main thread so it can focus
42 perform your work outside the main thread. {@link android.os.AsyncTask} automatically queues up all
45 own thread pool.</p>
48 images in a background thread, then apply them to the UI once finished. It also shows a
52 // Using an AsyncTask to load the slow images in a background thread
/frameworks/volley/src/main/java/com/android/volley/
DVolleyLog.java116 public final long thread; field in VolleyLog.MarkerLog.Marker
119 public Marker(String name, long thread, long time) { in Marker() argument
121 this.thread = thread; in Marker()
155 d("(+%-4d) [%2d] %s", (thisTime - prevTime), marker.thread, marker.name); in finish()
/frameworks/base/core/tests/coretests/src/android/database/
DDatabaseLockTest.java93 Thread thread = new DatabaseFairnessThread(); in startDatabaseFairnessThread() local
94 thread.start(); in startDatabaseFairnessThread()
150 Thread thread = new DatabaseLatencyThread(); in startDatabaseLatencyThread() local
151 thread.start(); in startDatabaseLatencyThread()
/frameworks/base/docs/html/training/volley/
Dsimple.jd33 back to the main thread for delivery.</p>
82 <p>Volley always delivers parsed responses on the main thread. Running on the main thread
98 <p>When you call {@code add()}, Volley runs one cache processing thread and a pool of
100 thread and triaged: if the request can be serviced from cache, the cached response is
101 parsed on the cache thread and the parsed response is delivered on the main thread. If the
103 available network thread takes the request from the queue, performs the HTTP transaction,
104 parses the response on the worker thread, writes the response to cache, and posts the parsed
105 response back to the main thread for delivery.</p>
108 threads. You can add a request from any thread, but responses are always delivered on the
109 main thread.</p>

12345678910>>...13