Home
last modified time | relevance | path

Searched refs:aspectRatio (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/
DPipSnapAlgorithm.java131 public Size getSizeForAspectRatio(float aspectRatio, float minEdgeSize, int displayWidth, in getSizeForAspectRatio() argument
138 if (aspectRatio <= mMinAspectRatioForMinSize || aspectRatio > mMaxAspectRatioForMinSize) { in getSizeForAspectRatio()
140 if (aspectRatio <= 1) { in getSizeForAspectRatio()
143 height = Math.round(width / aspectRatio); in getSizeForAspectRatio()
147 width = Math.round(height * aspectRatio); in getSizeForAspectRatio()
155 (aspectRatio * aspectRatio + 1))); in getSizeForAspectRatio()
156 width = Math.round(height * aspectRatio); in getSizeForAspectRatio()
165 public Size getSizeForAspectRatio(Size size, float aspectRatio, float minEdgeSize) { in getSizeForAspectRatio() argument
171 if (aspectRatio <= 1) { in getSizeForAspectRatio()
174 height = Math.round(width / aspectRatio); in getSizeForAspectRatio()
[all …]
DPipBoundsHandler.java248 public void onAspectRatioChanged(float aspectRatio) { in onAspectRatioChanged() argument
249 mAspectRatio = aspectRatio; in onAspectRatioChanged()
255 Rect getDestinationBounds(ComponentName componentName, float aspectRatio, Rect bounds, in getDestinationBounds() argument
257 return getDestinationBounds(componentName, aspectRatio, bounds, minimalSize, in getDestinationBounds()
264 Rect getDestinationBounds(ComponentName componentName, float aspectRatio, Rect bounds, in getDestinationBounds() argument
280 if (isValidPictureInPictureAspectRatio(aspectRatio)) { in getDestinationBounds()
281 transformBoundsToAspectRatio(destinationBounds, aspectRatio, useCurrentMinEdgeSize); in getDestinationBounds()
283 mAspectRatio = aspectRatio; in getDestinationBounds()
377 private boolean isValidPictureInPictureAspectRatio(float aspectRatio) { in isValidPictureInPictureAspectRatio() argument
378 return Float.compare(mMinAspectRatio, aspectRatio) <= 0 in isValidPictureInPictureAspectRatio()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/pip/
DPipBoundsHandlerTest.java130 for (float aspectRatio : aspectRatios) { in getDestinationBounds_returnBoundsMatchesAspectRatio()
132 mTestComponentName1, aspectRatio, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE); in getDestinationBounds_returnBoundsMatchesAspectRatio()
136 aspectRatio, actualAspectRatio, ASPECT_RATIO_ERROR_MARGIN); in getDestinationBounds_returnBoundsMatchesAspectRatio()
146 for (float aspectRatio : invalidAspectRatios) { in getDestinationBounds_invalidAspectRatio_returnsDefaultAspectRatio()
148 mTestComponentName1, aspectRatio, EMPTY_CURRENT_BOUNDS, EMPTY_MINIMAL_SIZE); in getDestinationBounds_invalidAspectRatio_returnsDefaultAspectRatio()
159 final float aspectRatio = (DEFAULT_ASPECT_RATIO + MAX_ASPECT_RATIO) / 2; in getDestinationBounds_withCurrentBounds_returnBoundsMatchesAspectRatio() local
161 currentBounds.right = (int) (currentBounds.height() * aspectRatio) + currentBounds.left; in getDestinationBounds_withCurrentBounds_returnBoundsMatchesAspectRatio()
164 mTestComponentName1, aspectRatio, currentBounds, EMPTY_MINIMAL_SIZE); in getDestinationBounds_withCurrentBounds_returnBoundsMatchesAspectRatio()
169 aspectRatio, actualAspectRatio, ASPECT_RATIO_ERROR_MARGIN); in getDestinationBounds_withCurrentBounds_returnBoundsMatchesAspectRatio()
185 final float aspectRatio = aspectRatios[i]; in getDestinationBounds_withMinSize_returnMinBounds() local
[all …]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
DIllustration.java52 private float aspectRatio = 0.0f; field in Illustration
76 aspectRatio = a.getFloat(R.styleable.SuwIllustration_suwAspectRatio, 0.0f); in init()
122 public void setAspectRatio(float aspectRatio) { in setAspectRatio() argument
123 this.aspectRatio = aspectRatio; in setAspectRatio()
136 if (aspectRatio != 0.0f) { in onMeasure()
138 int illustrationHeight = (int) (parentWidth / aspectRatio); in onMeasure()
158 if (aspectRatio != 0f) { in onLayout()
DIllustrationVideoView.java306 float aspectRatio = 0.0f; in onPrepared() local
308 aspectRatio = (float) mp.getVideoHeight() / mp.getVideoWidth(); in onPrepared()
312 if (Float.compare(mAspectRatio, aspectRatio) != 0) { in onPrepared()
313 mAspectRatio = aspectRatio; in onPrepared()
/frameworks/base/services/core/java/com/android/server/wm/
DPinnedStackController.java158 public boolean isValidPictureInPictureAspectRatio(float aspectRatio) { in isValidPictureInPictureAspectRatio() argument
159 return Float.compare(mMinAspectRatio, aspectRatio) <= 0 && in isValidPictureInPictureAspectRatio()
160 Float.compare(aspectRatio, mMaxAspectRatio) <= 0; in isValidPictureInPictureAspectRatio()
230 void setAspectRatio(float aspectRatio) { in setAspectRatio() argument
231 if (Float.compare(mAspectRatio, aspectRatio) != 0) { in setAspectRatio()
232 mAspectRatio = aspectRatio; in setAspectRatio()
233 notifyAspectRatioChanged(aspectRatio); in setAspectRatio()
269 private void notifyAspectRatioChanged(float aspectRatio) { in notifyAspectRatioChanged() argument
272 mPinnedStackListener.onAspectRatioChanged(aspectRatio); in notifyAspectRatioChanged()
DActivityStack.java3266 void setPictureInPictureAspectRatio(float aspectRatio) { in setPictureInPictureAspectRatio() argument
3283 if (Float.compare(aspectRatio, pinnedStackController.getAspectRatio()) == 0) { in setPictureInPictureAspectRatio()
3291 pinnedStackController.isValidPictureInPictureAspectRatio(aspectRatio) in setPictureInPictureAspectRatio()
3292 ? aspectRatio : -1f); in setPictureInPictureAspectRatio()
DDisplayContent.java1768 final float aspectRatio = Math.max(w, h) / (float) Math.min(w, h); in isNonDecorDisplayCloseToSquare() local
1769 return aspectRatio <= mCloseToSquareMaxAspectRatio; in isNonDecorDisplayCloseToSquare()
DActivityRecord.java6382 final float aspectRatio = (0.5f + Math.max(appWidth, appHeight)) in inSizeCompatMode() local
6384 if (aspectRatio >= info.maxAspectRatio) { in inSizeCompatMode()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DPinnedStackListenerForwarder.java97 public void onAspectRatioChanged(float aspectRatio) { in onAspectRatioChanged() argument
99 listener.onAspectRatioChanged(aspectRatio); in onAspectRatioChanged()
122 public void onAspectRatioChanged(float aspectRatio) {} in onAspectRatioChanged() argument
/frameworks/base/core/java/android/app/
DPictureInPictureParams.java58 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio() argument
59 mAspectRatio = aspectRatio; in setAspectRatio()
158 PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureParams() argument
160 mAspectRatio = aspectRatio; in PictureInPictureParams()
/frameworks/native/services/surfaceflinger/DisplayHardware/
DFramebufferSurface.cpp189 float aspectRatio = float(width) / float(height); in limitFramebufferSize() local
190 framebufferSize.height = mMaxWidth / aspectRatio; in limitFramebufferSize()
195 float aspectRatio = float(width) / float(height); in limitFramebufferSize() local
197 framebufferSize.width = mMaxHeight * aspectRatio; in limitFramebufferSize()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/
DIllustrationVideoViewTest.java134 final float aspectRatio = (float) view.getMeasuredHeight() / view.getMeasuredWidth(); in prepareVideo_shouldSetAspectRatio() local
135 assertThat(aspectRatio).isWithin(0.001f).of(1280f / 720f); in prepareVideo_shouldSetAspectRatio()
148 final float aspectRatio = (float) view.getHeight() / view.getWidth(); in prepareVideo_zeroHeight_shouldSetAspectRatioToZero() local
149 assertThat(aspectRatio).isEqualTo(0.0f); in prepareVideo_zeroHeight_shouldSetAspectRatioToZero()
/frameworks/base/core/java/android/view/
DIPinnedStackListener.aidl82 void onAspectRatioChanged(float aspectRatio); in onAspectRatioChanged() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DMediaControlPanel.java349 float aspectRatio = drawable.getIntrinsicHeight() / (float) drawable.getIntrinsicWidth(); in scaleDrawable() local
351 if (aspectRatio > 1.0f) { in scaleDrawable()
352 bounds = new Rect(0, 0, mAlbumArtSize, (int) (mAlbumArtSize * aspectRatio)); in scaleDrawable()
354 bounds = new Rect(0, 0, (int) (mAlbumArtSize / aspectRatio), mAlbumArtSize); in scaleDrawable()
/frameworks/base/core/java/android/gesture/
DGestureUtils.java108 float aspectRatio = gestureWidth / gestureHeight; in spatialSampling()
109 if (aspectRatio > 1) { in spatialSampling()
110 aspectRatio = 1 / aspectRatio; in spatialSampling()
112 if (aspectRatio < SCALING_THRESHOLD) { in spatialSampling()
/frameworks/av/services/camera/libcameraservice/tests/
DRotateAndCropMapperTest.cpp156 float aspectRatio = static_cast<float>(full_crop[2]) / full_crop[3]; in TEST() local
157 int32_t rw = full_crop[3] / aspectRatio; in TEST()
247 float aspectRatio = static_cast<float>(full_crop[2]) / full_crop[3]; in TEST() local
248 int32_t rw = full_crop[3] / aspectRatio; in TEST()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DSizeCompatTests.java143 final float aspectRatio = 1.2f; in testFixedAspectRatioBoundsWithDecorInSquareDisplay() local
144 mActivity.info.minAspectRatio = mActivity.info.maxAspectRatio = aspectRatio; in testFixedAspectRatioBoundsWithDecorInSquareDisplay()
157 assertEquals(appBounds.height(), appBounds.width() * aspectRatio, 0.5f /* delta */); in testFixedAspectRatioBoundsWithDecorInSquareDisplay()
166 assertEquals(appBounds.width(), appBounds.height() * aspectRatio, 0.5f /* delta */); in testFixedAspectRatioBoundsWithDecorInSquareDisplay()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/
DSetupWizardLayout.java268 public void setIllustrationAspectRatio(float aspectRatio) { in setIllustrationAspectRatio() argument
272 illustration.setAspectRatio(aspectRatio); in setIllustrationAspectRatio()
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/
DPipManager.java231 public void onAspectRatioChanged(float aspectRatio) { in onAspectRatioChanged() argument
232 mHandler.post(() -> mPipBoundsHandler.onAspectRatioChanged(aspectRatio)); in onAspectRatioChanged()
DPipTouchHandler.java455 float aspectRatio = (float) normalBounds.width() / normalBounds.height(); in onMovementBoundsChanged() local
458 Size expandedSize = mSnapAlgorithm.getSizeForAspectRatio(aspectRatio, in onMovementBoundsChanged()
/frameworks/av/services/camera/libcameraservice/api2/
DDepthCompositeStream.cpp731 float aspectRatio = static_cast<float> (width) / static_cast<float> (height); in getMatchingDepthSize() local
744 if ((fabs(aspectRatio - currentRatio) <= arTol) && (currentSize > oldSize)) { in getMatchingDepthSize()
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/
DWallpaperCropActivity.java210 float aspectRatio = width / (float) height; in wallpaperTravelToScreenWidthRatio() local
231 return x * aspectRatio + y; in wallpaperTravelToScreenWidthRatio()
/frameworks/base/cmds/bootanimation/
DBootAnimation.cpp355 const float aspectRatio = float(width) / float(height); in limitSurfaceSize() local
357 limited.height = mMaxWidth / aspectRatio; in limitSurfaceSize()
363 limited.width = mMaxHeight * aspectRatio; in limitSurfaceSize()
/frameworks/base/core/java/android/widget/
DEditor.java489 float aspectRatio = AppGlobals.getFloatCoreSetting( in createBuilderWithInlineMagnifierDefaults() local
496 if (aspectRatio < 3 || aspectRatio > 8) { in createBuilderWithInlineMagnifierDefaults()
497 aspectRatio = 5.5f; in createBuilderWithInlineMagnifierDefaults()
513 final int width = (int)(aspectRatio * Math.max(sourceHeight, mMinLineHeightForMagnifier)); in createBuilderWithInlineMagnifierDefaults()

12