Home
last modified time | relevance | path

Searched refs:Thread (Results 1 – 25 of 780) sorted by relevance

12345678910>>...32

/frameworks/base/core/java/android/widget/
DRemoteViewsService.java182 Thread t = Thread.currentThread(); in onDataSetChanged()
183 Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); in onDataSetChanged()
194 Thread t = Thread.currentThread(); in getCount()
195 Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); in getCount()
207 Thread t = Thread.currentThread(); in getViewAt()
208 Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); in getViewAt()
217 Thread t = Thread.currentThread(); in getLoadingView()
218 Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); in getLoadingView()
227 Thread t = Thread.currentThread(); in getViewTypeCount()
228 Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); in getViewTypeCount()
[all …]
/frameworks/base/packages/SystemUI/customization/src/com/android/systemui/util/
DAssert.java28 private static Thread sTestThread = null;
36 public static void setTestThread(Thread thread) { in setTestThread()
57 Thread currentThread = Thread.currentThread(); in runWithCurrentThreadAsMainThread()
58 Thread originalThread = sTestThread; in runWithCurrentThreadAsMainThread()
75 && (sTestThread == null || sTestThread != Thread.currentThread())) { in isMainThread()
78 + " Thread.currentThread()=" + Thread.currentThread().getName()); in isMainThread()
89 && (sTestThread == null || sTestThread != Thread.currentThread())) { in isCurrentThread()
93 + Thread.currentThread().getName()); in isCurrentThread()
99 && (sTestThread == null || sTestThread == Thread.currentThread())) { in isNotMainThread()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DTonesAutoTest.java44 Thread.sleep(200); in tonesDtmfTest()
46 Thread.sleep(100); in tonesDtmfTest()
69 Thread.sleep(2000); in tonesSupervisoryTest()
71 Thread.sleep(200); in tonesSupervisoryTest()
81 Thread.sleep(5000); in tonesSupervisoryTest()
83 Thread.sleep(200); in tonesSupervisoryTest()
105 Thread.sleep(1000); in tonesProprietaryTest()
107 Thread.sleep(100); in tonesProprietaryTest()
130 Thread.sleep(100); in tonesSimultaneousTest()
132 Thread.sleep(500); in tonesSimultaneousTest()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DWatchdogDiagnosticsTest.java35 private static class TestThread1 extends Thread {
65 private static class TestThread2 extends Thread {
113 Thread.yield(); in printAnnotatedStack()
119 Thread.yield(); in printAnnotatedStack()
123 while (thread1.getState() == Thread.State.RUNNABLE) { in printAnnotatedStack()
124 Thread.yield(); in printAnnotatedStack()
126 while (thread2.getState() == Thread.State.RUNNABLE) { in printAnnotatedStack()
127 Thread.yield(); in printAnnotatedStack()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/system/
DUncaughtExceptionPreHandlerTest.kt6 import java.lang.Thread.UncaughtExceptionHandler
29 Thread.setUncaughtExceptionPreHandler(null) in setUp()
37 preHandlerManager.handleUncaughtException(Thread.currentThread(), Exception()) in registerHandler_registersOnceOnly()
43 Thread.setUncaughtExceptionPreHandler(null) in registerHandler_setsUncaughtExceptionPreHandler()
45 assertThat(Thread.getUncaughtExceptionPreHandler()).isNotNull() in registerHandler_setsUncaughtExceptionPreHandler()
50 Thread.setUncaughtExceptionPreHandler(mockHandler) in registerHandler_preservesOriginalHandler()
52 preHandlerManager.handleUncaughtException(Thread.currentThread(), Exception()) in registerHandler_preservesOriginalHandler()
62 preHandlerManager.handleUncaughtException(Thread.currentThread(), Exception()) in registerHandler_toleratesHandlersThatThrow()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DActivityManagerInternalTest.java149 static class CustomThread extends Thread {
177 Thread.interrupted(); in run()
181 mNotified = !Thread.interrupted(); in run()
191 final Thread.State stateToReach = timedWaiting in startAndWait()
192 ? Thread.State.TIMED_WAITING : Thread.State.WAITING; in startAndWait()
195 Thread.sleep(WAIT_INTERVAL_MS); in startAndWait()
205 assertEquals(errMsg, Thread.State.WAITING, getState()); in assertWaiting()
209 assertEquals(errMsg, Thread.State.TIMED_WAITING, getState()); in assertTimedWaiting()
214 while (getState() != Thread.State.TERMINATED in assertTerminated()
216 Thread.sleep(WAIT_INTERVAL_MS); in assertTerminated()
[all …]
/frameworks/base/libs/hwui/platform/host/thread/
DThreadBase.h29 class ThreadBase : public Thread {
33 ThreadBase() : Thread(false), mQueue([this]() { mCondition.notify_all(); }, mLock) {} in ThreadBase()
37 void requestExit() { Thread::requestExit(); } in requestExit()
39 void start(const char* name = "ThreadBase") { Thread::run(name); }
41 void join() { Thread::join(); } in join()
43 bool isRunning() const { return Thread::isRunning(); } in isRunning()
/frameworks/base/core/tests/coretests/src/android/database/
DDatabaseLockTest.java83 Thread.currentThread().sleep(SLEEP_TIME); in testLockFairness()
95 Thread thread = new DatabaseFairnessThread(); in startDatabaseFairnessThread()
99 private class DatabaseFairnessThread extends Thread {
106 Thread.sleep(SLEEP_TIME); in run()
136 Thread.sleep(SLEEP_TIME); in testLockLatency()
152 Thread thread = new DatabaseLatencyThread(); in startDatabaseLatencyThread()
156 private class DatabaseLatencyThread extends Thread {
163 Thread.sleep(SLEEP_TIME); in run()
/frameworks/base/libs/hwui/platform/android/thread/
DThreadBase.h30 class ThreadBase : public Thread {
35 : Thread(false) in ThreadBase()
42 Thread::requestExit(); in requestExit()
46 void start(const char* name = "ThreadBase") { Thread::run(name); }
48 void join() { Thread::join(); } in join()
50 bool isRunning() const { return Thread::isRunning(); } in isRunning()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DFgsLoggerTest.java145 Thread.sleep(2000); in testApiStartStopNoFgs()
161 Thread.sleep(2000); in testApiStartStopFgs()
189 Thread.sleep(2000); in testFgsStartStopApiStartStop()
205 Thread.sleep(1000); in testMultipleStartStopApis()
212 Thread.sleep(1000); in testMultipleStartStopApis()
241 Thread.sleep(1000); in testMultipleStartStopApis()
243 Thread.sleep(1000); in testMultipleStartStopApis()
262 Thread.sleep(1000); in testMultipleStartStops()
269 Thread.sleep(1000); in testMultipleStartStops()
308 Thread.sleep(1000); in testMultipleStartStops()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DUncaughtExceptionPreHandlerManager.kt4 import java.lang.Thread.UncaughtExceptionHandler
31 val currentHandler = Thread.getUncaughtExceptionPreHandler() in checkGlobalHandlerSetup()
37 Thread.setUncaughtExceptionPreHandler(globalUncaughtExceptionPreHandler) in checkGlobalHandlerSetup()
53 fun handleUncaughtException(thread: Thread?, throwable: Throwable?) { in handleUncaughtException()
67 override fun uncaughtException(thread: Thread?, throwable: Throwable?) { in uncaughtException()
/frameworks/base/core/tests/coretests/src/android/animation/
DValueAnimatorTests.java105 Thread.sleep(a.getTotalDuration()); in testStartDelay()
114 Thread.sleep(a.getTotalDuration()); in testStartDelay()
147 Thread.sleep(POLL_INTERVAL); in testListenerCallbacks()
169 Thread.sleep(POLL_INTERVAL); in testListenerCallbacks()
174 Thread.sleep(delay); in testListenerCallbacks()
214 Thread.sleep(POLL_INTERVAL); in testIsStarted()
226 Thread.sleep(startDelay); in testIsStarted()
236 Thread.sleep(delay); in testIsStarted()
266 Thread.sleep(POLL_INTERVAL); in testPause()
279 Thread.sleep(a2.getTotalDuration()); in testPause()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/text/
DStaticLayoutMultithreadPerfTest.java53 private Thread[] startBackgroundThread(int numOfThreads) { in startBackgroundThread()
57 Thread[] threads = new Thread[numOfThreads]; in startBackgroundThread()
60 threads[i] = new Thread(new Runnable() { in startBackgroundThread()
89 private void finishThreads(Thread[] threads) { in finishThreads()
91 for (Thread thread : threads) { in finishThreads()
105 Thread[] threads = startBackgroundThread(numOfTotalThreads - 1); in runRandomTest()
/frameworks/base/core/java/com/android/internal/util/
DConcurrentUtils.java60 public Thread newThread(final Runnable r) { in newFixedThreadPool()
61 return new Thread(poolName + threadNum.incrementAndGet()) { in newFixedThreadPool()
88 Thread.currentThread().interrupt();
114 Thread.currentThread().interrupt();
123 if (Thread.holdsLock(lock)) {
132 if (!Thread.holdsLock(lock)) {
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DAsyncUserVisibilityListener.java49 private final Thread mExpectedReceiverThread;
59 private AsyncUserVisibilityListener(Expect expect, Thread expectedReceiverThread, in AsyncUserVisibilityListener()
70 Thread callingThread = Thread.currentThread(); in onUserVisibilityChanged()
133 Thread.sleep(WAIT_NO_EVENTS_TIMEOUT_MS); in waitForEvents()
160 private final Thread mExpectedReceiverThread;
162 public Factory(Expect expect, Thread expectedReceiverThread) { in Factory()
/frameworks/libs/binary_translation/tests/ndk_program_tests/
Dthread_test.cc27 TEST(Thread, CreateJoin) { in TEST() argument
81 TEST(Thread, Keys) { in TEST() argument
105 TEST(Thread, Once) { in TEST() argument
116 TEST(Thread, PThreadAttr) { in TEST() argument
133 TEST(Thread, CreateWithAttrs) { in TEST() argument
146 TEST(Thread, PushPop) { in TEST() argument
160 TEST(Thread, GetTid) { in TEST() argument
172 TEST(Thread, GetSetPriority) { in TEST() argument
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DMutexFileProvider.java44 private Thread mOwnerThread;
63 if (mOwnerThread == Thread.currentThread()) { in acquireFile()
82 mOwnerThread = Thread.currentThread(); in acquireFile()
95 if (mOwnerThread != Thread.currentThread()) { in releaseFile()
/frameworks/base/services/tests/voiceinteractiontests/src/com/android/server/soundtrigger_middleware/
DUptimeTimerTest.java38 Thread.sleep(50); in testBasic()
40 Thread.sleep(100); in testBasic()
51 Thread.sleep(50); in testCancel()
54 Thread.sleep(100); in testCancel()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
DThreadUtilsTest.java33 Thread background = new Thread(() -> assertThat(ThreadUtils.isMainThread()).isFalse()); in testMainThread()
41 Thread background = new Thread(() -> { in testEnsureMainThread()
/frameworks/base/core/java/com/android/internal/view/
DWindowManagerPolicyThread.java27 static Thread mThread;
30 public static void set(Thread thread, Looper looper) { in set()
35 public static Thread getThread() { in getThread()
/frameworks/base/services/core/java/com/android/server/
DLockGuard.java112 if (lock == null || Thread.holdsLock(lock)) return lock; in guard()
121 if (Thread.holdsLock(child)) { in guard()
122 doLog(lock, "Calling thread " + Thread.currentThread().getName() in guard()
136 if (Thread.holdsLock(test)) { in guard()
152 if (lock != null && Thread.holdsLock(lock)) { in guard()
157 doLog(targetMayBeNull, "Calling thread " + Thread.currentThread().getName() in guard()
171 new Thread(() -> Slog.wtf(TAG, stackTrace)).start(); in doLog()
/frameworks/rs/script_api/
Drs_atomic.spec39 summary: Thread-safe addition
58 summary: Thread-safe bitwise and
79 summary: Thread-safe compare and set
102 summary: Thread-safe decrement
119 summary: Thread-safe increment
137 summary: Thread-safe maximum
157 summary: Thread-safe minimum
177 summary: Thread-safe bitwise or
197 summary: Thread-safe subtraction
216 summary: Thread-safe bitwise exclusive or
/frameworks/base/core/tests/coretests/src/android/os/storage/
DStorageManagerIntegrationTest.java140 assertNotSame(Thread.State.TERMINATED, factory.thread.getState()); in testOpenProxyFileDescriptor()
147 assertEquals(Thread.State.TERMINATED, factory.thread.getState()); in testOpenProxyFileDescriptor()
152 assertNotSame(Thread.State.TERMINATED, factory.thread.getState()); in testOpenProxyFileDescriptor()
158 Thread thread = null;
161 public Thread newThread(Runnable r) { in newThread()
162 thread = new Thread(r); in newThread()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/unfold/progress/
DTestUnfoldProgressListener.kt29 var lastCallbackThread: Thread? = null
33 lastCallbackThread = Thread.currentThread() in onTransitionStarted()
42 lastCallbackThread = Thread.currentThread() in onTransitionProgress()
50 lastCallbackThread = Thread.currentThread() in onTransitionFinishing()
58 lastCallbackThread = Thread.currentThread() in onTransitionFinished()
/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/src/com/android/framework/multidexlegacytestservices/test2/
DServicesTests.java141 Thread startServices = in testRecoverFromZipCorruptionStressTest()
142 new Thread() { in testRecoverFromZipCorruptionStressTest()
153 Thread.sleep(1000); in testRecoverFromZipCorruptionStressTest()
169 Thread startServices = in testRecoverFromDexCorruptionStressTest()
170 new Thread() { in testRecoverFromDexCorruptionStressTest()
181 Thread.sleep(1000); in testRecoverFromDexCorruptionStressTest()
212 Thread.sleep((i - 1) * (1 << (i / 5))); in startServices()
244 Thread.sleep(5000); in waitServicesCompletion()
260 Thread.sleep(5000); in waitServicesCompletion()

12345678910>>...32