Home
last modified time | relevance | path

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

12

/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/
DBlePacketFactoryTest.java62 int maxSize = 49; in testGetTotalPackets_withVarintSize1_returnsCorrectPackets() local
70 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize1_returnsCorrectPackets()
78 int maxSize = 49; in testGetTotalPackets_withVarintSize2_returnsCorrectPackets() local
86 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize2_returnsCorrectPackets()
94 int maxSize = 49; in testGetTotalPackets_withVarintSize3_returnsCorrectPackets() local
102 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize3_returnsCorrectPackets()
110 int maxSize = 49; in testGetTotalPackets_withVarintSize4_returnsCorrectPackets() local
118 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize4_returnsCorrectPackets()
126 int maxSize = 1000; in testMakePackets_correctlyChunksPayload() local
129 BlePacketFactory.makeBlePackets(payload, /* mesageId= */ 1, maxSize); in testMakePackets_correctlyChunksPayload()
[all …]
/packages/apps/Camera2/src/com/android/camera/data/
DGlideFilmstripManager.java191 private static Size clampSize(Size original, double maxArea, Size maxSize) { in clampSize() argument
193 original.getWidth() < maxSize.getWidth() && in clampSize()
194 original.getHeight() < maxSize.getHeight()) { in clampSize()
208 if (width > maxSize.width() || height > maxSize.height()) { in clampSize()
209 return computeFitWithinSize(original, maxSize); in clampSize()
215 private static Size computeFitWithinSize(Size original, Size maxSize) { in computeFitWithinSize() argument
216 double widthRatio = (double) maxSize.width() / original.width(); in computeFitWithinSize()
217 double heightRatio = (double) maxSize.height() / original.height(); in computeFitWithinSize()
224 Math.min((int) Math.round(original.width() * ratio), maxSize.width()), in computeFitWithinSize()
225 Math.min((int) Math.round(original.height() * ratio), maxSize.height())); in computeFitWithinSize()
[all …]
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/ble/
DBlePacketFactory.java62 static List<BlePacket> makeBlePackets(byte[] payload, int messageId, int maxSize) in makeBlePackets() argument
66 int totalPackets = getTotalPacketNumber(messageId, payloadSize, maxSize); in makeBlePackets()
67 int maxPayloadSize = maxSize in makeBlePackets()
68 - getPacketHeaderSize(totalPackets, messageId, Math.min(payloadSize, maxSize)); in makeBlePackets()
101 static int getTotalPacketNumber(int messageId, int payloadSize, int maxSize) in getTotalPacketNumber() argument
105 + getEncodedSize(Math.min(payloadSize, maxSize)) + FIELD_NUMBER_ENCODING_SIZE; in getTotalPacketNumber()
110 int maxPayloadSize = maxSize - packetHeaderSize; in getTotalPacketNumber()
121 + messageId + ", payloadSize: " + payloadSize + ", maxSize: " + maxSize); in getTotalPacketNumber()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/
DBipImageFormat.java54 public static BipImageFormat parseVariant(String encoding, String pixel, String maxSize, in parseVariant() argument
56 return new BipImageFormat(BipImageFormat.FORMAT_VARIANT, encoding, pixel, null, maxSize, in parseVariant()
70 public static BipImageFormat createVariant(BipEncoding encoding, BipPixel pixel, int maxSize, in createVariant() argument
72 return new BipImageFormat(BipImageFormat.FORMAT_VARIANT, encoding, pixel, -1, maxSize, in createVariant()
116 private BipImageFormat(int type, BipEncoding encoding, BipPixel pixel, int size, int maxSize, in BipImageFormat() argument
123 mMaxSize = maxSize; in BipImageFormat()
126 private BipImageFormat(int type, String encoding, String pixel, String size, String maxSize, in BipImageFormat() argument
133 mMaxSize = parseInt(maxSize); in BipImageFormat()
DBipImageProperties.java187 String maxSize = xpp.getAttributeValue(null, "maxsize"); in parse() local
190 BipImageFormat.parseVariant(encoding, pixel, maxSize, trans)); in parse()
294 int maxSize = format.getMaxSize(); in toString() local
303 if (maxSize >= 0) { in toString()
304 xmlMsgElement.attribute(null, "maxsize", Integer.toString(maxSize)); in toString()
/packages/apps/Camera2/src/com/android/camera/processing/memory/
DLruPool.java116 public LruPool(int maxSize) { in LruPool() argument
117 this(maxSize, new Configuration<TKey, TValue>()); in LruPool()
120 public LruPool(int maxSize, Configuration<TKey, TValue> configuration) { in LruPool() argument
121 Preconditions.checkArgument(maxSize > 0, "maxSize must be > 0."); in LruPool()
123 mMaxSize = maxSize; in LruPool()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
DScrollAdapterView.java1253 int maxSize = 0;
1261 maxSize = Math.max(maxSize, mOrientation == HORIZONTAL ? child.getMeasuredWidth() :
1269 left = left - maxSize;
1271 top = top - maxSize;
1277 h.mMaxSize = maxSize;
1281 child.layout(left + maxSize / 2 - child.getMeasuredWidth() / 2, top,
1282 left + maxSize / 2 + child.getMeasuredWidth() / 2,
1290 child.layout(left + maxSize - child.getMeasuredWidth(), top, left + maxSize,
1299 child.layout(left, top + maxSize / 2 - child.getMeasuredHeight() / 2,
1301 top + maxSize / 2 + child.getMeasuredHeight() / 2);
[all …]
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/
Ddic_node_priority_queue.h48 AK_FORCE_INLINE void setMaxSize(const int maxSize) { in setMaxSize() argument
49 mMaxSize = maxSize; in setMaxSize()
56 AK_FORCE_INLINE void clearAndResize(const int maxSize) { in clearAndResize() argument
57 mMaxSize = maxSize; in clearAndResize()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/trust/
DBLEMessagePayloadStreamTest.java84 int maxSize = TEST_SINGLE_MESSAGE_SIZE - 1; in testMessageContent_withMultipleMessages_shouldBeConsistent() local
86 OPERATION_TYPE, maxSize, IS_MESSAGE_ENCRYPTED); in testMessageContent_withMultipleMessages_shouldBeConsistent()
110 int maxSize = TEST_SINGLE_MESSAGE_SIZE - 1; in testMessageStreamComeToEnd_withMultipleMessages_streamCompleted() local
112 OPERATION_TYPE, maxSize, IS_MESSAGE_ENCRYPTED); in testMessageStreamComeToEnd_withMultipleMessages_streamCompleted()
/packages/apps/Messaging/src/android/support/v7/mms/
DSendRequest.java99 final int maxSize) { in readPduFromContentUri() argument
111 final byte[] readBuf = new byte[maxSize+1]; in readPduFromContentUri()
112 final int bytesRead = inStream.read(readBuf, 0, maxSize+1); in readPduFromContentUri()
117 if (bytesRead > maxSize) { in readPduFromContentUri()
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DPendingAppWidgetHostView.java216 int maxSize = grid.iconSizePx; in updateDrawableBounds() local
217 int size = Math.min(maxSize, Math.min(availableWidth, availableHeight)); in updateDrawableBounds()
228 int maxSize = Math.max(availableWidth, availableHeight); in updateDrawableBounds() local
229 if (iconSize * settingIconScaleFactor > maxSize) { in updateDrawableBounds()
231 iconSize = maxSize / settingIconScaleFactor; in updateDrawableBounds()
/packages/apps/Car/Radio/src/com/android/car/radio/platform/
DImageMemoryCache.java52 public CacheMap(int maxSize) { in CacheMap() argument
53 if (maxSize < 0) throw new IllegalArgumentException("maxSize must not be negative"); in CacheMap()
54 mMaxSize = maxSize; in CacheMap()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DViewCache.java67 public CacheEntry(int maxSize) { in CacheEntry() argument
68 mMaxSize = maxSize; in CacheEntry()
69 mViews = new View[maxSize]; in CacheEntry()
DViewPool.java45 int layoutId, int maxSize, int initialSize) { in ViewPool() argument
49 mPool = new Object[maxSize]; in ViewPool()
/packages/apps/Dialer/java/com/android/incallui/autoresizetext/
DAutoResizeTextView.java202 private float computeTextSize(int minSize, int maxSize, RectF availableSpace) { in computeTextSize() argument
207 int size = binarySearchSizes(minSize, maxSize, availableSpace); in computeTextSize()
218 private int binarySearchSizes(int minSize, int maxSize, RectF availableSpace) { in binarySearchSizes() argument
221 int high = maxSize; in binarySearchSizes()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DLevelTrackingMediaRecorder.java92 final MediaRecorder.OnInfoListener infoListener, int maxSize) { in startRecording() argument
104 maxSize *= MAX_SIZE_RATIO; in startRecording()
111 mRecorder.setMaxFileSize(maxSize); in startRecording()
/packages/apps/Camera2/src/com/android/camera/settings/
DResolutionUtil.java374 Size maxSize = new Size(0, 0); in getLargestPictureSize() local
384 maxSize = size; in getLargestPictureSize()
401 maxSize = size; in getLargestPictureSize()
405 return maxSize; in getLargestPictureSize()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
DBitmapCache.java48 private MemoryCache(int maxSize) { in MemoryCache() argument
49 super(maxSize); in MemoryCache()
/packages/apps/DeskClock/src/com/android/deskclock/
DTimerCircleFrameLayout.java63 final int maxSize = getResources().getDimensionPixelSize(R.dimen.max_timer_circle_size); in onMeasure() local
64 final int size = Math.min(smallestDimension, maxSize); in onMeasure()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DBitmapPool.java85 BitmapPool(final int maxSize, @NonNull final String name) { in BitmapPool() argument
86 Assert.isTrue(maxSize > 0); in BitmapPool()
89 mMaxSize = maxSize; in BitmapPool()
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DMediaCache.java46 public MediaCache(final int maxSize, final int id, final String name) { in MediaCache() argument
47 super(maxSize); in MediaCache()
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/
DTrampolineActivity.java170 final Long maxSize = DownloadManager.getMaxBytesOverMobile(context); in onCreateDialog() local
171 if (maxSize != null && size > maxSize) { in onCreateDialog()
/packages/apps/Dialer/java/com/android/dialer/util/
DExpirableCache.java132 public static <K, V> ExpirableCache<K, V> create(int maxSize) { in create() argument
133 return create(new LruCache<K, CachedValue<V>>(maxSize)); in create()
/packages/services/Car/service/src/com/android/car/trust/
DBLEMessageV1Factory.java138 int maxSize, boolean isPayloadEncrypted) { in makeBLEMessages() argument
142 maxSize - getProtoHeaderSize(operation, payloadSize, isPayloadEncrypted); in makeBLEMessages()
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DAtPhonebook.java470 int maxSize = (currSize < 100) ? 100 : currSize; in getMaxPhoneBookSize() local
471 maxSize += maxSize / 2; in getMaxPhoneBookSize()
472 return roundUpToPowerOfTwo(maxSize); in getMaxPhoneBookSize()

12