/packages/apps/Camera2/src/com/android/camera/settings/ |
D | ResolutionUtil.java | 84 public Float aspectRatio; field in ResolutionUtil.ResolutionBucket 138 sortedDesiredAspectRatios.add(buckets.get(0).aspectRatio.floatValue()); in getDisplayableSizesFromSupported() 143 Float aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local 144 if (Arrays.asList(sDesiredAspectRatios).contains(aspectRatio) in getDisplayableSizesFromSupported() 145 && !sortedDesiredAspectRatios.contains(aspectRatio)) { in getDisplayableSizesFromSupported() 146 sortedDesiredAspectRatios.add(aspectRatio); in getDisplayableSizesFromSupported() 153 Number aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local 154 if (Math.abs(aspectRatio.floatValue() - targetRatio) <= ASPECT_RATIO_TOLERANCE) { in getDisplayableSizesFromSupported() 223 private static float fuzzAspectRatio(float aspectRatio) { in fuzzAspectRatio() argument 225 if ((Math.abs(aspectRatio - desiredAspectRatio)) < ASPECT_RATIO_TOLERANCE) { in fuzzAspectRatio() [all …]
|
D | ResolutionSetting.java | 68 public void setPictureAspectRatio(CameraId cameraId, Rational aspectRatio) in setPictureAspectRatio() argument 97 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in setPictureAspectRatio() 149 final Rational aspectRatio = ResolutionUtil.ASPECT_RATIO_4x3; in getPictureSize() local 159 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in getPictureSize()
|
/packages/apps/Launcher3/src/com/android/launcher3/responsive/ |
D | ResponsiveSpecsProvider.kt | 48 .sortedBy { it.aspectRatio } in <lambda>() 51 fun getSpecsByAspectRatio(aspectRatio: Float): ResponsiveSpecGroup<ResponsiveSpec> { in <lambda>() 52 check(aspectRatio > 0f) { "Invalid aspect ratio! The value should be bigger than 0." } in <lambda>() 54 val specsGroup = groupOfSpecs.firstOrNull { aspectRatio <= it.aspectRatio } in <lambda>() 55 checkNotNull(specsGroup) { "No available spec with aspectRatio within $aspectRatio." } in <lambda>() 72 aspectRatio: Float, in <lambda>() 77 val specsGroup = getSpecsByAspectRatio(aspectRatio) in <lambda>() 79 return CalculatedResponsiveSpec(aspectRatio, availableSpace, numCells, spec) in <lambda>() 97 aspectRatio: Float, in <lambda>() 115 val specsGroup = getSpecsByAspectRatio(aspectRatio) in <lambda>() [all …]
|
D | ResponsiveCellSpecsProvider.kt | 39 .sortedBy { it.aspectRatio } in <lambda>() 42 fun getSpecsByAspectRatio(aspectRatio: Float): ResponsiveSpecGroup<CellSpec> { in <lambda>() 43 check(aspectRatio > 0f) { "Invalid aspect ratio! The value should be bigger than 0." } in <lambda>() 45 val specsGroup = groupOfSpecs.firstOrNull { aspectRatio <= it.aspectRatio } in <lambda>() 46 check(specsGroup != null) { "No available spec with aspectRatio within $aspectRatio." } in <lambda>() 51 fun getCalculatedSpec(aspectRatio: Float, availableHeightSpace: Int): CalculatedCellSpec { in <lambda>() 52 val specsGroup = getSpecsByAspectRatio(aspectRatio) in <lambda>() 58 aspectRatio: Float, in <lambda>() 62 val specsGroup = getSpecsByAspectRatio(aspectRatio) in <lambda>()
|
D | HotseatSpecsProvider.kt | 31 this.groupOfSpecs = groupOfSpecs.sortedBy { it.aspectRatio } in <lambda>() 34 fun getSpecsByAspectRatio(aspectRatio: Float): ResponsiveSpecGroup<HotseatSpec> { in getSpecsByAspectRatio() 35 check(aspectRatio > 0f) { "Invalid aspect ratio! The value should be bigger than 0." } in getSpecsByAspectRatio() 37 val specsGroup = groupOfSpecs.firstOrNull { aspectRatio <= it.aspectRatio } in getSpecsByAspectRatio() 38 check(specsGroup != null) { "No available spec with aspectRatio within $aspectRatio." } in getSpecsByAspectRatio() 53 aspectRatio: Float, in getCalculatedSpec() 57 val specsGroup = getSpecsByAspectRatio(aspectRatio) in getCalculatedSpec()
|
D | ResponsiveSpec.kt | 183 var aspectRatio: Float = Float.NaN variable in com.android.launcher3.responsive.CalculatedResponsiveSpec 208 aspectRatio: Float, 214 this.aspectRatio = aspectRatio 234 constructor(aspectRatio: Float, availableSpace: Int, cells: Int, spec: ResponsiveSpec) { 235 this.aspectRatio = aspectRatio
|
D | ResponsiveSpecGroup.kt | 31 val aspectRatio: Float, constant in com.android.launcher3.responsive.ResponsiveSpecGroup 39 check(aspectRatio > 0f) { "Invalid aspect ratio! Aspect ratio should be bigger than zero." } in <lambda>() 90 val aspectRatio = attrs.getFloat(R.styleable.ResponsiveSpecGroup_maxAspectRatio, 0f) in create() constant 91 return ResponsiveSpecGroup(aspectRatio, widthSpecs, heightSpecs) in create()
|
/packages/apps/Camera2/src/com/android/camera/ |
D | TextureViewHelper.java | 135 public void updateAspectRatio(float aspectRatio) { in updateAspectRatio() argument 136 Log.v(TAG, "updateAspectRatio " + aspectRatio); in updateAspectRatio() 137 if (aspectRatio <= 0) { in updateAspectRatio() 138 Log.e(TAG, "Invalid aspect ratio: " + aspectRatio); in updateAspectRatio() 141 if (aspectRatio < 1f) { in updateAspectRatio() 142 aspectRatio = 1f / aspectRatio; in updateAspectRatio() 144 setAspectRatio(aspectRatio); in updateAspectRatio() 148 private void setAspectRatio(float aspectRatio) { in setAspectRatio() argument 149 Log.v(TAG, "setAspectRatio: " + aspectRatio); in setAspectRatio() 150 if (mAspectRatio != aspectRatio) { in setAspectRatio() [all …]
|
D | VideoUI.java | 106 float aspectRatio; in setPreviewSize() local 108 aspectRatio = (float) width / height; in setPreviewSize() 110 aspectRatio = (float) height / width; in setPreviewSize() 112 setAspectRatio(aspectRatio); in setPreviewSize() 155 float aspectRatio = ratio > 1 ? ratio : 1 / ratio; in setAspectRatio() local 156 if (aspectRatio != mAspectRatio) { in setAspectRatio() 157 mAspectRatio = aspectRatio; in setAspectRatio()
|
D | PhotoUI.java | 258 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument 259 if (aspectRatio <= 0) { in updatePreviewAspectRatio() 260 Log.e(TAG, "Invalid aspect ratio: " + aspectRatio); in updatePreviewAspectRatio() 263 if (aspectRatio < 1f) { in updatePreviewAspectRatio() 264 aspectRatio = 1f / aspectRatio; in updatePreviewAspectRatio() 267 if (mAspectRatio != aspectRatio) { in updatePreviewAspectRatio() 268 mAspectRatio = aspectRatio; in updatePreviewAspectRatio()
|
/packages/apps/Settings/src/com/android/settings/applications/appcompat/ |
D | UserAspectRatioManager.java | 111 final int aspectRatio = mIPm.getUserMinAspectRatio(packageName, uid); in getUserMinAspectRatioValue() local 112 return hasAspectRatioOption(aspectRatio, packageName) in getUserMinAspectRatioValue() 113 ? aspectRatio : USER_MIN_ASPECT_RATIO_UNSET; in getUserMinAspectRatioValue() 120 public String getUserMinAspectRatioEntry(@PackageManager.UserMinAspectRatio int aspectRatio, in getUserMinAspectRatioEntry() argument 126 if (!hasAspectRatioOption(aspectRatio, packageName)) { in getUserMinAspectRatioEntry() 130 return isCurrentSelectionFromManufacturerOverride(packageName, userId, aspectRatio) in getUserMinAspectRatioEntry() 132 : mUserAspectRatioMap.getOrDefault(aspectRatio, appDefault); in getUserMinAspectRatioEntry() 139 public CharSequence getAccessibleEntry(@PackageManager.UserMinAspectRatio int aspectRatio, in getAccessibleEntry() argument 142 return isCurrentSelectionFromManufacturerOverride(packageName, userId, aspectRatio) in getAccessibleEntry() 144 : mUserAspectRatioA11yMap.getOrDefault(aspectRatio, in getAccessibleEntry() [all …]
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/responsive/ |
D | FolderSpecTest.kt | 37 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second constant in com.android.launcher3.responsive.FolderSpecTest 48 val specs = folderSpecs.getSpecsByAspectRatio(aspectRatio) in parseValidFile() 132 CalculatedResponsiveSpec(aspectRatio, availableSpace, cells, workspaceSpec) in parseInvalidFile_missingWidthBreakpoint_throwsError() 137 aspectRatio, in parseInvalidFile_missingWidthBreakpoint_throwsError() 161 CalculatedResponsiveSpec(aspectRatio, availableSpace, cells, workspaceSpec) in parseInvalidFile_missingHeightBreakpoint_throwsError() 166 aspectRatio, in parseInvalidFile_missingHeightBreakpoint_throwsError() 190 CalculatedResponsiveSpec(aspectRatio, availableSpace, cells, workspaceSpec) in retrievesCalculatedWidthSpec() 196 aspectRatio, in retrievesCalculatedWidthSpec() 227 CalculatedResponsiveSpec(aspectRatio, availableSpace, cells, workspaceSpec) in retrievesCalculatedWidthSpec_invalidCalculatedResponsiveSpecType_throwsError() 232 aspectRatio, in retrievesCalculatedWidthSpec_invalidCalculatedResponsiveSpecType_throwsError() [all …]
|
D | CalculatedFolderSpecTest.kt | 37 private val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second constant in com.android.launcher3.responsive.CalculatedFolderSpecTest 57 val specs = folderSpecs.getSpecsByAspectRatio(aspectRatio) in validate_matchWidthWorkspace() 67 aspectRatio, in validate_matchWidthWorkspace() 74 aspectRatio, in validate_matchWidthWorkspace() 93 aspectRatio, in validate_matchWidthWorkspace() 100 aspectRatio, in validate_matchWidthWorkspace() 133 val specs = folderSpecs.getSpecsByAspectRatio(aspectRatio) in validate_matchHeightWorkspace() 141 aspectRatio, in validate_matchHeightWorkspace() 148 aspectRatio, in validate_matchHeightWorkspace()
|
D | CalculatedWorkspaceSpecTest.kt | 45 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second in normalPhone_returnsThirdBreakpointSpec() constant 59 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.WIDTH, 4, availableWidth) in normalPhone_returnsThirdBreakpointSpec() 61 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.HEIGHT, 5, availableHeight) in normalPhone_returnsThirdBreakpointSpec() 87 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second in smallPhone_returnsFirstBreakpointSpec() constant 102 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.WIDTH, 4, availableWidth) in smallPhone_returnsFirstBreakpointSpec() 104 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.HEIGHT, 5, availableHeight) in smallPhone_returnsFirstBreakpointSpec() 130 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second in smallPhone_returnsFirstBreakpointSpec_unsortedFile() constant 144 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.WIDTH, 4, availableWidth) in smallPhone_returnsFirstBreakpointSpec_unsortedFile() 146 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.HEIGHT, 5, availableHeight) in smallPhone_returnsFirstBreakpointSpec_unsortedFile()
|
D | CalculatedAllAppsSpecTest.kt | 44 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second in normalPhone_copiesFromWorkspace() constant 58 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.WIDTH, 4, availableWidth) in normalPhone_copiesFromWorkspace() 60 workspaceSpecs.getCalculatedSpec(aspectRatio, DimensionType.HEIGHT, 5, availableHeight) in normalPhone_copiesFromWorkspace() 70 aspectRatio, in normalPhone_copiesFromWorkspace() 87 aspectRatio, in normalPhone_copiesFromWorkspace()
|
D | CalculatedHotseatSpecTest.kt | 35 val aspectRatio = deviceSpec.naturalSize.first.toFloat() / deviceSpec.naturalSize.second constant in com.android.launcher3.responsive.CalculatedHotseatSpecTest 52 aspectRatio, in normalPhone_returnsSecondBreakpointSpec() 78 aspectRatio, in smallPhone_returnsFirstBreakpointSpec() 104 hotseatSpecsProvider.getCalculatedSpec(aspectRatio, DimensionType.WIDTH, availableWidth) in normalPhoneLandscape_returnsSecondBreakpointSpec()
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/contentpreview/payloadtoggle/ui/composable/ |
D | ShareouselComposable.kt | 28 import androidx.compose.foundation.layout.aspectRatio in <lambda>() 166 val aspectRatio = viewModel.aspectRatio.coerceIn(MIN_ASPECT_RATIO, MAX_ASPECT_RATIO) in ShareouselCard() constant 176 modifier = Modifier.aspectRatio(aspectRatio), in ShareouselCard() 178 } ?: PlaceholderBox(aspectRatio) in ShareouselCard() 193 PlaceholderBox(aspectRatio) in ShareouselCard() 199 private fun PlaceholderBox(aspectRatio: Float) { in PlaceholderBox() 203 .aspectRatio(aspectRatio) in PlaceholderBox()
|
/packages/services/Car/cpp/evs/support_library/ |
D | ConfigManager.h | 61 float getDisplayRightLocation(float aspectRatio) const { in getDisplayRightLocation() argument 63 return (getDisplayTopLocation() - getDisplayBottomLocation()) * 0.5f * aspectRatio; in getDisplayRightLocation() 65 float getDisplayLeftLocation(float aspectRatio) const { in getDisplayLeftLocation() argument 67 return -getDisplayRightLocation(aspectRatio); in getDisplayLeftLocation()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/ |
D | FixedAspectSurfaceView.java | 37 private float aspectRatio; field in FixedAspectSurfaceView 63 aspectRatio = aspect; in setAspectRatio() 74 width = (int) (height * aspectRatio); in onMeasure() 76 height = (int) (width / aspectRatio); in onMeasure()
|
/packages/services/Car/cpp/evs/apps/default/inc/ |
D | ConfigManager.h | 69 float getDisplayRightLocation(float aspectRatio) const { in getDisplayRightLocation() argument 71 return (getDisplayTopLocation() - getDisplayBottomLocation()) * 0.5f * aspectRatio; in getDisplayRightLocation() 73 float getDisplayLeftLocation(float aspectRatio) const { in getDisplayLeftLocation() argument 75 return -getDisplayRightLocation(aspectRatio); in getDisplayLeftLocation()
|
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/features/preview/video/ |
D | VideoUi.kt | 38 import androidx.compose.foundation.layout.aspectRatio in <lambda>() 142 val aspectRatio by produceAspectRatio(surfaceId, video) in VideoUi() constant 194 aspectRatio = aspectRatio, in VideoUi() 252 aspectRatio: Float?, in VideoPlayer() 267 if (aspectRatio != null) Modifier.aspectRatio(aspectRatio).align(Alignment.Center) in VideoPlayer() 271 playerSizeSet = aspectRatio != null, in VideoPlayer()
|
/packages/apps/TV/src/com/android/tv/util/images/ |
D | ImageLoader.java | 451 int aspectRatio; in getAspectRatioFromPosterArtUri() local 462 aspectRatio = PreviewPrograms.ASPECT_RATIO_2_3; in getAspectRatioFromPosterArtUri() 464 aspectRatio = PreviewPrograms.ASPECT_RATIO_MOVIE_POSTER; in getAspectRatioFromPosterArtUri() 466 aspectRatio = PreviewPrograms.ASPECT_RATIO_1_1; in getAspectRatioFromPosterArtUri() 468 aspectRatio = PreviewPrograms.ASPECT_RATIO_4_3; in getAspectRatioFromPosterArtUri() 470 aspectRatio = PreviewPrograms.ASPECT_RATIO_3_2; in getAspectRatioFromPosterArtUri() 472 aspectRatio = PreviewPrograms.ASPECT_RATIO_16_9; in getAspectRatioFromPosterArtUri() 474 return aspectRatio; in getAspectRatioFromPosterArtUri()
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
D | AsyncImageView.java | 338 final float aspectRatio = measuredWidth / (float) measuredHeight; in onMeasure() local 339 if (aspectRatio == 0) { in onMeasure() 345 height = resolveSize((int) (minimumWidth / aspectRatio), in onMeasure() 347 width = (int) (height * aspectRatio); in onMeasure() 351 width = resolveSize((int) (minimumHeight * aspectRatio), in onMeasure() 353 height = (int) (width / aspectRatio); in onMeasure()
|
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/ |
D | CameraPreview.java | 82 final float aspectRatio = (float) mCameraWidth / (float) mCameraHeight; in getHeightMeasureSpec() local 85 height = (int) (width * aspectRatio); in getHeightMeasureSpec() 87 height = (int) (width / aspectRatio); in getHeightMeasureSpec()
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/ |
D | CameraPreview.java | 105 final float aspectRatio = (float) cameraWidth / (float) cameraHeight; in getHeightMeasureSpec() local 108 height = (int) (width * aspectRatio); in getHeightMeasureSpec() 110 height = (int) (width / aspectRatio); in getHeightMeasureSpec()
|