Home
last modified time | relevance | path

Searched refs:dp (Results 1 – 25 of 49) sorted by relevance

12

/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DLayoutUtils.java45 public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) { in getDefaultSwipeHeight() argument
46 float swipeHeight = dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; in getDefaultSwipeHeight()
48 swipeHeight -= dp.getInsets().bottom; in getDefaultSwipeHeight()
53 public static void calculateLauncherTaskSize(Context context, DeviceProfile dp, Rect outRect) { in calculateLauncherTaskSize() argument
55 if (dp.isVerticalBarLayout()) { in calculateLauncherTaskSize()
60 extraSpace = getDefaultSwipeHeight(context, dp) + dp.verticalDragHandleSizePx in calculateLauncherTaskSize()
64 calculateTaskSize(context, dp, extraSpace, MULTI_WINDOW_STRATEGY_HALF_SCREEN, outRect); in calculateLauncherTaskSize()
67 public static void calculateFallbackTaskSize(Context context, DeviceProfile dp, Rect outRect) { in calculateFallbackTaskSize() argument
68 calculateTaskSize(context, dp, 0, MULTI_WINDOW_STRATEGY_DEVICE_PROFILE, outRect); in calculateFallbackTaskSize()
72 public static void calculateTaskSize(Context context, DeviceProfile dp, in calculateTaskSize() argument
[all …]
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/utils/
Dedit_distance.h33 float dp[(beforeLength + 1) * (afterLength + 1)]; in getEditDistance() local
35 dp[(afterLength + 1) * i] = i * policy->getInsertionCost(i - 1, -1); in getEditDistance()
38 dp[i] = i * policy->getDeletionCost(-1, i - 1); in getEditDistance()
43 dp[(afterLength + 1) * (i + 1) + (j + 1)] = std::min( in getEditDistance()
44 dp[(afterLength + 1) * i + (j + 1)] + policy->getInsertionCost(i, j), in getEditDistance()
46 dp[(afterLength + 1) * (i + 1) + j] + policy->getDeletionCost(i, j), in getEditDistance()
47 dp[(afterLength + 1) * i + j] + policy->getSubstitutionCost(i, j))); in getEditDistance()
49 dp[(afterLength + 1) * (i + 1) + (j + 1)] = std::min( in getEditDistance()
50 dp[(afterLength + 1) * (i + 1) + (j + 1)], in getEditDistance()
51 dp[(afterLength + 1) * (i - 1) + (j - 1)] in getEditDistance()
[all …]
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/
DBaseSwipeUpHandler.java242 DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext); in onRecentsAnimationStart() local
249 dp = dp.getMultiWindowProfile(mContext, new Point( in onRecentsAnimationStart()
253 dp = dp.copy(mContext); in onRecentsAnimationStart()
254 overviewStackBounds = getStackBounds(dp); in onRecentsAnimationStart()
256 dp.updateInsets(targetSet.homeContentInsets); in onRecentsAnimationStart()
257 dp.updateIsSeascape(mContext); in onRecentsAnimationStart()
262 mClipAnimationHelper.prepareAnimation(dp, false /* isOpening */); in onRecentsAnimationStart()
263 initTransitionEndpoints(dp); in onRecentsAnimationStart()
268 private Rect getStackBounds(DeviceProfile dp) { in getStackBounds() argument
276 return new Rect(0, 0, dp.widthPx, dp.heightPx); in getStackBounds()
[all …]
DLauncherActivityControllerHelper.java81 public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) { in getSwipeUpDestinationAndLength() argument
82 LayoutUtils.calculateLauncherTaskSize(context, dp, outRect); in getSwipeUpDestinationAndLength()
83 if (dp.isVerticalBarLayout() && SysUINavigationMode.getMode(context) != Mode.NO_BUTTON) { in getSwipeUpDestinationAndLength()
84 Rect targetInsets = dp.getInsets(); in getSwipeUpDestinationAndLength()
85 int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right; in getSwipeUpDestinationAndLength()
86 return dp.hotseatBarSizePx + hotseatInset; in getSwipeUpDestinationAndLength()
88 return LayoutUtils.getShelfTrackingDistance(context, dp); in getSwipeUpDestinationAndLength()
123 final DeviceProfile dp = activity.getDeviceProfile(); in prepareHomeUI() local
154 return HomeAnimationFactory.getDefaultWindowTargetRect(dp); in prepareHomeUI()
162 long accuracy = 2 * Math.max(dp.widthPx, dp.heightPx); in prepareHomeUI()
DFallbackActivityControllerHelper.java62 public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) { in getSwipeUpDestinationAndLength() argument
63 LayoutUtils.calculateFallbackTaskSize(context, dp, outRect); in getSwipeUpDestinationAndLength()
64 if (dp.isVerticalBarLayout() in getSwipeUpDestinationAndLength()
66 Rect targetInsets = dp.getInsets(); in getSwipeUpDestinationAndLength()
67 int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right; in getSwipeUpDestinationAndLength()
68 return dp.hotseatBarSizePx + hotseatInset; in getSwipeUpDestinationAndLength()
70 return dp.heightPx - outRect.bottom; in getSwipeUpDestinationAndLength()
/packages/apps/Car/libs/specs/
Dkeylines.csv13 keyline_1, 24dp, , , 32dp, , , 48dp
14 keyline_2, 96dp, , 104dp, 120dp, 140dp, ,
15 keyline_3, 112dp, , , 128dp, , , 152dp
/packages/apps/PermissionController/src/com/android/packageinstaller/role/utils/
DUiUtils.java49 public static float dpToPx(@Dimension(unit = Dimension.DP) float dp, @NonNull Context context) { in dpToPx()
51 return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, metrics); in dpToPx()
64 public static int dpToPxOffset(@Dimension(unit = Dimension.DP) float dp, in dpToPxOffset()
66 return (int) dpToPx(dp, context); in dpToPxOffset()
79 public static int dpToPxSize(@Dimension(unit = Dimension.DP) float dp, in dpToPxSize()
81 float value = dpToPx(dp, context); in dpToPxSize()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DActivityControlHelper.java53 int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect); in getSwipeUpDestinationAndLength() argument
147 static RectF getDefaultWindowTargetRect(DeviceProfile dp) { in getDefaultWindowTargetRect() argument
148 final int halfIconSize = dp.iconSizePx / 2; in getDefaultWindowTargetRect()
149 final float targetCenterX = dp.availableWidthPx / 2f; in getDefaultWindowTargetRect()
150 final float targetCenterY = dp.availableHeightPx - dp.hotseatBarSizePx; in getDefaultWindowTargetRect()
DBaseRecentsActivity.java104 DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(this).getDeviceProfile(this); in createDeviceProfile() local
108 return dp.copy(this); in createDeviceProfile()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/
DOverviewState.java95 DeviceProfile dp = launcher.getDeviceProfile(); in getHotseatScaleAndTranslation() local
96 if (dp.allAppsIconSizePx >= dp.iconSizePx) { in getHotseatScaleAndTranslation()
99 float scale = ((float) dp.allAppsIconSizePx) / dp.iconSizePx; in getHotseatScaleAndTranslation()
102 float distanceFromBottom = dp.heightPx / 2 - dp.hotseatBarBottomPaddingPx; in getHotseatScaleAndTranslation()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/views/
DShelfScrimView.java151 DeviceProfile dp = mLauncher.getDeviceProfile(); in reInitUi() local
152 mDrawingFlatColor = dp.isVerticalBarLayout(); in reInitUi()
166 Rect hotseatPadding = dp.getHotseatLayoutPadding(); in reInitUi()
167 int hotseatSize = dp.hotseatBarSizePx + dp.getInsets().bottom in reInitUi()
170 Math.min(hotseatSize, LayoutUtils.getDefaultSwipeHeight(context, dp)); in reInitUi()
173 mTopOffset = dp.getInsets().top - mShelfOffset; in reInitUi()
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DWorkspaceTouchListener.java92 DeviceProfile dp = mLauncher.getDeviceProfile(); in onTouch() local
94 Rect insets = dp.getInsets(); in onTouch()
98 mTempRect.inset(dp.edgeMarginPx, dp.edgeMarginPx); in onTouch()
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DPendingItemDragHelper.java125 DeviceProfile dp = launcher.getDeviceProfile(); in startDrag() local
126 int iconSize = dp.iconSizePx; in startDrag()
137 - iconSize - dp.iconTextSizePx - dp.iconDrawablePaddingPx) / 2; in startDrag()
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DLivePreviewWidgetCell.java61 DeviceProfile dp = activity.getDeviceProfile(); in generateFromRemoteViews() local
62 int viewWidth = dp.cellWidthPx * info.spanX; in generateFromRemoteViews()
63 int viewHeight = dp.cellHeightPx * info.spanY; in generateFromRemoteViews()
/packages/apps/Launcher3/go/quickstep/src/com/android/launcher3/uioverrides/states/
DOverviewState.java122 public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) {
123 return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
/packages/apps/Dialer/java/com/android/dialer/common/
DDpUtil.java28 public static float dpToPx(Context context, float dp) { in dpToPx() argument
29 return dp * context.getResources().getDisplayMetrics().density; in dpToPx()
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/
Ddb_utilities_poly.cpp30 double bp,bp2,cp,dp,q,r,srq; in db_SolveCubic() local
46 dp=d/a; in db_SolveCubic()
49 r=(2.0*bp2*bp-9.0*bp*cp+27.0*dp)/54.0; in db_SolveCubic()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DGalleryUtils.java108 public static float dpToPixel(float dp) { in dpToPixel() argument
109 return sPixelDensity * dp; in dpToPixel()
112 public static int dpToPixel(int dp) { in dpToPixel() argument
113 return Math.round(dpToPixel((float) dp)); in dpToPixel()
/packages/apps/Launcher3/src/com/android/launcher3/allapps/search/
DAppsSearchContainerLayout.java112 DeviceProfile dp = mLauncher.getDeviceProfile(); in onMeasure() local
117 int cellWidth = DeviceProfile.calculateCellWidth(rowWidth, dp.inv.numHotseatIcons); in onMeasure()
118 int iconVisibleSize = Math.round(ICON_VISIBLE_AREA_FACTOR * dp.iconSizePx); in onMeasure()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/
DRecentsUiFactory.java137 public static RotationMode getRotationMode(DeviceProfile dp) { in getRotationMode() argument
138 return !dp.isVerticalBarLayout() ? RotationMode.NORMAL in getRotationMode()
139 : (dp.isSeascape() ? ROTATION_SEASCAPE : ROTATION_LANDSCAPE); in getRotationMode()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DTouchTargetEnforcer.java123 private float dpToPx(int dp) { in dpToPx() argument
124 return dp * mDensity; in dpToPx()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/
DPortraitStatesTouchController.java320 DeviceProfile dp = launcher.getDeviceProfile(); in getHotseatTop() local
321 int hotseatHeight = dp.hotseatBarSizePx + dp.getInsets().bottom; in getHotseatTop()
DStatusBarTouchController.java168 DeviceProfile dp = mLauncher.getDeviceProfile(); in canInterceptTouch() local
169 if (ev.getY() > (mLauncher.getDragLayer().getHeight() - dp.getInsets().bottom)) { in canInterceptTouch()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/displayinfo/
DDisplayInfoFragment.java122 float dp = px / ((float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT); in convertPixelsToDp() local
123 return dp; in convertPixelsToDp()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/
DFallbackRecentsView.java104 protected void getTaskSize(DeviceProfile dp, Rect outRect) { in getTaskSize() argument
105 LayoutUtils.calculateFallbackTaskSize(getContext(), dp, outRect); in getTaskSize() local

12