/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/ |
D | BipPixel.java | 77 public static BipPixel createResizableModified(int minWidth, int minHeight, int maxWidth, in createResizableModified() argument 79 return new BipPixel(TYPE_RESIZE_MODIFIED_ASPECT_RATIO, minWidth, minHeight, maxWidth, in createResizableModified() 86 public static BipPixel createResizableFixed(int minWidth, int maxWidth, int maxHeight) { in createResizableFixed() argument 87 int minHeight = (minWidth * maxHeight) / maxWidth; in createResizableFixed() 89 maxWidth, maxHeight); in createResizableFixed() 95 private BipPixel(int type, int minWidth, int minHeight, int maxWidth, int maxHeight) { in BipPixel() argument 96 if (isDimensionInvalid(minWidth) || isDimensionInvalid(maxWidth) in BipPixel() 104 mMaxWidth = maxWidth; in BipPixel() 115 int maxWidth = -1; in BipPixel() local 126 maxWidth = Integer.parseInt(m1.group(1)); in BipPixel() [all …]
|
/packages/apps/TV/src/com/android/tv/util/images/ |
D | ImageLoader.java | 143 Context context, final String uriString, final int maxWidth, final int maxHeight) { in prefetchBitmap() argument 146 doLoadBitmap(context, uriString, maxWidth, maxHeight, null, AsyncTask.SERIAL_EXECUTOR); in prefetchBitmap() 155 maxWidth, in prefetchBitmap() 188 int maxWidth, in loadBitmap() argument 195 context, uriString, maxWidth, maxHeight, callback, IMAGE_THREAD_POOL_EXECUTOR); in loadBitmap() 201 int maxWidth, in doLoadBitmap() argument 209 if (bitmapInfo != null && !bitmapInfo.needToReload(maxWidth, maxHeight)) { in doLoadBitmap() 218 new LoadBitmapFromUriTask(context, imageCache, uriString, maxWidth, maxHeight)); in doLoadBitmap() 322 Context context, ImageCache imageCache, String key, int maxHeight, int maxWidth) { in LoadBitmapTask() argument 323 if (maxWidth == 0 || maxHeight == 0) { in LoadBitmapTask() [all …]
|
D | BitmapUtils.java | 60 public static Bitmap scaleBitmap(Bitmap bm, int maxWidth, int maxHeight) { in scaleBitmap() argument 61 Rect rect = calculateNewSize(bm, maxWidth, maxHeight); in scaleBitmap() 65 public static Bitmap getScaledMutableBitmap(Bitmap bm, int maxWidth, int maxHeight) { in getScaledMutableBitmap() argument 66 Bitmap scaledBitmap = scaleBitmap(bm, maxWidth, maxHeight); in getScaledMutableBitmap() 72 private static Rect calculateNewSize(Bitmap bm, int maxWidth, int maxHeight) { in calculateNewSize() argument 73 final double ratio = maxHeight / (double) maxWidth; in calculateNewSize() 77 rect.right = maxWidth; in calculateNewSize() 78 rect.bottom = Math.round((float) bm.getHeight() * maxWidth / bm.getWidth()); in calculateNewSize() 87 String id, Bitmap bm, int maxWidth, int maxHeight) { in createScaledBitmapInfo() argument 90 scaleBitmap(bm, maxWidth, maxHeight), in createScaledBitmapInfo() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/ |
D | BipPixelTest.java | 31 private void testParse(String input, int pixelType, int minWidth, int minHeight, int maxWidth, in testParse() argument 37 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testParse() 52 private void testResizableModified(int minWidth, int minHeight, int maxWidth, int maxHeight, in testResizableModified() argument 54 BipPixel pixel = BipPixel.createResizableModified(minWidth, minHeight, maxWidth, maxHeight); in testResizableModified() 58 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testResizableModified() 63 private void testResizableFixed(int minWidth, int maxWidth, int maxHeight, in testResizableFixed() argument 65 int minHeight = (minWidth * maxHeight) / maxWidth; // spec defined in testResizableFixed() 66 BipPixel pixel = BipPixel.createResizableFixed(minWidth, maxWidth, maxHeight); in testResizableFixed() 70 Assert.assertEquals(maxWidth, pixel.getMaxWidth()); in testResizableFixed()
|
/packages/apps/DeskClock/src/com/android/deskclock/widget/ |
D | EllipsizeLayout.kt | 96 ellipsizeView.maxWidth = Int.MAX_VALUE in onMeasure() 123 var maxWidth = ellipsizeView!!.measuredWidth - (totalLength - parentWidth) in onMeasure() variable 126 if (maxWidth < minWidth) { in onMeasure() 127 maxWidth = minWidth in onMeasure() 129 ellipsizeView.maxWidth = maxWidth in onMeasure()
|
/packages/apps/Dialer/java/com/android/incallui/autoresizetext/ |
D | AutoResizeTextView.java | 52 private int maxWidth; field in AutoResizeTextView 150 int maxWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight(); in adjustTextSize() local 153 if (maxWidth <= 0 || maxHeight <= 0) { in adjustTextSize() 157 this.maxWidth = maxWidth; in adjustTextSize() 158 availableSpaceRect.right = maxWidth; in adjustTextSize() 180 maxWidth, in suggestedSizeFitsInSpace()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | LogoUtils.java | 47 int maxWidth = (int) context.getResources().getDimension(R.dimen.max_logo_width); in getOrganisationLogo() local 50 bitmap = getBitmapPartiallyResized(logoFile.getPath(), maxWidth, maxHeight); in getOrganisationLogo() 58 resizeBitmap(bitmap, maxWidth, maxHeight)); in getOrganisationLogo() 103 static Bitmap resizeBitmap(Bitmap bitmap, int maxWidth, int maxHeight) { in resizeBitmap() argument 106 double ratio = Math.max((double) width / maxWidth, (double) height / maxHeight); in resizeBitmap()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/dashboard/ |
D | PreferenceImageView.java | 50 final int maxWidth = getMaxWidth(); in onMeasure() local 51 if (maxWidth != Integer.MAX_VALUE in onMeasure() 52 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { in onMeasure() 53 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); in onMeasure()
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/text/ |
D | SubtitleView.java | 238 private boolean computeMeasurements(int maxWidth) { in computeMeasurements() argument 239 if (mHasMeasurements && maxWidth == mLastMeasuredWidth) { in computeMeasurements() 245 maxWidth -= paddingX; in computeMeasurements() 246 if (maxWidth <= 0) { in computeMeasurements() 251 mLastMeasuredWidth = maxWidth; in computeMeasurements() 254 mText, mTextPaint, maxWidth, mAlignment, mSpacingMult, mSpacingAdd, true); in computeMeasurements()
|
/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
D | SharePopup.java | 171 float maxWidth = mPreviewFrame.getWidth() - hPaddingRootView; in setOrientation() local 175 float temp = maxWidth; in setOrientation() 176 maxWidth = maxHeight; in setOrientation() 179 float actualAspect = maxWidth / maxHeight; in setOrientation() 194 params.width = Math.round(maxWidth); in setOrientation() 195 params.height = Math.round(maxWidth / desiredAspect); in setOrientation()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/ |
D | SuggestionStripLayoutHelper.java | 470 private int getSuggestionWidth(final int positionInStrip, final int maxWidth) { in getSuggestionWidth() argument 473 final int availableWidth = maxWidth - paddings - dividers; in getSuggestionWidth() 569 private static float getTextScaleX(@Nullable final CharSequence text, final int maxWidth, in getTextScaleX() argument 573 if (width <= maxWidth || maxWidth <= 0) { in getTextScaleX() 576 return maxWidth / (float) width; in getTextScaleX() 581 @Nullable final CharSequence text, final int maxWidth, @Nonnull final TextPaint paint) { in getEllipsizedTextWithSettingScaleX() argument 585 final float scaleX = getTextScaleX(text, maxWidth, paint); in getEllipsizedTextWithSettingScaleX() 598 text, paint, maxWidth, TextUtils.TruncateAt.MIDDLE); in getEllipsizedTextWithSettingScaleX()
|
D | MoreSuggestions.java | 57 final int maxWidth, final int minWidth, final int maxRow, final Paint paint, in layout() argument 81 (maxWidth - mDividerWidth * (numColumn - 1)) / numColumn; in layout() 191 final int maxWidth, final int minWidth, final int maxRow, in layout() argument 197 final int count = mParams.layout(suggestedWords, fromIndex, maxWidth, minWidth, maxRow, in layout()
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
D | AttachmentPreviewFactory.java | 170 int maxWidth = imageView.getMaxWidth(); in createImagePreview() local 174 maxWidth = maxHeight = resources.getDimensionPixelSize( in createImagePreview() 177 if (maxWidth <= 0 || maxWidth == Integer.MAX_VALUE) { in createImagePreview() 178 maxWidth = ImageRequest.UNSPECIFIED_SIZE; in createImagePreview() 185 maxWidth, maxHeight)); in createImagePreview()
|
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/widget/ |
D | CarUiTextViewImpl.java | 138 int maxWidth = layout.getWidth(); in getTruncatedText() local 141 return TextUtils.ellipsize(text, getPaint(), maxWidth, TextUtils.TruncateAt.END); in getTruncatedText() 153 index += getPaint().breakText(text, index, length, true, maxWidth, null); in getTruncatedText() 194 TextUtils.ellipsize(lastLine, getPaint(), maxWidth, TextUtils.TruncateAt.END)); in getTruncatedText()
|
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/ |
D | CameraManager.java | 932 final int maxWidth, final int maxHeight) { in getScaleFactorForMaxAllowedSize() argument 933 if (maxWidth <= 0 || maxHeight <= 0) { in getScaleFactorForMaxAllowedSize() 940 if (width <= maxWidth && height <= maxHeight) { in getScaleFactorForMaxAllowedSize() 945 return Math.min(maxWidth * 1.0f / width, maxHeight * 1.0f / height); in getScaleFactorForMaxAllowedSize() 986 final int maxWidth = mmsConfig.getMaxImageWidth(); in chooseBestPictureSize() local 991 maxWidth, maxHeight); in chooseBestPictureSize() 1000 final int maxPixels = maxWidth * maxHeight; in chooseBestPictureSize() 1003 Collections.sort(sizes, new SizeComparator(maxWidth, maxHeight, aspectRatio, maxPixels)); in chooseBestPictureSize() 1050 public SizeComparator(final int maxWidth, final int maxHeight, in SizeComparator() argument 1052 mMaxWidth = maxWidth; in SizeComparator()
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/ |
D | CameraManager.java | 729 private final int maxWidth; field in CameraManager.SizeComparator 739 final int maxWidth, in SizeComparator() argument 743 this.maxWidth = maxWidth; in SizeComparator() 756 if ((left.width <= maxWidth && left.height <= maxHeight) in compare() 757 != (right.width <= maxWidth && right.height <= maxHeight)) { in compare() 758 return left.width <= maxWidth ? PREFER_LEFT : PREFER_RIGHT; in compare()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | KeyPreviewView.java | 85 final int maxWidth = background.getIntrinsicWidth() - mBackgroundPadding.left in setTextAndScaleX() local 88 if (width <= maxWidth) { in setTextAndScaleX() 92 setTextScaleX(maxWidth / width); in setTextAndScaleX()
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | MatchParentShrinkingLinearLayout.java | 643 int maxWidth = 0; in measureVertical() local 756 maxWidth = Math.max(maxWidth, measuredWidth); in measureVertical() 893 maxWidth = Math.max(maxWidth, measuredWidth); in measureVertical() 941 maxWidth = alternativeMaxWidth; in measureVertical() 944 maxWidth += mPaddingLeft + mPaddingRight; in measureVertical() 947 maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth()); in measureVertical() 949 setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState), in measureVertical()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | MoreKeysKeyboard.java | 320 int maxWidth = minKeyWidth; in getMaxKeyWidth() local 325 maxWidth = Math.max(maxWidth, in getMaxKeyWidth() 329 return maxWidth; in getMaxKeyWidth()
|
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/appstyledview/ |
D | AppStyledViewControllerImpl.java | 73 int maxWidth = mContext.getResources().getDimensionPixelSize( in getDialogWindowLayoutParam() local 82 .orientation == Configuration.ORIENTATION_LANDSCAPE && maxWidth < displayWidth) { in getDialogWindowLayoutParam() 91 params.width = width != 0 ? width : Math.min(displayWidth, maxWidth); in getDialogWindowLayoutParam()
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | MultiLineTexture.java | 39 String text, int maxWidth, float textSize, int color, in newInstance() argument 43 maxWidth, alignment, 1, 0, true, null, 0); in newInstance()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | MessageBubbleBackground.java | 39 final int maxWidth = MeasureSpec.getSize(widthMeasureSpec) - widthPadding; in onMeasure() local 41 bubbleWidth = Math.min(maxWidth, in onMeasure()
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
D | MessageBubbleBackground.java | 39 final int maxWidth = MeasureSpec.getSize(widthMeasureSpec) - widthPadding; in onMeasure() local 41 bubbleWidth = Math.min(maxWidth, in onMeasure()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | DrawerController.java | 87 float maxWidth = activity.getResources().getDimension(R.dimen.max_drawer_width); in calculateDrawerWidth() local 88 int finalWidth = (int) ((width > maxWidth ? maxWidth : width)); in calculateDrawerWidth()
|
/packages/apps/Launcher3/src/com/android/launcher3/views/ |
D | Snackbar.java | 84 int maxWidth = dragLayer.getWidth() - minMarginLeftRight * 2 - insets.left - insets.right; in show() local 100 if (totalContentWidth <= maxWidth) { in show() 113 params.width = maxWidth; in show()
|