Home
last modified time | relevance | path

Searched refs:displayMetrics (Results 1 – 25 of 95) sorted by relevance

1234

/frameworks/base/services/autofill/java/com/android/server/autofill/ui/
DBottomSheetLayout.java64 DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics(); in onMeasure() local
76 final int screenHeight = displayMetrics.heightPixels; in onMeasure()
77 final int screenWidth = displayMetrics.widthPixels; in onMeasure()
97 + " screenHeight: " + screenHeight / displayMetrics.density + ", screenWidth: " in onMeasure()
98 + screenWidth / displayMetrics.density in onMeasure()
99 + ", maxHeight: " + maxHeight / displayMetrics.density in onMeasure()
100 + ", maxWidth: " + maxWidth / displayMetrics.density + ", getMeasuredWidth(): " in onMeasure()
101 + getMeasuredWidth() / displayMetrics.density + ", getMeasuredHeight(): " in onMeasure()
102 + getMeasuredHeight() / displayMetrics.density); in onMeasure()
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/util/
DDimension.kt28 fun Number.dpToPx(resources: Resources): Float = dpToPx(displayMetrics = resources.displayMetrics)
31 fun Number.dpToPx(displayMetrics: DisplayMetrics): Float =
32 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, toFloat(), displayMetrics)
DDialog.kt42 displayMetricsProvider = { targetView.resources.displayMetrics }, in <lambda>()
50 displayMetrics = targetView.resources.displayMetrics,
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/back/
DBackAnimationSpec.kt49 val displayMetrics = displayMetricsProvider() in createFloatingSurfaceAnimationSpec() constant
50 val screenWidthPx = displayMetrics.widthPixels in createFloatingSurfaceAnimationSpec()
51 val screenHeightPx = displayMetrics.heightPixels in createFloatingSurfaceAnimationSpec()
53 val maxMarginXPx = maxMarginXdp.dpToPx(displayMetrics) in createFloatingSurfaceAnimationSpec()
54 val maxMarginYPx = maxMarginYdp.dpToPx(displayMetrics) in createFloatingSurfaceAnimationSpec()
DBottomsheetBackAnimationSpec.kt32 val displayMetrics = displayMetricsProvider() in <lambda>() constant
33 val screenWidthPx = displayMetrics.widthPixels in <lambda>()
34 val minScale = 1 - MAX_SCALE_DELTA_DP.dpToPx(displayMetrics) / screenWidthPx in <lambda>()
DOnBackAnimationCallbackExtension.kt37 displayMetrics: DisplayMetrics, // TODO(b/265060720): We could remove this in onBackAnimationCallbackFrom()
53 val progressY = (backEvent.touchY - initialY) / displayMetrics.heightPixels in onBackProgressed()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ui/
DSwipeGestureListener.kt31 private val displayMetrics = view.resources.displayMetrics constant in com.android.systemui.screenshot.ui.SwipeGestureListener
46 abs(xVelocity) > FloatingWindowUtil.dpToPx(displayMetrics, FLING_THRESHOLD_DP) in onMotionEvent()
52 FloatingWindowUtil.dpToPx(displayMetrics, DISMISS_THRESHOLD_DP) in onMotionEvent()
DScreenshotShelfView.kt45 private val displayMetrics = context.resources.displayMetrics in <lambda>() constant
111 val insetRect = Rect(0, 0, gestureInsets.left, displayMetrics.heightPixels) in <lambda>()
115 displayMetrics.widthPixels - gestureInsets.right, in <lambda>()
117 displayMetrics.widthPixels, in <lambda>()
118 displayMetrics.heightPixels in <lambda>()
186 val padding = FloatingWindowUtil.dpToPx(displayMetrics, -1 * TOUCH_PADDING_DP).toInt() in <lambda>()
/frameworks/libs/systemui/toruslib/torus-utils/src/main/java/com/google/android/torus/utils/display/
DDisplayUtils.kt90 fun convertPixelToDp(pixels: Float, displayMetrics: DisplayMetrics): Float { in convertPixelToDp()
91 val densityRatio = displayMetrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT.toFloat() in convertPixelToDp()
104 fun convertDpToPixel(dp: Float, displayMetrics: DisplayMetrics): Float { in convertDpToPixel()
105 val densityRatio = displayMetrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT.toFloat() in convertDpToPixel()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DNavigationHandle.java58 DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); in NavigationHandle() local
60 displayMetrics); in NavigationHandle()
62 displayMetrics); in NavigationHandle()
74 displayMetrics); in NavigationHandle()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/back/
DOnBackAnimationCallbackExtensionTest.kt24 private val displayMetrics = constant
33 backAnimationSpec = BackAnimationSpec.floatingSystemSurfacesForSysUi { displayMetrics }, in <lambda>()
34 displayMetrics = displayMetrics,
DBackAnimationSpecTest.kt19 private var displayMetrics = variable
32 val backAnimationSpec = BackAnimationSpec.floatingSystemSurfacesForSysUi { displayMetrics } in sysUi_floatingSystemSurfaces_animationValues()
68 val minScale = 1 - 48.dpToPx(displayMetrics) / displayMetrics.widthPixels in sysUi_bottomsheet_animationValues()
70 val backAnimationSpec = BackAnimationSpec.bottomSheetForSysUi { displayMetrics } in sysUi_bottomsheet_animationValues()
/frameworks/base/packages/SystemUI/src/com/android/systemui/dagger/
DGlobalModule.java71 DisplayMetrics displayMetrics = new DisplayMetrics(); in provideDisplayMetrics() local
72 context.getDisplay().getMetrics(displayMetrics); in provideDisplayMetrics()
73 return displayMetrics; in provideDisplayMetrics()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
DClassifierTest.java50 DisplayMetrics displayMetrics = new DisplayMetrics(); in setup() local
51 displayMetrics.xdpi = 100; in setup()
52 displayMetrics.ydpi = 100; in setup()
53 displayMetrics.widthPixels = 1000; in setup()
54 displayMetrics.heightPixels = 1000; in setup()
56 displayMetrics, mBatteryController, mFoldStateListener, mDockManager, false); in setup()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/animation/
DFlingAnimationUtils.java57 public FlingAnimationUtils(DisplayMetrics displayMetrics, float maxLengthSeconds) { in FlingAnimationUtils() argument
58 this(displayMetrics, maxLengthSeconds, 0.0f); in FlingAnimationUtils()
67 public FlingAnimationUtils(DisplayMetrics displayMetrics, float maxLengthSeconds, in FlingAnimationUtils() argument
69 this(displayMetrics, maxLengthSeconds, speedUpFactor, -1.0f, 1.0f); in FlingAnimationUtils()
81 public FlingAnimationUtils(DisplayMetrics displayMetrics, float maxLengthSeconds, in FlingAnimationUtils() argument
94 mMinVelocityPxPerSecond = MIN_VELOCITY_DP_PER_SECOND * displayMetrics.density; in FlingAnimationUtils()
95 mHighVelocityPxPerSecond = HIGH_VELOCITY_DP_PER_SECOND * displayMetrics.density; in FlingAnimationUtils()
418 public Builder(DisplayMetrics displayMetrics) { in Builder() argument
419 mDisplayMetrics = displayMetrics; in Builder()
/frameworks/base/core/java/android/view/
DThreadedRenderer.java604 DisplayMetrics displayMetrics = new DisplayMetrics(); in setLightCenter() local
605 attachInfo.mDisplay.getRealMetrics(displayMetrics); in setLightCenter()
606 final float lightX = displayMetrics.widthPixels / 2f - attachInfo.mWindowLeft; in setLightCenter()
610 final float zRatio = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels) in setLightCenter()
611 / (450f * displayMetrics.density); in setLightCenter()
864 DisplayMetrics displayMetrics = new DisplayMetrics(); in setLightCenter() local
865 display.getRealMetrics(displayMetrics); in setLightCenter()
866 final float lightX = displayMetrics.widthPixels / 2f - windowLeft; in setLightCenter()
870 final float zRatio = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels) in setLightCenter()
871 / (450f * displayMetrics.density); in setLightCenter()
/frameworks/base/core/tests/coretests/src/android/view/
DViewFrameRateTest.java246 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in noVelocityUsesCategorySmall() local
249 float pixels = displayMetrics.widthPixels * displayMetrics.heightPixels * 0.07f; in noVelocityUsesCategorySmall()
254 float density = displayMetrics.density; in noVelocityUsesCategorySmall()
286 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in noVelocityUsesCategoryNarrowWidth() local
289 float pixels = displayMetrics.widthPixels * displayMetrics.heightPixels * 0.07f; in noVelocityUsesCategoryNarrowWidth()
294 float density = displayMetrics.density; in noVelocityUsesCategoryNarrowWidth()
325 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in noVelocityUsesCategoryNarrowHeight() local
328 float pixels = displayMetrics.widthPixels * displayMetrics.heightPixels * 0.07f; in noVelocityUsesCategoryNarrowHeight()
333 float density = displayMetrics.density; in noVelocityUsesCategoryNarrowHeight()
364 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in noVelocityUsesCategoryLargeWidth() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/
DUserSwitcherFullscreenDialog.kt62 val displayMetrics = context.resources.displayMetrics.apply { in <lambda>() constant
65 return displayMetrics.widthPixels in <lambda>()
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/
DRearDisplayPresentationStatus.java38 @NonNull DisplayMetrics displayMetrics) { in RearDisplayPresentationStatus() argument
40 mDisplayMetrics = displayMetrics; in RearDisplayPresentationStatus()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/
DDisplayMetricsRepositoryTest.kt45 private val displayMetrics = constant
56 displayMetrics, in setUp()
87 whenever(mockDisplay.getMetrics(displayMetrics)).thenAnswer { in updateDisplayMetrics()
/frameworks/base/core/java/com/android/internal/pm/parsing/
DPackageParser2.java76 public PackageParser2(String[] separateProcesses, DisplayMetrics displayMetrics, in PackageParser2() argument
78 if (displayMetrics == null) { in PackageParser2()
79 displayMetrics = new DisplayMetrics(); in PackageParser2()
80 displayMetrics.setToDefaults(); in PackageParser2()
99 mParsingUtils = new ParsingPackageUtils(separateProcesses, displayMetrics, splitPermissions, in PackageParser2()
/frameworks/base/core/java/android/appwidget/
DAppWidgetProviderInfo.java602 public void updateDimensions(DisplayMetrics displayMetrics) { in updateDimensions() argument
604 minWidth = TypedValue.complexToDimensionPixelSize(minWidth, displayMetrics); in updateDimensions()
605 minHeight = TypedValue.complexToDimensionPixelSize(minHeight, displayMetrics); in updateDimensions()
606 minResizeWidth = TypedValue.complexToDimensionPixelSize(minResizeWidth, displayMetrics); in updateDimensions()
607 minResizeHeight = TypedValue.complexToDimensionPixelSize(minResizeHeight, displayMetrics); in updateDimensions()
608 maxResizeWidth = TypedValue.complexToDimensionPixelSize(maxResizeWidth, displayMetrics); in updateDimensions()
609 maxResizeHeight = TypedValue.complexToDimensionPixelSize(maxResizeHeight, displayMetrics); in updateDimensions()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/
DAccessorizedBatteryDrawableTest.kt35 val density = context.resources.displayMetrics.density in intrinsicSize_shieldFalse_isBatterySize()
45 val density = context.resources.displayMetrics.density in intrinsicSize_shieldTrue_isBatteryPlusShieldSize()
/frameworks/opt/setupwizard/library/gingerbread/test/robotest/src/com/android/setupwizardlib/util/
DDimensionConsistencyTest.java62 DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics(); in dp2Px() local
63 return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, displayMetrics); in dp2Px()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DLSShadeTransitionLoggerTest.kt26 lateinit var displayMetrics: DisplayMetrics variable in com.android.systemui.statusbar.LSShadeTransitionLoggerTest
35 displayMetrics) in setup()

1234