Home
last modified time | relevance | path

Searched refs:Point (Results 1 – 25 of 187) sorted by relevance

12345678

/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java20 import android.graphics.Point;
70 public static Point getDefaultCropSurfaceSize(Resources resources, Display display) { in getDefaultCropSurfaceSize()
71 Point minDims = new Point(); in getDefaultCropSurfaceSize()
72 Point maxDims = new Point(); in getDefaultCropSurfaceSize()
79 Point realSize = new Point(); in getDefaultCropSurfaceSize()
94 return new Point(defaultWidth, defaultHeight); in getDefaultCropSurfaceSize()
113 public static Point calculateCenterPosition(Point outer, Point inner, boolean alignStart, in calculateCenterPosition()
120 Point relativePosition = new Point(); in calculateCenterPosition()
139 public static float calculateMinZoom(Point outer, Point inner) { in calculateMinZoom()
156 public static Rect calculateVisibleRect(Point outer, Point inner) { in calculateVisibleRect()
[all …]
DTileSizeCalculator.java21 import android.graphics.Point;
116 public static Point getCategoryTileSize(@NonNull Activity activity) { in getCategoryTileSize()
127 public static Point getIndividualTileSize(@NonNull Activity activity) { in getIndividualTileSize()
140 public static Point getSuggestedThumbnailSize(@NonNull Context appContext) { in getSuggestedThumbnailSize()
163 private static Point getTileSize(Context context, int columnCount, int windowWidthPx) { in getTileSize()
167 Point screenSizePx = ScreenSizeCalculator.getInstance().getScreenSize(display); in getTileSize()
191 return new Point(widthPx, heightPx); in getTileSize()
199 private static Point getSquareTileSize(Context context, int columnCount, int windowWidthPx) { in getSquareTileSize()
209 return new Point(widthPx, widthPx); in getSquareTileSize()
218 Point outPoint = new Point(); in getActivityWindowWidthPx()
[all …]
DScreenSizeCalculator.java20 import android.graphics.Point;
35 private Point mPortraitScreenSize;
36 private Point mLandscapeScreenSize;
60 public Point getScreenSize(Display display) { in getScreenSize()
73 private Point getPortraitScreenSize(Display display) { in getPortraitScreenSize()
75 mPortraitScreenSize = new Point(); in getPortraitScreenSize()
81 private Point getLandscapeScreenSize(Display display) { in getLandscapeScreenSize()
83 mLandscapeScreenSize = new Point(); in getLandscapeScreenSize()
92 private void writeDisplaySizeToPoint(Display display, Point outPoint) { in writeDisplaySizeToPoint()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DGridSizeMigrationTaskTest.java15 import android.graphics.Point;
131 new Point(4, 4), new Point(3, 3)).migrateWorkspace(); in testWorkspace_empty_row_column_removed()
151 new Point(4, 4), new Point(3, 3)).migrateWorkspace(); in testWorkspace_new_screen_created()
176 new Point(4, 4), new Point(3, 3)).migrateWorkspace(); in testWorkspace_items_merged_in_next_screen()
208 new Point(4, 4), new Point(3, 3)).migrateWorkspace(); in testWorkspace_items_not_merged_in_next_screen()
239 new Point(4, 4), new Point(3, 4)).migrateWorkspace(); in testWorkspace_first_row_blocked()
266 new Point(4, 4), new Point(3, 3)).migrateWorkspace(); in testWorkspace_items_moved_to_empty_first_row()
325 verifier.migrate(new Point(3, 3), new Point(5, 5)); in testMultiStepMigration_small_to_large()
335 verifier.migrate(new Point(5, 5), new Point(3, 4)); in testMultiStepMigration_large_to_small()
345 verifier.migrate(new Point(5, 5), new Point(3, 7)); in testMultiStepMigration_zig_zag()
[all …]
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/
DPoint.java19 class Point { class
24 public Point(float x, float y) { in Point() method in Point
30 public Point(float x, float y, long timeOffsetNano) { in Point() method in Point
38 if (!(other instanceof Point)) { in equals()
41 Point otherPoint = ((Point) other); in equals()
52 public float dist(Point a) { in dist()
60 public float crossProduct(Point a, Point b) { in crossProduct()
68 public float dotProduct(Point a, Point b) { in dotProduct()
78 public float getAngle(Point a, Point b) { in getAngle()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DThumbnailCache.java23 import android.graphics.Point;
53 private final HashMap<SizeIndexKey, TreeMap<Point, CacheKey>> mSizeIndex;
73 public Result getThumbnail(Uri uri, UserId userId, Point size) { in getThumbnail()
74 TreeMap<Point, CacheKey> sizeMap; in getThumbnail()
91 Point otherSize = sizeMap.higherKey(size); in getThumbnail()
127 public void putThumbnail(Uri uri, UserId userId, Point size, Bitmap thumbnail, in putThumbnail()
131 TreeMap<Point, CacheKey> sizeMap; in putThumbnail()
152 TreeMap<Point, CacheKey> sizeMap; in removeUri()
168 TreeMap<Point, CacheKey> sizeMap; in removeKey()
218 private @Nullable Point mSize;
[all …]
/packages/apps/Car/Cluster/tests/robotests/src/android/car/cluster/
DImageResolverTest.java21 import android.graphics.Point;
52 assertEquals(new Point(20, 10), mImageResolver.getAdjustedSize(2, 20, 20)); in adjustedSize_widerImageInSquareBox()
57 assertEquals(new Point(10, 20), mImageResolver.getAdjustedSize(0.5, 20, 20)); in adjustedSize_tallerImageInSquareBox()
62 assertEquals(new Point(10, 20), mImageResolver.getAdjustedSize(0.5, 20, 20)); in adjustedSize_narrowerImageInSquareBox()
67 assertEquals(new Point(20, 8), mImageResolver.getAdjustedSize(2.5, 20, 20)); in adjustedSize_shorterImageInSquareBox()
72 assertEquals(new Point(20, 10), mImageResolver.getAdjustedSize(2, 20, 40)); in adjustedSize_widerImageInTallRectangle()
77 assertEquals(new Point(20, 40), mImageResolver.getAdjustedSize(0.5, 20, 40)); in adjustedSize_tallerImageInTallRectangle()
82 assertEquals(new Point(40, 20), mImageResolver.getAdjustedSize(2, 40, 20)); in adjustedSize_widerImageInWideRectangle()
87 assertEquals(new Point(10, 20), mImageResolver.getAdjustedSize(0.5, 40, 20)); in adjustedSize_tallerImageInWideRectangle()
97 assertEquals(new Point(20, 30), mImageResolver.getAdjustedSize(0.66667, 0, 30)); in adjustedSize_flexibleWidth()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DLocationClustering.java46 private static class Point { class in LocationClustering
47 public Point(double lat, double lng) { in Point() method in LocationClustering.Point
51 public Point() {} in Point() method in LocationClustering.Point
87 final ArrayList<Point> points = new ArrayList<Point>(); in run()
93 points.add(new Point(s.lat, s.lng)); in run()
104 Point[] pointsArray = new Point[m]; in run()
204 private static int[] kMeans(Point points[], int[] bestK) { in kMeans()
211 Point[] center = new Point[maxK]; // center of each group. in kMeans()
212 Point[] groupSum = new Point[maxK]; // sum of points in each group. in kMeans()
217 center[i] = new Point(); in kMeans()
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/
DGestureBot.java21 import android.graphics.Point;
65 Point[] points = new Point[LONGPRESS_STEPS + TRAVELING_STEPS]; in gestureSelectFiles()
69 points[i] = new Point(startCoord.centerX(), startCoord.centerY()); in gestureSelectFiles()
76 points[i + LONGPRESS_STEPS] = new Point(newX, newY); in gestureSelectFiles()
82 public void bandSelection(Point start, Point end) throws Exception { in bandSelection()
86 public void fingerSelection(Point start, Point end) throws Exception { in fingerSelection()
90 public void bandSelection(Point start, Point end, int steps) throws Exception { in bandSelection()
97 private void fingerSelection(Point start, Point end, int steps) throws Exception { in fingerSelection()
/packages/apps/Launcher3/src/com/android/launcher3/
DDeviceProfile.java22 import android.graphics.Point;
144 Point minSize, Point maxSize, int width, int height, boolean isLandscape, in DeviceProfile()
146 Point windowPosition) { in DeviceProfile()
254 Point size = new Point(availableWidthPx, availableHeightPx); in toBuilder()
272 Point mwSize = new Point(Math.min(availableWidthPx, windowBounds.availableSize.x), in getMultiWindowProfile()
422 Point totalWorkspacePadding = getTotalWorkspacePadding(); in updateAvailableFolderCellDimensions()
469 public Point getCellSize() { in getCellSize()
473 private Point getCellSize(int numColumns, int numRows) { in getCellSize()
474 Point result = new Point(); in getCellSize()
477 Point padding = getTotalWorkspacePadding(); in getCellSize()
[all …]
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DBandSelectionUiTest.java19 import android.graphics.Point;
44 Point start = new Point(dirListBounds.right - 1, startDir.centerY()); in testBandSelection_allFiles()
45 Point end = new Point(dirListBounds.left + 1, dirListBounds.bottom - 1); in testBandSelection_allFiles()
57 Point start = new Point(dirListBounds.right - 1, startDoc.bottom - 1); in testBandSelection_someFiles()
59 Point end = new Point(endDoc.centerX(), endDoc.centerY()); in testBandSelection_someFiles()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DConfigMonitor.java26 import android.graphics.Point;
40 private final Point mTmpPoint1 = new Point();
41 private final Point mTmpPoint2 = new Point();
48 private final Point mRealSize;
49 private final Point mSmallestSize, mLargestSize;
65 mRealSize = new Point(displayInfo.realSize); in ConfigMonitor()
66 mSmallestSize = new Point(displayInfo.smallestSize); in ConfigMonitor()
67 mLargestSize = new Point(displayInfo.largestSize); in ConfigMonitor()
DDefaultDisplay.java23 import android.graphics.Point;
134 public final Point realSize;
135 public final Point smallestSize;
136 public final Point largestSize;
141 public Info(int id, int rotation, int singleFrameMs, Point realSize, Point smallestSize, in Info()
142 Point largestSize, DisplayMetrics metrics) { in Info()
164 realSize = new Point(); in Info()
165 smallestSize = new Point(); in Info()
166 largestSize = new Point(); in Info()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DViewAutoScrollerTest.java22 import android.graphics.Point;
50 private Point mPoint;
59 mPoint = new Point(); in setUp()
73 public Point getCurrentPosition() { in setUp()
98 mPoint = new Point(0, VIEW_HEIGHT/2); in testCursorNotInScrollZone()
110 mPoint = new Point(0, TOP_Y_POINT); in testCursorInScrollZone_notActive()
122 mPoint = new Point(0, TOP_Y_POINT); in testCursorInScrollZone_top()
133 mPoint = new Point(0, BOTTOM_Y_POINT); in testCursorInScrollZone_bottom()
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/
DWallpaperCropActivity.java29 import android.graphics.Point;
278 Point wallpaperSize = WallpaperUtils.getDefaultWallpaperSize( in onLoadRequestComplete()
337 Point inSize = mCropView.getSourceDimensions(); in cropImageAndSetWallpaper()
338 Point outSize = WallpaperUtils.getDefaultWallpaperSize(getResources(), in cropImageAndSetWallpaper()
344 CropAndFinishHandler onEndCrop = new CropAndFinishHandler(new Point(0, 0), in cropImageAndSetWallpaper()
361 Point displaySize = new Point(); in cropImageAndSetWallpaper()
365 Point defaultWallpaperSize = WallpaperUtils.getDefaultWallpaperSize(getResources(), in cropImageAndSetWallpaper()
370 Point inSize = mCropView.getSourceDimensions(); in cropImageAndSetWallpaper()
418 CropAndFinishHandler onEndCrop = new CropAndFinishHandler(new Point(outWidth, outHeight), in cropImageAndSetWallpaper()
436 public void setBoundsAndFinish(Point bounds, boolean overrideTransition) {
[all …]
DWallpaperUtils.java25 import android.graphics.Point;
65 final Point defaultWallpaperSize = getDefaultWallpaperSize( in suggestWallpaperDimensionPreK()
91 final Point size = getDefaultWallpaperSize( in suggestWallpaperDimension()
128 private static Point sDefaultWallpaperSize;
131 public static Point getDefaultWallpaperSize(Resources res, WindowManager windowManager) { in getDefaultWallpaperSize()
133 Point realSize = new Point(); in getDefaultWallpaperSize()
148 sDefaultWallpaperSize = new Point(defaultWidth, defaultHeight); in getDefaultWallpaperSize()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DBuiltInWallpaperAsset.java23 import android.graphics.Point;
53 private Point mDimensions;
99 private Point calculateRawDimensions() { in calculateRawDimensions()
106 mDimensions = new Point(builtInBitmap.getWidth(), builtInBitmap.getHeight()); in calculateRawDimensions()
180 Point dimensions = calculateRawDimensions(); in doInBackground()
205 private class DecodeDimensionsAsyncTask extends AsyncTask<Void, Void, Point> {
213 protected Point doInBackground(Void... unused) { in doInBackground()
218 protected void onPostExecute(Point dimensions) { in onPostExecute()
DStreamableAsset.java24 import android.graphics.Point;
43 private Point mDimensions;
158 public Point calculateRawDimensions() { in calculateRawDimensions()
178 mDimensions = new Point(options.outHeight, options.outWidth); in calculateRawDimensions()
180 mDimensions = new Point(options.outWidth, options.outHeight); in calculateRawDimensions()
265 Point rawDimensions = calculateRawDimensions(); in doInBackground()
374 private class DecodeDimensionsAsyncTask extends AsyncTask<Void, Void, Point> {
382 protected Point doInBackground(Void... unused) { in doInBackground()
387 protected void onPostExecute(Point dimensions) { in onPostExecute()
/packages/apps/Dialer/java/com/android/incallui/video/impl/
DSurfaceViewVideoCallFragment.java22 import android.graphics.Point;
413 Point previewOffsetStartShown = getPreviewOffsetStartShown(); in exitFullscreenMode()
447 private Point getControlsOffsetEndHidden(View controls) { in getControlsOffsetEndHidden()
449 return new Point(0, getOffsetBottom(controls)); in getControlsOffsetEndHidden()
451 return new Point(getOffsetStart(controls), 0); in getControlsOffsetEndHidden()
455 private Point getSwitchOnHoldOffsetEndHidden(View swapCallButton) { in getSwitchOnHoldOffsetEndHidden()
457 return new Point(0, getOffsetTop(swapCallButton)); in getSwitchOnHoldOffsetEndHidden()
459 return new Point(getOffsetEnd(swapCallButton), 0); in getSwitchOnHoldOffsetEndHidden()
463 private Point getContactGridOffsetEndHidden(View view) { in getContactGridOffsetEndHidden()
464 return new Point(0, getOffsetTop(view)); in getContactGridOffsetEndHidden()
[all …]
DVideoCallFragment.java25 import android.graphics.Point;
512 Point previewOffsetStartShown = getPreviewOffsetStartShown(); in exitFullscreenMode()
546 private Point getControlsOffsetEndHidden(View controls) { in getControlsOffsetEndHidden()
548 return new Point(0, getOffsetBottom(controls)); in getControlsOffsetEndHidden()
550 return new Point(getOffsetStart(controls), 0); in getControlsOffsetEndHidden()
554 private Point getSwitchOnHoldOffsetEndHidden(View swapCallButton) { in getSwitchOnHoldOffsetEndHidden()
556 return new Point(0, getOffsetTop(swapCallButton)); in getSwitchOnHoldOffsetEndHidden()
558 return new Point(getOffsetEnd(swapCallButton), 0); in getSwitchOnHoldOffsetEndHidden()
562 private Point getContactGridOffsetEndHidden(View view) { in getContactGridOffsetEndHidden()
563 return new Point(0, getOffsetTop(view)); in getContactGridOffsetEndHidden()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/
DDefaultWallpaperPersister.java25 import android.graphics.Point;
111 Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(display); in setIndividualWallpaper()
144 Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(display); in setIndividualWallpaperWithPosition()
149 public void onDimensionsDecoded(@Nullable Point dimensions) { in setIndividualWallpaperWithPosition()
204 Point dimensions, Point screenSize, SetWallpaperCallback callback) { in setIndividualWallpaperWithCenterPosition()
246 Point dimensions, Point screenSize, SetWallpaperCallback callback) { in setIndividualWallpaperWithCenterCropPosition()
293 Point fillSize, @Destination int destination, SetWallpaperCallback callback) { in setIndividualWallpaperFill()
313 Point stretchSize, @Destination int destination, SetWallpaperCallback callback) { in setIndividualWallpaperStretch()
569 private Point mFillSize;
571 private Point mStretchSize;
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DDragController.java29 import android.graphics.Point;
79 private final Point mMotionDown = new Point();
81 private final Point mLastTouch = new Point();
83 private final Point mTmpPoint = new Point();
142 DragSource source, ItemInfo dragInfo, Point dragOffset, Rect dragRegion, in startDrag()
192 dragView.setDragVisualizeOffset(new Point(dragOffset)); in startDrag()
359 private Point getClampedDragLayerPos(float x, float y) { in getClampedDragLayerPos()
368 Point dragLayerPos = getClampedDragLayerPos(x, y); in onDriverDragMove()
409 Point dragLayerPos = getClampedDragLayerPos(ev.getX(), ev.getY()); in onControllerInterceptTouchEvent()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DWallpaperPreviewBitmapTransformation.java20 import android.graphics.Point;
40 private Point mScreenSize;
57 new Point(toTransform.getWidth(), toTransform.getHeight()), in transform()
59 Point scaledThumbnailSize = new Point(Math.round(toTransform.getWidth() * scale), in transform()
61 Point scaledThumbnailToScreenSize = WallpaperCropUtils.calculateCenterPosition( in transform()
/packages/apps/Gallery2/src/com/android/photos/data/
DGalleryBitmapPool.java20 import android.graphics.Point;
50 private static final Point[] COMMON_PHOTO_ASPECT_RATIOS =
51 { new Point(4, 3), new Point(3, 2), new Point(16, 9) };
95 for (Point ar : COMMON_PHOTO_ASPECT_RATIOS) { in getPoolIndexForDimensions()
/packages/apps/Dialer/java/com/android/incallui/videosurface/impl/
DVideoSurfaceTextureImpl.java19 import android.graphics.Point;
44 private Point surfaceDimensions;
45 private Point sourceVideoDimensions;
70 public void setSurfaceDimensions(Point surfaceDimensions) { in setSurfaceDimensions()
88 public Point getSurfaceDimensions() { in getSurfaceDimensions()
93 public void setSourceVideoDimensions(Point sourceVideoDimensions) { in setSourceVideoDimensions()
98 public Point getSourceVideoDimensions() { in getSourceVideoDimensions()

12345678