Home
last modified time | relevance | path

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

12345678

/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java20 import android.graphics.Point;
72 public static Point getDefaultCropSurfaceSize(Resources resources, Display display) { in getDefaultCropSurfaceSize()
73 Point minDims = new Point(); in getDefaultCropSurfaceSize()
74 Point maxDims = new Point(); in getDefaultCropSurfaceSize()
81 Point realSize = new Point(); in getDefaultCropSurfaceSize()
94 public static Point calculateCropSurfaceSize(Resources resources, int maxDim, int minDim) { in calculateCropSurfaceSize()
104 return new Point(defaultWidth, defaultHeight); in calculateCropSurfaceSize()
123 public static Point calculateCenterPosition(Point outer, Point inner, boolean alignStart, in calculateCenterPosition()
130 Point relativePosition = new Point(); in calculateCenterPosition()
149 public static float calculateMinZoom(Point outer, Point inner) { in calculateMinZoom()
[all …]
DScreenSizeCalculator.java21 import android.graphics.Point;
37 private Point mPortraitScreenSize;
38 private Point mLandscapeScreenSize;
62 public Point getScreenSize(Display display) { in getScreenSize()
82 final Point screenSize = getScreenSize(windowManager.getDefaultDisplay()); in getScreenAspectRatio()
86 private Point getPortraitScreenSize(Display display) { in getPortraitScreenSize()
88 mPortraitScreenSize = new Point(); in getPortraitScreenSize()
94 private Point getLandscapeScreenSize(Display display) { in getLandscapeScreenSize()
96 mLandscapeScreenSize = new Point(); in getLandscapeScreenSize()
105 private void writeDisplaySizeToPoint(Display display, Point outPoint) { in writeDisplaySizeToPoint()
DSizeCalculator.java21 import android.graphics.Point;
163 public static Point getCategoryTileSize(@NonNull Activity activity) { in getCategoryTileSize()
176 public static Point getFeaturedCategoryTileSize(@NonNull Activity activity) { in getFeaturedCategoryTileSize()
189 public static Point getIndividualTileSize(@NonNull Activity activity) { in getIndividualTileSize()
202 public static Point getFeaturedIndividualTileSize(@NonNull Activity activity) { in getFeaturedIndividualTileSize()
217 public static Point getSuggestedThumbnailSize(@NonNull Context appContext) { in getSuggestedThumbnailSize()
241 private static Point getTileSize(Context context, int columnCount, int windowWidthPx) { in getTileSize()
245 Point screenSizePx = ScreenSizeCalculator.getInstance().getScreenSize(display); in getTileSize()
269 return new Point(widthPx, heightPx); in getTileSize()
277 private static Point getSquareTileSize(int columnCount, int windowWidthPx, int gridPaddingPx, in getSquareTileSize()
[all …]
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DCbGeoUtils.java250 Point sa = convertToDistanceFromOrigin(a); in distance()
251 Point sb = convertToDistanceFromOrigin(b); in distance()
252 Point sp = convertToDistanceFromOrigin(latLng); in distance()
270 private Point convertToDistanceFromOrigin(LatLng latLng) { in convertToDistanceFromOrigin()
293 public static Point convertToDistanceFromOrigin(@NonNull final LatLng origin, in convertToDistanceFromOrigin()
300 return new Point(x, y); in convertToDistanceFromOrigin()
307 public static class Point { class in CbGeoUtils
323 public Point(double x, double y) { in Point() method in CbGeoUtils.Point
333 public Point subtract(Point p) { in subtract()
334 return new Point(x - p.x, y - p.y); in subtract()
[all …]
/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/DirectRenderingCluster/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/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/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/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
DCbGeoUtilsTest.java106 CbGeoUtils.Point ptCenter = convert(origin, circle.getCenter()); in testExistingLatLngConversionToPoint()
107 CbGeoUtils.Point pt622 = convert(origin, ll622); in testExistingLatLngConversionToPoint()
160 CbGeoUtils.Point ptWestNorth = convert(origin, llWestNorth); in testDistanceFromSegmentToAngledPoint()
161 CbGeoUtils.Point ptWestSouth = convert(origin, llWestSouth); in testDistanceFromSegmentToAngledPoint()
177 CbGeoUtils.Point pt1 = new CbGeoUtils.Point(1.0, 1.0); in testPointEquals()
178 CbGeoUtils.Point pt2 = new CbGeoUtils.Point(1.0, 1.0); in testPointEquals()
185 CbGeoUtils.Point pt = new CbGeoUtils.Point(1.0, 1.0); in testPointToString()
238 private CbGeoUtils.Point newPoint(double x, double y) { in newPoint()
239 return new CbGeoUtils.Point(x, y); in newPoint()
251 private CbGeoUtils.Point convert(LatLng origin, LatLng latLng) { in convert()
/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/WallpaperPicker2/src/com/android/wallpaper/module/
DDefaultWallpaperPersister.java26 import android.graphics.Point;
114 Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(display); in setIndividualWallpaper()
147 Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(display); in setIndividualWallpaperWithPosition()
152 public void onDimensionsDecoded(@Nullable Point dimensions) { in setIndividualWallpaperWithPosition()
207 Point dimensions, Point screenSize, SetWallpaperCallback callback) { in setIndividualWallpaperWithCenterPosition()
245 Point dimensions, Point screenSize, SetWallpaperCallback callback) { in setIndividualWallpaperWithCenterCropPosition()
292 Point fillSize, @Destination int destination, SetWallpaperCallback callback) { in setIndividualWallpaperFill()
312 Point stretchSize, @Destination int destination, SetWallpaperCallback callback) { in setIndividualWallpaperStretch()
427 Point wallpaperSize = new Point(wallpaperBitmap.getWidth(), wallpaperBitmap.getHeight()); in cropAndSetWallpaperBitmapInRotationStatic()
431 Point defaultCropSurfaceSize = WallpaperCropUtils.getDefaultCropSurfaceSize( in cropAndSetWallpaperBitmapInRotationStatic()
[all …]
/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/Launcher3/src/com/android/launcher3/dragndrop/
DDragController.java22 import android.graphics.Point;
73 protected final Point mMotionDown = new Point();
75 protected final Point mLastTouch = new Point();
77 private final Point mTmpPoint = new Point();
144 Point dragOffset, in startDrag()
181 Point dragOffset, in startDrag()
199 Point dragOffset, in startDrag()
346 private Point getClampedDragLayerPos(float x, float y) { in getClampedDragLayerPos()
355 Point dragLayerPos = getClampedDragLayerPos(x, y); in onDriverDragMove()
393 Point dragLayerPos = getClampedDragLayerPos(ev.getX(), ev.getY()); in onControllerInterceptTouchEvent()
/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;
159 public Point calculateRawDimensions() { in calculateRawDimensions()
179 mDimensions = new Point(options.outHeight, options.outWidth); in calculateRawDimensions()
181 mDimensions = new Point(options.outWidth, options.outHeight); in calculateRawDimensions()
266 Point rawDimensions = calculateRawDimensions(); in doInBackground()
330 Point dimensions = calculateRawDimensions(); in doInBackground()
387 private class DecodeDimensionsAsyncTask extends AsyncTask<Void, Void, Point> {
395 protected Point doInBackground(Void... unused) { in doInBackground()
400 protected void onPostExecute(Point dimensions) { in onPostExecute()
DAsset.java23 import android.graphics.Point;
55 Point imageViewDimensions = getViewDimensions(imageView); in getPlaceholderDrawable()
66 private static Point getViewDimensions(View view) { in getViewDimensions()
71 return new Point(width, height); in getViewDimensions()
216 Point imageViewDimensions = getViewDimensions(imageView); in loadDrawableWithTransition()
291 Point screenSize = ScreenSizeCalculator.getInstance().getScreenSize(defaultDisplay); in loadPreviewImage()
356 void onDimensionsDecoded(@Nullable Point dimensions); in onDimensionsDecoded()
366 protected void adjustCropRect(Context context, Point assetDimensions, Rect cropRect) { in adjustCropRect()
387 Point imageViewDimensions = getViewDimensions(view); in CenterCropBitmapTask()
/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/protocol/
DVideoSurfaceTexture.java19 import android.graphics.Point;
46 void setSurfaceDimensions(Point surfaceDimensions); in setSurfaceDimensions()
48 Point getSurfaceDimensions(); in getSurfaceDimensions()
50 void setSourceVideoDimensions(Point sourceVideoDimensions); in setSourceVideoDimensions()
52 Point getSourceVideoDimensions(); in getSourceVideoDimensions()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DWallpaperPreviewBitmapTransformation.java20 import android.graphics.Point;
41 private Point mScreenSize;
58 new Point(toTransform.getWidth(), toTransform.getHeight()), in transform()
62 Point scaledThumbnailSize = new Point(Math.round(toTransform.getWidth() * scale), in transform()
64 Point scaledThumbnailToScreenSize = WallpaperCropUtils.calculateCenterPosition( in transform()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/jpegstream/
DJPEGInputStream.java19 import android.graphics.Point;
61 public Point getDimensions() throws IOException { in getDimensions()
64 return new Point(mWidth, mHeight); in getDimensions()
166 Point dimens = new Point(0, 0); in applyConfigChange()
182 native private int setup(Point dimens, InputStream in, int format); in setup()
/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