Searched refs:pool (Results 1 - 25 of 27) sorted by relevance

12

/frameworks/volley/tests/src/com/android/volley/toolbox/
H A DByteArrayPoolTest.java23 ByteArrayPool pool = new ByteArrayPool(32);
25 byte[] buf1 = pool.getBuf(16);
26 byte[] buf2 = pool.getBuf(16);
28 pool.returnBuf(buf1);
29 pool.returnBuf(buf2);
31 byte[] buf3 = pool.getBuf(16);
32 byte[] buf4 = pool.getBuf(16);
39 ByteArrayPool pool = new ByteArrayPool(32);
41 byte[] buf1 = pool.getBuf(16);
42 byte[] buf2 = pool
[all...]
H A DPoolingByteArrayOutputStreamTest.java28 ByteArrayPool pool = new ByteArrayPool(32768);
29 writeOneBuffer(pool);
30 writeOneBuffer(pool);
31 writeOneBuffer(pool);
35 ByteArrayPool pool = new ByteArrayPool(32768);
36 writeBytesIndividually(pool);
37 writeBytesIndividually(pool);
38 writeBytesIndividually(pool);
42 ByteArrayPool pool = new ByteArrayPool(0);
43 writeOneBuffer(pool);
55 writeOneBuffer(ByteArrayPool pool) argument
66 writeBytesIndividually(ByteArrayPool pool) argument
[all...]
/frameworks/testing/espresso/espresso-lib/src/main/java/com/google/android/apps/common/testing/ui/espresso/base/
H A DAsyncTaskPoolMonitor.java39 private final ThreadPoolExecutor pool; field in class:AsyncTaskPoolMonitor
42 AsyncTaskPoolMonitor(ThreadPoolExecutor pool) { argument
43 this.pool = checkNotNull(pool);
47 * Checks if the pool is idle at this moment.
49 * @return true if the pool is idle, false otherwise.
52 if (!pool.getQueue().isEmpty()) {
55 int activeCount = pool.getActiveCount();
68 * Notifies caller once the pool is idle.
70 * We check for idle-ness by submitting the max # of tasks the pool wil
[all...]
/frameworks/base/libs/androidfw/tests/
H A DIdmap_test.cpp76 const ResStringPool* pool = mTargetTable.getTableStringBlock(block); local
77 ASSERT_TRUE(pool != NULL);
78 ASSERT_LT(val.data, pool->size());
81 const char16_t* targetStr16 = pool->stringAt(val.data, &strLen);
91 pool = mTargetTable.getTableStringBlock(newBlock);
92 ASSERT_TRUE(pool != NULL);
93 ASSERT_LT(val.data, pool->size());
95 targetStr16 = pool->stringAt(val.data, &strLen);
H A DResTable_test.cpp57 const ResStringPool* pool = table.getTableStringBlock(block); local
58 ASSERT_TRUE(NULL != pool);
59 ASSERT_EQ(String8("test1"), pool->string8ObjectAt(val.data));
/frameworks/volley/src/com/android/volley/toolbox/
H A DPoolingByteArrayOutputStream.java23 * A variation of {@link java.io.ByteArrayOutputStream} that uses a pool of byte[] buffers instead
39 public PoolingByteArrayOutputStream(ByteArrayPool pool) { argument
40 this(pool, DEFAULT_SIZE);
51 public PoolingByteArrayOutputStream(ByteArrayPool pool, int size) { argument
52 mPool = pool;
H A DBasicNetwork.java68 // If a pool isn't passed in, then build a small default pool that will give us a lot of
75 * @param pool a buffer pool that improves GC performance in copy operations
77 public BasicNetwork(HttpStack httpStack, ByteArrayPool pool) { argument
79 mPool = pool;
/frameworks/base/media/mca/filterfw/jni/
H A Djni_util.h101 // Return the shared instance to this type's pool.
106 // Delete this type's pool.
111 // Register a new C++ object with the pool. This does not affect the Java
113 // assignments. Pass true to owns if the object pool owns the object.
122 // Return the object in the pool with the specified ID.
140 // object. Pass true to owns if the object pool owns the object.
150 // Remove the object with the given ID from this pool, and delete it. This
213 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
214 return pool ? pool
222 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
236 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
246 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
[all...]
/frameworks/base/tools/aapt/
H A DStringPool.cpp34 void printStringPool(const ResStringPool* pool) argument
36 if (pool->getError() == NO_INIT) {
37 printf("String pool is unitialized.\n");
39 } else if (pool->getError() != NO_ERROR) {
40 printf("String pool is corrupt/invalid.\n");
45 const size_t N = pool->size();
48 if (pool->isUTF8()) {
49 uniqueStrings.add(pool->string8At(i, &len));
51 uniqueStrings.add(pool->stringAt(i, &len));
55 printf("String pool o
355 sp<AaptFile> pool = new AaptFile(String8(), AaptGroupEntry(), local
371 writeStringBlock(const sp<AaptFile>& pool) argument
[all...]
H A DStringPool.h31 void printStringPool(const ResStringPool* pool);
35 * generating the string pool resource data structure that can be parsed with
88 * Add a new string to the pool. If mergeDuplicates is true, thenif
120 status_t writeStringBlock(const sp<AaptFile>& pool);
123 * Find out an offset in the pool for a particular string. If the string
124 * pool is sorted, this can not be called until after createStringBlock()
127 * multiple times in the pool, the first offset will be returned. Returns
133 * Find all of the offsets in the pool for a particular string. If the
134 * string pool is sorted, this can not be called until after
146 // that will be generated for the final string pool
[all...]
H A DResourceTable.h228 bool stringToValue(Res_value* outValue, StringPool* pool,
353 // Index of the entry's name string in the key pool.
H A DResource.cpp456 const ResStringPool* pool = &parser.getStrings(); local
468 pool = table.getTableStringBlock(strIdx);
470 if (pool != NULL) {
471 str = pool->stringAt(value.data, &len);
485 if (pool == NULL) {
491 if ((str=pool->stringAt(value.data, &len)) == NULL) {
951 fprintf(stderr, "ERROR: failed to get XML element name (bad string pool)\n");
/frameworks/testing/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/base/
H A DIdlingResourceIntegrationTest.java86 private final ScheduledExecutorService pool; field in class:IdlingResourceIntegrationTest.ResettingIdlingResource
93 this.pool = Executors.newScheduledThreadPool(1);
103 pool.schedule(new Runnable() {
/frameworks/base/tests/CoreTests/android/core/
H A DTestWebServer.java407 Vector pool = threads;
408 synchronized (pool) {
409 if (pool.size() >= workers) {
414 pool.addElement(this);
/frameworks/base/tools/layoutlib/rename_font/
H A Dbuild_font.py93 pool = Pool(processes=None)
94 pool.map(convert_font, input_fonts)
/frameworks/base/core/java/android/os/
H A DParcel.java297 * Retrieve a new Parcel object from the pool.
300 final Parcel[] pool = sOwnedPool;
301 synchronized (pool) {
304 p = pool[i];
306 pool[i] = null;
318 * Put a Parcel object back into the pool. You must not touch
325 final Parcel[] pool;
327 pool = sOwnedPool;
330 pool = sHolderPool;
333 synchronized (pool) {
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDatabase.java104 // It is ok to hold the lock while reconfiguring the connection pool or dumping
120 // The connection pool for the database, null when closed.
121 // The pool itself is thread-safe, but the reference to it can only be acquired
276 final SQLiteConnectionPool pool;
285 pool = mConnectionPoolLocked;
294 if (pool != null) {
295 pool.close();
363 final SQLiteConnectionPool pool;
366 pool = mConnectionPoolLocked;
368 return new SQLiteSession(pool);
[all...]
H A DSQLiteConnectionPool.java37 * Maintains a pool of active SQLite database connections.
39 * At any given time, a connection is either owned by the pool, or it has been
42 * back to the pool.
44 * The pool holds strong references to the connections it owns. However,
47 * that the connection pool can detect when connections have been improperly
50 * The connection pool is thread-safe (but the connections themselves are not).
76 // and logging a message about the connection pool being busy.
96 // Describes what should happen to an acquired connection when it is returned to the pool.
98 // The connection should be returned to the pool as usual.
142 * The connection pool ca
[all...]
H A DSQLiteConnection.java55 * perform a database operation and are then returned to the pool. At any
160 private SQLiteConnection(SQLiteConnectionPool pool, argument
163 mPool = pool;
187 static SQLiteConnection open(SQLiteConnectionPool pool, argument
190 SQLiteConnection connection = new SQLiteConnection(pool, configuration,
482 * To take advantage of this behavior as an optimization, the connection pool
1220 // Next item in pool.
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
H A DBaseRecyclerViewInstrumentationTest.java164 RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() {
183 mRecyclerView.setRecycledViewPool(pool);
H A DLinearLayoutManagerTest.java390 final RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() {
412 pool.setMaxRecycledViews(mTestAdapter.getItemViewType(0), 500);
413 mRecyclerView.setRecycledViewPool(pool);
/frameworks/base/core/jni/
H A Dandroid_util_AssetManager.cpp1819 const ResStringPool* pool = res.getTableStringBlock(block); local
1820 const char* str8 = pool->string8At(value.data, &strLen);
1824 const char16_t* str16 = pool->stringAt(value.data, &strLen);
/frameworks/base/include/androidfw/
H A DResourceTypes.h214 // pool back to resource identifiers. It is optional.
264 // global value string pool.
374 * Reference to a string in a string pool.
378 // Index into the string pool table (uint32_t-offset from the indices
380 // of the string data in the pool.
393 * Definition for a pool of strings. The data of this chunk is an
394 * array of uint32_t providing indices into the pool, relative to
411 // Number of strings in this pool (number of uint32_t indices that follow
415 // Number of style span arrays in the pool (number of uint32_t indices
425 // String pool i
[all...]
/frameworks/base/core/java/com/android/internal/os/
H A DBatteryStatsImpl.java1428 // this new one to the pool.
1430 // Add this timer to the active pool
1472 // active in the pool, before taking this one out of the pool.
1474 // Remove this timer from the active pool
1506 final ArrayList<StopwatchTimer> pool, StopwatchTimer self) {
1508 final int N = pool.size();
1510 final StopwatchTimer t = pool.get(i);
5194 * proper timer pool from the given BatteryStatsImpl object.
5199 private StopwatchTimer readTimerFromParcel(int type, ArrayList<StopwatchTimer> pool, argument
1505 refreshTimersLocked(long batteryRealtime, final ArrayList<StopwatchTimer> pool, StopwatchTimer self) argument
[all...]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
H A DRecyclerView.java493 * When adapter is changed, all existing views are recycled back to the pool. If the pool has
681 * if no pool is set for this view a new one will be created. See
684 * @return The pool used to store recycled item views for reuse.
692 * Recycled view pools allow multiple RecyclerViews to share a common pool of scrap views.
697 * @param pool Pool to set. If this parameter is null a new pool will be created and used.
699 public void setRecycledViewPool(RecycledViewPool pool) { argument
700 mRecycler.setRecycledViewPool(pool);
716 * {@link #getRecycledViewPool() recycled view pool}
3850 setRecycledViewPool(RecycledViewPool pool) argument
[all...]

Completed in 5902 milliseconds

12