Home
last modified time | relevance | path

Searched refs:maxSize (Results 1 – 25 of 87) sorted by relevance

1234

/frameworks/base/core/java/android/util/
DLruCache.java70 private int maxSize; field in LruCache
83 public LruCache(int maxSize) { in LruCache() argument
84 if (maxSize <= 0) { in LruCache()
87 this.maxSize = maxSize; in LruCache()
96 public void resize(int maxSize) { in resize() argument
97 if (maxSize <= 0) { in resize()
102 this.maxSize = maxSize; in resize()
104 trimToSize(maxSize); in resize()
156 trimToSize(maxSize); in get()
186 trimToSize(maxSize); in put()
[all …]
/frameworks/native/services/surfaceflinger/DisplayHardware/
DFramebufferSurface.cpp61 const ui::Size& size, const ui::Size& maxSize) in FramebufferSurface() argument
64 mMaxSize(maxSize), in FramebufferSurface()
186 ui::Size FramebufferSurface::limitSizeInternal(const ui::Size& size, const ui::Size& maxSize) { in limitSizeInternal() argument
189 if (size.width > maxSize.width && maxSize.width != 0) { in limitSizeInternal()
191 limitedSize.height = maxSize.width / aspectRatio; in limitSizeInternal()
192 limitedSize.width = maxSize.width; in limitSizeInternal()
195 if (limitedSize.height > maxSize.height && maxSize.height != 0) { in limitSizeInternal()
197 limitedSize.height = maxSize.height; in limitSizeInternal()
198 limitedSize.width = maxSize.height * aspectRatio; in limitSizeInternal()
/frameworks/base/services/core/java/com/android/server/textclassifier/
DFixedSizeQueue.java46 public FixedSizeQueue(int maxSize, @Nullable OnEntryEvictedListener<E> onEntryEvictedListener) { in FixedSizeQueue() argument
47 Preconditions.checkArgument(maxSize > 0, "maxSize (%s) must > 0", maxSize); in FixedSizeQueue()
48 mDelegate = new ArrayDeque<>(maxSize); in FixedSizeQueue()
49 mMaxSize = maxSize; in FixedSizeQueue()
/frameworks/av/media/libeffects/dynamicsproc/dsp/
DSHCircularBuffer.h30 explicit SHCircularBuffer(size_t maxSize) { in SHCircularBuffer() argument
31 resize(maxSize); in SHCircularBuffer()
33 void resize(size_t maxSize) { in resize() argument
34 mBuffer.resize(maxSize); in resize()
/frameworks/av/services/mediametrics/
DStringUtils.h151 inline std::string bytesToString(const std::vector<uint8_t>& bytes, size_t maxSize = SIZE_MAX) {
158 maxSize = std::min(maxSize, bytes.size());
159 for (size_t i = 0; i < maxSize; ++i) {
162 if (maxSize != bytes.size()) {
/frameworks/av/services/camera/libcameraservice/api1/client2/
DJpegProcessor.cpp348 size_t JpegProcessor::findJpegSize(uint8_t* jpegBuffer, size_t maxSize) { in findJpegSize() argument
352 uint8_t *header = jpegBuffer + (maxSize - sizeof(struct camera2_jpeg_blob)); in findJpegSize()
356 if (size > 0 && size <= maxSize - sizeof(struct camera2_jpeg_blob)) { in findJpegSize()
379 while (size <= maxSize - MARKER_LENGTH) { in findJpegSize()
386 if (type == EOI || size > maxSize - sizeof(segment_t)) { in findJpegSize()
398 for ( ; size <= maxSize - MARKER_LENGTH; size++) { in findJpegSize()
410 if (size > maxSize) { in findJpegSize()
411 ALOGW("JPEG size %zu too large, reducing to maxSize %zu", size, maxSize); in findJpegSize()
412 size = maxSize; in findJpegSize()
/frameworks/native/cmds/idlcli/vibrator/
DCommandGetPwleCompositionSizeMax.cpp48 int32_t maxSize; in doMain() local
52 auto status = hal->call(&aidl::IVibrator::getPwleCompositionSizeMax, &maxSize); in doMain()
60 std::cout << "Max Size: " << maxSize << std::endl; in doMain()
DCommandGetCompositionSizeMax.cpp48 int32_t maxSize; in doMain() local
52 auto status = hal->call(&aidl::IVibrator::getCompositionSizeMax, &maxSize); in doMain()
60 std::cout << "Max Size: " << maxSize << std::endl; in doMain()
/frameworks/base/core/java/android/net/http/
DHttpResponseCache.java181 public static synchronized HttpResponseCache install(File directory, long maxSize) in install() argument
188 if (cacheHolder.isEquivalent(directory, maxSize)) { in install()
196 CacheHolder cacheHolder = CacheHolder.create(directory, maxSize); in install()
233 public long maxSize() { in maxSize() method in HttpResponseCache
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipPinchResizingAlgorithm.java42 PointF lastPoint, PointF lastSecondPoint, Point minSize, Point maxSize, in calculateBoundsAndAngle() argument
49 float maxScale = getMaxScale(initialBounds, maxSize); in calculateBoundsAndAngle()
79 private float getMaxScale(Rect bounds, Point maxSize) { in getMaxScale() argument
80 return Math.min((float) maxSize.x / bounds.width(), (float) maxSize.y / bounds.height()); in getMaxScale()
/frameworks/base/core/java/android/widget/inline/
DInlinePresentationSpec.java99 @NonNull Size maxSize, in InlinePresentationSpec() argument
104 this.mMaxSize = maxSize; in InlinePresentationSpec()
214 Size maxSize = (Size) in.readSize(); in InlinePresentationSpec() local
220 this.mMaxSize = maxSize; in InlinePresentationSpec()
267 @NonNull Size maxSize) { in Builder() argument
271 mMaxSize = maxSize; in Builder()
/frameworks/base/services/core/java/com/android/server/am/
DFgsTempAllowList.java61 public FgsTempAllowList(int maxSize) { in FgsTempAllowList() argument
62 if (maxSize <= 0) { in FgsTempAllowList()
63 Slog.e(TAG_AM, "Invalid FgsTempAllowList maxSize:" + maxSize in FgsTempAllowList()
67 mMaxSize = maxSize; in FgsTempAllowList()
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/
DFillUi.java236 final Point maxSize = mTempPoint; in FillUi() local
237 resolveMaxWindowSize(mContext, maxSize); in FillUi()
239 content.getLayoutParams().width = mFullScreen ? maxSize.x in FillUi()
242 final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxSize.x, in FillUi()
244 final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(maxSize.y, in FillUi()
499 Point maxSize = mTempPoint; in updateContentSize() local
500 resolveMaxWindowSize(mContext, maxSize); in updateContentSize()
505 final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxSize.x, in updateContentSize()
507 final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(maxSize.y, in updateContentSize()
513 changed |= updateWidth(mHeader, maxSize); in updateContentSize()
[all …]
/frameworks/base/cmds/incidentd/src/
Dreport_directory.cpp41 void clean_directory(const char* directory, off_t maxSize, size_t maxCount) { in clean_directory() argument
81 if (totalSize < maxSize && totalCount < maxCount) { in clean_directory()
90 it != files.end() && totalSize >= maxSize && totalCount >= maxCount; it++) { in clean_directory()
DPrivacyFilter.cpp266 size_t* maxSize) { in writeData() argument
269 if (maxSize != NULL) { in writeData()
270 *maxSize = 0; in writeData()
310 if (maxSize != NULL) { in writeData()
311 if (dataSize > *maxSize) { in writeData()
312 *maxSize = dataSize; in writeData()
/frameworks/base/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/
DFakeBackgroundService.java103 int maxSize = Math.max(maxWindowBounds.width(), maxWindowBounds.height()); in onCreate() local
104 maxSize *= 2; in onCreate()
105 lp.x = maxSize; in onCreate()
106 lp.y = maxSize; in onCreate()
DFakeApp.java138 int maxSize = Math.max(maxWindowBounds.width(), maxWindowBounds.height()); in onCreate() local
139 maxSize *= 2; in onCreate()
140 lp.x = maxSize; in onCreate()
141 lp.y = maxSize; in onCreate()
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/
DCameraOps.java331 Size maxSize = smallEnough.get(0); in getBestSize() local
332 double aspectDelta = Math.abs(maxSize.getWidth() / maxSize.getHeight() - TARGET_ASPECT); in getBestSize()
334 if (maxSize.getWidth() < candidateSize.getWidth()) { in getBestSize()
335 maxSize = candidateSize; in getBestSize()
336 aspectDelta = Math.abs(maxSize.getWidth() / maxSize.getHeight() - TARGET_ASPECT); in getBestSize()
338 if (maxSize.getWidth() == candidateSize.getWidth()) { in getBestSize()
340 maxSize = candidateSize; in getBestSize()
341 … aspectDelta = Math.abs(maxSize.getWidth() / maxSize.getHeight() - TARGET_ASPECT); in getBestSize()
346 return maxSize; in getBestSize()
/frameworks/base/core/java/android/os/incremental/
DV4Signature.java196 int maxSize = INCFS_MAX_SIGNATURE_SIZE; in readFrom() local
197 final byte[] hashingInfo = readBytes(stream, maxSize); in readFrom()
199 maxSize -= hashingInfo.length; in readFrom()
201 final byte[] signingInfo = readBytes(stream, maxSize); in readFrom()
240 private static byte[] readBytes(InputStream stream, int maxSize) throws IOException { in readBytes() argument
243 if (size > maxSize) { in readBytes()
/frameworks/base/services/core/java/com/android/server/
DBootReceiver.java497 String headers, String footers, String filename, int maxSize, in addLastkToDropBox() argument
504 maxSize = -(GMSCORE_LASTK_LOG_SIZE - extraSize); in addLastkToDropBox()
506 maxSize = 0; in addLastkToDropBox()
509 addFileWithFootersToDropBox(db, timestamps, headers, footers, filename, maxSize, tag); in addLastkToDropBox()
514 String headers, String filename, int maxSize, String tag) throws IOException { in addFileToDropBox() argument
515 addFileWithFootersToDropBox(db, timestamps, headers, "", filename, maxSize, tag); in addFileToDropBox()
520 String headers, String footers, String filename, int maxSize, in addFileWithFootersToDropBox() argument
535 String fileContents = FileUtils.readTextFile(file, maxSize, TAG_TRUNCATED); in addFileWithFootersToDropBox()
539 addTextToDropBox(db, "system_server_native_crash", text, filename, maxSize); in addFileWithFootersToDropBox()
544 addTextToDropBox(db, tag, text, filename, maxSize); in addFileWithFootersToDropBox()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DFramebufferSurfaceTest.cpp26 ui::Size limitSize(const ui::Size& size, const ui::Size maxSize) { in limitSize() argument
27 return FramebufferSurface::limitSizeInternal(size, maxSize); in limitSize()
/frameworks/base/core/java/com/android/internal/widget/
DGridLayoutManager.java566 int maxSize = 0; in layoutChunk() local
588 if (size > maxSize) { in layoutChunk()
589 maxSize = size; in layoutChunk()
602 maxSize = 0; in layoutChunk()
607 if (size > maxSize) { in layoutChunk()
608 maxSize = size; in layoutChunk()
616 if (mOrientationHelper.getDecoratedMeasurement(view) != maxSize) { in layoutChunk()
629 hSpec = View.MeasureSpec.makeMeasureSpec(maxSize - verticalInsets, in layoutChunk()
632 wSpec = View.MeasureSpec.makeMeasureSpec(maxSize - horizontalInsets, in layoutChunk()
640 result.mConsumed = maxSize; in layoutChunk()
[all …]
/frameworks/av/services/camera/libcameraservice/tests/
DNV12Compressor.cpp271 status_t NV12Compressor::findJpegSize(uint8_t *jpegBuffer, size_t maxSize, size_t *size /*out*/) { in findJpegSize() argument
282 while (*size <= maxSize - kMarkerLength) { in findJpegSize()
288 if (type == kEndOfImage || *size > maxSize - sizeof(segment_t)) { in findJpegSize()
299 for ( ; *size <= maxSize - kMarkerLength; (*size)++) { in findJpegSize()
311 if (*size > maxSize) { in findJpegSize()
312 *size = maxSize; in findJpegSize()
/frameworks/av/services/camera/libcameraservice/api2/
DHeicEncoderInfoManager.cpp186 std::pair<int32_t, int32_t>* maxSize, in getCodecSizeRange() argument
188 if (codecName == nullptr || minSize == nullptr || maxSize == nullptr || in getCodecSizeRange()
206 maxSize->first = stoi(match[3]); in getCodecSizeRange()
207 maxSize->second = stoi(match[4]); in getCodecSizeRange()
208 if (minSize->first > maxSize->first || in getCodecSizeRange()
209 minSize->second > maxSize->second) { in getCodecSizeRange()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardSecurityViewFlipper.java165 private int makeChildMeasureSpec(int maxSize, int childDimen) { in makeChildMeasureSpec() argument
171 size = maxSize; in makeChildMeasureSpec()
175 size = maxSize; in makeChildMeasureSpec()
179 size = Math.min(maxSize, childDimen); in makeChildMeasureSpec()

1234