Home
last modified time | relevance | path

Searched refs:options (Results 1 – 25 of 204) sorted by relevance

123456789

/packages/apps/Gallery2/src/com/android/gallery3d/data/
DDecodeUtils.java45 public DecodeCanceller(Options options) { in DecodeCanceller() argument
46 mOptions = options; in DecodeCanceller()
56 public static void setOptionsMutable(Options options) { in setOptionsMutable() argument
57 if (ApiHelper.HAS_OPTIONS_IN_MUTABLE) options.inMutable = true; in setOptionsMutable()
60 public static Bitmap decode(JobContext jc, FileDescriptor fd, Options options) { in decode() argument
61 if (options == null) options = new Options(); in decode()
62 jc.setCancelListener(new DecodeCanceller(options)); in decode()
63 setOptionsMutable(options); in decode()
65 BitmapFactory.decodeFileDescriptor(fd, null, options)); in decode()
69 Options options) { in decodeBounds() argument
[all …]
/packages/services/Car/tools/emulator/
DVehicleHalProto_pb2.py27 options=None,
31 options=None,
35 options=None,
39 options=None,
43 options=None,
47 options=None,
51 options=None,
55 options=None,
59 options=None,
63 options=None,
[all …]
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPhotoSource.java129 public Bitmap next(BitmapFactory.Options options, int longSide, int shortSide) { in next() argument
143 image = load(imageData, options, longSide, shortSide); in next()
153 options, longSide, shortSide); in next()
159 public Bitmap load(ImageData data, BitmapFactory.Options options, int longSide, int shortSide) { in load() argument
168 options.inJustDecodeBounds = true; in load()
169 options.inSampleSize = 1; in load()
170 image = BitmapFactory.decodeStream(new BufferedInputStream(bis), null, options); in load()
171 int rawLongSide = Math.max(options.outWidth, options.outHeight); in load()
172 int rawShortSide = Math.min(options.outWidth, options.outHeight); in load()
184 options.inSampleSize *= 2; in load()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DImageRequest.java152 final BitmapFactory.Options options = PoolableImageCache.getBitmapOptionsForPool( in loadBitmapInternal() local
159 options.inJustDecodeBounds = true; in loadBitmapInternal()
160 BitmapFactory.decodeStream(inputStream, null, options); in loadBitmapInternal()
163 mDescriptor.updateSourceDimensions(options.outHeight, options.outWidth); in loadBitmapInternal()
165 mDescriptor.updateSourceDimensions(options.outWidth, options.outHeight); in loadBitmapInternal()
174 options.outWidth = mDescriptor.sourceWidth; in loadBitmapInternal()
175 options.outHeight = mDescriptor.sourceHeight; in loadBitmapInternal()
179 options.inSampleSize = ImageUtils.get().calculateInSampleSize(options, in loadBitmapInternal()
181 Assert.isTrue(options.inSampleSize > 0); in loadBitmapInternal()
196 options.inJustDecodeBounds = false; in loadBitmapInternal()
[all …]
DFileImageRequest.java61 final BitmapFactory.Options options = PoolableImageCache.getBitmapOptionsForPool( in loadBitmapInternal() local
64 options.inJustDecodeBounds = true; in loadBitmapInternal()
65 BitmapFactory.decodeByteArray(thumbnail, 0, thumbnail.length, options); in loadBitmapInternal()
68 options.inSampleSize = ImageUtils.get().calculateInSampleSize(options, in loadBitmapInternal()
71 options.inJustDecodeBounds = false; in loadBitmapInternal()
82 mDescriptor.updateSourceDimensions(options.outHeight, options.outWidth); in loadBitmapInternal()
84 mDescriptor.updateSourceDimensions(options.outWidth, options.outHeight); in loadBitmapInternal()
89 options); in loadBitmapInternal()
91 final int sampledWidth = options.outWidth / options.inSampleSize; in loadBitmapInternal()
92 final int sampledHeight = options.outHeight / options.inSampleSize; in loadBitmapInternal()
[all …]
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
DDrawableDownloader.java86 BitmapDrawable findDrawable(BitmapWorkerOptions options) { in findDrawable() argument
96 if (options.getHeight() != BitmapWorkerOptions.MAX_IMAGE_DIMENSION_PX) { in findDrawable()
97 if (options.getHeight() <= d.getIntrinsicHeight()) { in findDrawable()
100 } else if (options.getWidth() != BitmapWorkerOptions.MAX_IMAGE_DIMENSION_PX) { in findDrawable()
101 if (options.getWidth() <= d.getIntrinsicWidth()) { in findDrawable()
110 BitmapDrawable findLargestDrawable(BitmapWorkerOptions options) { in findLargestDrawable() argument
218 public final Drawable loadBitmapBlocking(BitmapWorkerOptions options) { in loadBitmapBlocking() argument
219 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking()
222 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking()
224 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
[all …]
DBitmapWorkerTask.java152 private Bitmap decodeBitmap(InputStream in, BitmapWorkerOptions options) in decodeBitmap() argument
163 if (options.getBitmapConfig() != null) { in decodeBitmap()
164 bitmapOptions.inPreferredConfig = options.getBitmapConfig(); in decodeBitmap()
170 float heightScale = (float) bitmapOptions.outHeight / options.getHeight(); in decodeBitmap()
171 float widthScale = (float) bitmapOptions.outWidth / options.getWidth(); in decodeBitmap()
195 if (options.getWidth() < bitmap.getWidth() in decodeBitmap()
196 || options.getHeight() < bitmap.getHeight()) { in decodeBitmap()
197 result = BitmapUtils.scaleBitmap(bitmap, options.getWidth(), options.getHeight()); in decodeBitmap()
216 private Bitmap getBitmapFromHttp(BitmapWorkerOptions options) throws IOException { in getBitmapFromHttp() argument
217 URL url = new URL(options.getResourceUri().toString()); in getBitmapFromHttp()
[all …]
DDrawableLoader.java177 private Drawable decodeBitmap(InputStream in, BitmapWorkerOptions options) in decodeBitmap() argument
188 if (options.getBitmapConfig() != null) { in decodeBitmap()
189 bitmapOptions.inPreferredConfig = options.getBitmapConfig(); in decodeBitmap()
198 int height = options.getHeight(); in decodeBitmap()
204 int width = options.getWidth(); in decodeBitmap()
223 + bitmapOptions.outHeight + "). Max size: (" + options.getWidth() + "x" in decodeBitmap()
224 + options.getHeight() + "). Chosen scale: " + scale + " -> " + scale); in decodeBitmap()
253 options.getContext().getResources(), object); in decodeBitmap()
266 private Drawable getBitmapFromHttp(BitmapWorkerOptions options) throws IOException { in getBitmapFromHttp() argument
267 URL url = new URL(options.getResourceUri().toString()); in getBitmapFromHttp()
[all …]
DBitmapWorkerOptions.java73 BitmapWorkerOptions options = new BitmapWorkerOptions(); in build() local
76 options.mIconResource = new ShortcutIconResource(); in build()
77 options.mIconResource.packageName = mPackageName; in build()
78 options.mIconResource.resourceName = mResourceName; in build()
88 options.mResourceUri = mResourceUri; in build()
89 options.mWidth = mWidth; in build()
90 options.mHeight = mHeight; in build()
91 options.mContext = mContext; in build()
92 options.mCacheFlag = mCacheFlag; in build()
93 options.mBitmapConfig = mBitmapConfig; in build()
[all …]
DBitmapDownloader.java125 public final Bitmap loadBitmapBlocking(final BitmapWorkerOptions options) { in loadBitmapBlocking() argument
126 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking()
129 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking()
131 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
146 return task.doInBackground(options); in loadBitmapBlocking()
154 public void loadBitmap(final BitmapWorkerOptions options, final ImageView imageView) { in loadBitmap() argument
156 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmap()
159 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmap()
161 bitmap = getBitmapFromMemCache(options); in loadBitmap()
178 task.execute(options); in loadBitmap()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DUtil.java102 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
104 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
120 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
122 double w = options.outWidth; in computeInitialSampleSize()
123 double h = options.outHeight; in computeInitialSampleSize()
280 BitmapFactory.Options options = null; in makeBitmap() local
282 options = createNativeAllocOptions(); in makeBitmap()
285 options); in makeBitmap()
295 BitmapFactory.Options options = null; in makeBitmap() local
297 options = createNativeAllocOptions(); in makeBitmap()
[all …]
/packages/apps/Gallery/src/com/android/camera/gallery/
DUriImage.java128 BitmapFactory.Options options = new BitmapFactory.Options(); in snifBitmapOptions() local
129 options.inJustDecodeBounds = true; in snifBitmapOptions()
131 input.getFileDescriptor(), options); in snifBitmapOptions() local
132 return options; in snifBitmapOptions()
139 BitmapFactory.Options options = snifBitmapOptions(); in getMimeType() local
140 return (options != null && options.outMimeType != null) in getMimeType()
141 ? options.outMimeType in getMimeType()
146 BitmapFactory.Options options = snifBitmapOptions(); in getHeight() local
147 return (options != null) ? options.outHeight : 0; in getHeight()
151 BitmapFactory.Options options = snifBitmapOptions(); in getWidth() local
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DTileImageViewAdapter.java116 BitmapFactory.Options options = new BitmapFactory.Options(); in getTile() local
117 options.inPreferredConfig = Config.ARGB_8888; in getTile()
118 options.inPreferQualityOverSpeed = true; in getTile()
119 options.inSampleSize = (1 << level); in getTile()
120 options.inBitmap = bitmap; in getTile()
125 bitmap = regionDecoder.decodeRegion(wantRegion, options); in getTile()
128 if (options.inBitmap != bitmap && options.inBitmap != null) { in getTile()
129 GalleryBitmapPool.getInstance().put(options.inBitmap); in getTile()
130 options.inBitmap = null; in getTile()
155 BitmapFactory.Options options = new BitmapFactory.Options(); in getTileWithoutReusingBitmap() local
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/widget/
DSelectPhoneAccountDialogFragment.java64 private SelectPhoneAccountDialogOptions options = field in SelectPhoneAccountDialogFragment
73 SelectPhoneAccountDialogOptions options, SelectPhoneAccountListener listener) { in newInstance() argument
77 ProtoParsers.put(arguments, ARG_OPTIONS, options); in newInstance()
94 return options.getCanSetDefault(); in canSetDefault()
105 options = in onCreateDialog()
120 options.getEntriesList().get(which)); in onCreateDialog()
143 builder.getContext(), R.layout.select_account_list_item, options); in onCreateDialog()
148 options.hasTitle() ? options.getTitle() : R.string.select_account_dialog_title) in onCreateDialog()
152 if (options.getCanSetDefault()) { in onCreateDialog()
166 options.hasSetDefaultLabel() in onCreateDialog()
[all …]
/packages/apps/DeskClock/src/com/android/alarmclock/
DWidgetUtils.java32 public static float getScaleRatio(Context context, Bundle options, int id, int cityCount) { in getScaleRatio() argument
33 if (options == null) { in getScaleRatio()
39 options = widgetManager.getAppWidgetOptions(id); in getScaleRatio()
41 if (options != null) { in getScaleRatio()
42 int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH); in getScaleRatio()
50 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); in getScaleRatio()
70 private static float getHeightScaleRatio(Context context, Bundle options, int id) { in getHeightScaleRatio() argument
71 if (options == null) { in getHeightScaleRatio()
77 options = widgetManager.getAppWidgetOptions(id); in getHeightScaleRatio()
79 if (options != null) { in getHeightScaleRatio()
[all …]
/packages/apps/Email/provider_src/com/android/email/service/
DAuthenticatorService.java57 String authTokenType, String[] requiredFeatures, Bundle options) in addAccount() argument
68 if (options != null && options.containsKey(OPTIONS_PASSWORD) in addAccount()
69 && options.containsKey(OPTIONS_USERNAME)) { in addAccount()
70 final Account account = new Account(options.getString(OPTIONS_USERNAME), in addAccount()
73 account, options.getString(OPTIONS_PASSWORD), null); in addAccount()
77 boolean syncContacts = options.getBoolean(OPTIONS_CONTACTS_SYNC_ENABLED, false); in addAccount()
85 boolean syncCalendar = options.getBoolean(OPTIONS_CALENDAR_SYNC_ENABLED, false); in addAccount()
94 if (options.containsKey(OPTIONS_EMAIL_SYNC_ENABLED) && in addAccount()
95 options.getBoolean(OPTIONS_EMAIL_SYNC_ENABLED)) { in addAccount()
103 b.putString(AccountManager.KEY_ACCOUNT_NAME, options.getString(OPTIONS_USERNAME)); in addAccount()
[all …]
/packages/apps/Dialer/java/com/android/dialer/contactphoto/
DBitmapUtil.java38 final BitmapFactory.Options options = new BitmapFactory.Options(); in getSmallerExtentFromBytes() local
41 options.inJustDecodeBounds = true; in getSmallerExtentFromBytes()
42 BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in getSmallerExtentFromBytes()
45 return Math.min(options.outWidth, options.outHeight); in getSmallerExtentFromBytes()
81 final BitmapFactory.Options options; in decodeBitmapFromBytes() local
83 options = null; in decodeBitmapFromBytes()
85 options = new BitmapFactory.Options(); in decodeBitmapFromBytes()
86 options.inSampleSize = sampleSize; in decodeBitmapFromBytes()
88 return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in decodeBitmapFromBytes()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java163 BitmapFactory.Options options = new BitmapFactory.Options(); in calculateRawDimensions() local
164 options.inJustDecodeBounds = true; in calculateRawDimensions()
170 BitmapFactory.decodeStream(inputStream, null, options); in calculateRawDimensions()
178 mDimensions = new Point(options.outHeight, options.outWidth); in calculateRawDimensions()
180 mDimensions = new Point(options.outWidth, options.outHeight); in calculateRawDimensions()
269 BitmapFactory.Options options = new BitmapFactory.Options(); in doInBackground() local
276 options.inSampleSize = BitmapUtils.calculateInSampleSize( in doInBackground()
278 options.inPreferredConfig = Config.HARDWARE; in doInBackground()
280 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in doInBackground()
335 BitmapFactory.Options options = new BitmapFactory.Options(); in doInBackground() local
[all …]
/packages/apps/Contacts/src/com/android/contacts/util/
DBitmapUtil.java41 final BitmapFactory.Options options = new BitmapFactory.Options(); in getSmallerExtentFromBytes() local
44 options.inJustDecodeBounds = true; in getSmallerExtentFromBytes()
45 BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in getSmallerExtentFromBytes()
48 return Math.min(options.outWidth, options.outHeight); in getSmallerExtentFromBytes()
82 final BitmapFactory.Options options; in decodeBitmapFromBytes() local
84 options = null; in decodeBitmapFromBytes()
86 options = new BitmapFactory.Options(); in decodeBitmapFromBytes()
87 options.inSampleSize = sampleSize; in decodeBitmapFromBytes()
89 return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in decodeBitmapFromBytes()
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/common/
DInputStreamProvider.java55 BitmapFactory.Options options = new BitmapFactory.Options(); in getImageBounds() local
56 options.inJustDecodeBounds = true; in getImageBounds()
57 BitmapFactory.decodeStream(is, null, options); in getImageBounds()
59 if (options.outWidth != 0 && options.outHeight != 0) { in getImageBounds()
60 return new Point(options.outWidth, options.outHeight); in getImageBounds()
120 BitmapFactory.Options options = new BitmapFactory.Options(); in readCroppedBitmap() local
122 options.inSampleSize = scaleDownSampleSize; in readCroppedBitmap()
124 crop = decoder.decodeRegion(roundedTrueCrop, options); in readCroppedBitmap()
133 BitmapFactory.Options options = new BitmapFactory.Options(); in readCroppedBitmap() local
135 options.inSampleSize = scaleDownSampleSize; in readCroppedBitmap()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/
DImageLoader.java255 Uri uri, BitmapFactory.Options options, in loadRegionBitmap() argument
260 if (options.inSampleSize != 0) { in loadRegionBitmap()
278 options.inBitmap = reuse; in loadRegionBitmap()
279 Bitmap bitmap = decoder.decodeRegion(imageBounds, options); in loadRegionBitmap()
312 BitmapFactory.Options options = new BitmapFactory.Options(); in loadDownsampledBitmap() local
313 options.inMutable = true; in loadDownsampledBitmap()
314 options.inSampleSize = sampleSize; in loadDownsampledBitmap()
315 return loadBitmap(context, uri, options); in loadDownsampledBitmap()
419 BitmapFactory.Options options = new BitmapFactory.Options(); in getScaleOneImageForPreset() local
420 options.inMutable = true; in getScaleOneImageForPreset()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DWidgetHostViewLoader.java49 public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) { in onDragStart() argument
91 final Bundle options = getDefaultOptionsForWidget(mLauncher, mInfo); in preloadWidget() local
95 mInfo.bindOptions = options; in preloadWidget()
107 mWidgetLoadingId, pInfo, options)) { in preloadWidget()
165 Bundle options = new Bundle(); in getDefaultOptionsForWidget() local
166 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, in getDefaultOptionsForWidget()
168 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, in getDefaultOptionsForWidget()
170 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, in getDefaultOptionsForWidget()
172 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, in getDefaultOptionsForWidget()
174 return options; in getDefaultOptionsForWidget()
/packages/apps/TV/src/com/android/tv/util/images/
DBitmapUtils.java133 BitmapFactory.Options options = new BitmapFactory.Options(); in decodeSampledBitmapFromUriString() local
134 options.inJustDecodeBounds = true; in decodeSampledBitmapFromUriString()
135 BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString()
154 options.inJustDecodeBounds = false; in decodeSampledBitmapFromUriString()
155 options.inPreferredConfig = Bitmap.Config.RGB_565; in decodeSampledBitmapFromUriString()
156 options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); in decodeSampledBitmapFromUriString()
157 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString()
161 return new ScaledBitmapInfo(uriString, bitmap, options.inSampleSize); in decodeSampledBitmapFromUriString()
185 BitmapFactory.Options options, int reqWidth, int reqHeight) { in calculateInSampleSize() argument
186 return calculateInSampleSize(options.outWidth, options.outHeight, reqWidth, reqHeight); in calculateInSampleSize()
/packages/apps/LegacyCamera/src/com/android/camera/
DUtil.java175 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
177 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
193 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
195 double w = options.outWidth; in computeInitialSampleSize()
196 double h = options.outHeight; in computeInitialSampleSize()
220 BitmapFactory.Options options = new BitmapFactory.Options(); in makeBitmap() local
221 options.inJustDecodeBounds = true; in makeBitmap()
223 options); in makeBitmap()
224 if (options.mCancel || options.outWidth == -1 in makeBitmap()
225 || options.outHeight == -1) { in makeBitmap()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/media/
DImageRequestTest.java60 final ArgumentCaptor<BitmapFactory.Options> options = in testLoadImageUnspecifiedSize() local
63 options.capture(), in testLoadImageUnspecifiedSize()
66 assertEquals(1, options.getValue().inSampleSize); in testLoadImageUnspecifiedSize()
73 assertEquals(options.getValue().outWidth, bitmapWidth); in testLoadImageUnspecifiedSize()
74 assertEquals(options.getValue().outHeight, bitmapHeight); in testLoadImageUnspecifiedSize()
91 final ArgumentCaptor<BitmapFactory.Options> options = in testLoadImageWithDownsampling() local
94 options.capture(), in testLoadImageWithDownsampling()
96 assertNotSame(1, options.getValue().inSampleSize); in testLoadImageWithDownsampling()

123456789