Home
last modified time | relevance | path

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

1234

/packages/apps/Gallery2/src/com/android/gallery3d/data/
DDecodeUtils.java46 public DecodeCanceller(Options options) { in DecodeCanceller() argument
47 mOptions = options; in DecodeCanceller()
57 public static void setOptionsMutable(Options options) { in setOptionsMutable() argument
58 if (ApiHelper.HAS_OPTIONS_IN_MUTABLE) options.inMutable = true; in setOptionsMutable()
61 public static Bitmap decode(JobContext jc, FileDescriptor fd, Options options) { in decode() argument
62 if (options == null) options = new Options(); in decode()
63 jc.setCancelListener(new DecodeCanceller(options)); in decode()
64 setOptionsMutable(options); in decode()
66 BitmapFactory.decodeFileDescriptor(fd, null, options)); in decode()
70 Options options) { in decodeBounds() argument
[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/TvSettings/Settings/src/com/android/tv/settings/widget/
DDrawableDownloader.java91 BitmapDrawable findDrawable(BitmapWorkerOptions options) { in findDrawable() argument
101 if (options.getHeight() != BitmapWorkerOptions.MAX_IMAGE_DIMENSION_PX) { in findDrawable()
102 if (options.getHeight() <= d.getIntrinsicHeight()) { in findDrawable()
105 } else if (options.getWidth() != BitmapWorkerOptions.MAX_IMAGE_DIMENSION_PX) { in findDrawable()
106 if (options.getWidth() <= d.getIntrinsicWidth()) { in findDrawable()
114 BitmapDrawable findLargestDrawable(BitmapWorkerOptions options) { in findLargestDrawable() argument
223 public final Drawable loadBitmapBlocking(BitmapWorkerOptions options) { in loadBitmapBlocking() argument
224 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking()
227 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking()
229 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
[all …]
DBitmapWorkerTask.java199 private Bitmap decodeBitmap(InputStream in, BitmapWorkerOptions options)
210 if (options.getBitmapConfig() != null) {
211 bitmapOptions.inPreferredConfig = options.getBitmapConfig();
219 int height = options.getHeight();
227 int width = options.getWidth();
237 + bitmapOptions.outHeight + "). Max size: (" + options.getWidth() + "x"
238 + options.getHeight() + "). Chosen scale: " + scale + " -> "
249 return scaleBitmapIfNecessary(options,
263 private Bitmap getBitmapFromHttp(BitmapWorkerOptions options) throws IOException {
264 URL url = new URL(options.getResourceUri().toString());
[all …]
DDrawableLoader.java184 private Drawable decodeBitmap(InputStream in, BitmapWorkerOptions options) in decodeBitmap() argument
195 if (options.getBitmapConfig() != null) { in decodeBitmap()
196 bitmapOptions.inPreferredConfig = options.getBitmapConfig(); in decodeBitmap()
205 int height = options.getHeight(); in decodeBitmap()
211 int width = options.getWidth(); in decodeBitmap()
230 + bitmapOptions.outHeight + "). Max size: (" + options.getWidth() + "x" in decodeBitmap()
231 + options.getHeight() + "). Chosen scale: " + scale + " -> " + scale); in decodeBitmap()
260 options.getContext().getResources(), object); in decodeBitmap()
273 private Drawable getBitmapFromHttp(BitmapWorkerOptions options) throws IOException { in getBitmapFromHttp() argument
274 URL url = new URL(options.getResourceUri().toString()); in getBitmapFromHttp()
[all …]
DBitmapWorkerOptions.java78 BitmapWorkerOptions options = new BitmapWorkerOptions(); in build() local
81 options.mIconResource = new ShortcutIconResource(); in build()
82 options.mIconResource.packageName = mPackageName; in build()
83 options.mIconResource.resourceName = mResourceName; in build()
93 options.mResourceUri = mResourceUri; in build()
94 options.mWidth = mWidth; in build()
95 options.mHeight = mHeight; in build()
96 options.mContext = mContext; in build()
97 options.mCacheFlag = mCacheFlag; in build()
98 options.mBitmapConfig = mBitmapConfig; in build()
[all …]
DBitmapDownloader.java131 public final Bitmap loadBitmapBlocking(BitmapWorkerOptions options) { in loadBitmapBlocking() argument
132 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking()
135 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking()
137 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
152 return task.doInBackground(options); in loadBitmapBlocking()
160 public void loadBitmap(BitmapWorkerOptions options, final ImageView imageView) { in loadBitmap() argument
162 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmap()
165 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmap()
167 bitmap = getBitmapFromMemCache(options); in loadBitmap()
184 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/Mms/src/com/android/mms/util/
DThumbnailManager.java329 BitmapFactory.Options options = new BitmapFactory.Options(); in getBitmap() local
330 options.inPreferredConfig = Bitmap.Config.ARGB_8888; in getBitmap()
332 data.mOffset, data.mData.length - data.mOffset, options); in getBitmap()
384 int length, Options options) { in requestDecode() argument
385 if (options == null) { in requestDecode()
386 options = new Options(); in requestDecode()
389 BitmapFactory.decodeByteArray(bytes, offset, length, options)); in requestDecode()
436 BitmapFactory.Options options = new BitmapFactory.Options(); in onDecodeOriginal() local
437 options.inPreferredConfig = Bitmap.Config.ARGB_8888; in onDecodeOriginal()
439 return requestDecode(uri, options, THUMBNAIL_TARGET_SIZE); in onDecodeOriginal()
[all …]
/packages/apps/DeskClock/src/com/android/alarmclock/
DWidgetUtils.java43 public static float getScaleRatio(Context context, Bundle options, int id) { in getScaleRatio() argument
44 if (options == null) { in getScaleRatio()
50 options = widgetManager.getAppWidgetOptions(id); in getScaleRatio()
52 if (options != null) { in getScaleRatio()
53 int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH); in getScaleRatio()
62 int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT); in getScaleRatio()
65 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); in getScaleRatio()
73 private static float getHeightScaleRatio(Context context, Bundle options, int id) { in getHeightScaleRatio() argument
74 if (options == null) { in getHeightScaleRatio()
80 options = widgetManager.getAppWidgetOptions(id); in getHeightScaleRatio()
[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/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/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/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/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/Camera/src/com/android/camera/
DUtil.java216 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
218 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
234 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
236 double w = options.outWidth; in computeInitialSampleSize()
237 double h = options.outHeight; in computeInitialSampleSize()
261 BitmapFactory.Options options = new BitmapFactory.Options(); in makeBitmap() local
262 options.inJustDecodeBounds = true; in makeBitmap()
264 options); in makeBitmap()
265 if (options.mCancel || options.outWidth == -1 in makeBitmap()
266 || options.outHeight == -1) { in makeBitmap()
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/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/Camera2/src/com/android/camera/util/
DCameraUtil.java205 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
207 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
223 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
225 double w = options.outWidth; in computeInitialSampleSize()
226 double h = options.outHeight; in computeInitialSampleSize()
250 BitmapFactory.Options options = new BitmapFactory.Options(); in makeBitmap() local
251 options.inJustDecodeBounds = true; in makeBitmap()
253 options); in makeBitmap()
254 if (options.mCancel || options.outWidth == -1 in makeBitmap()
255 || options.outHeight == -1) { in makeBitmap()
[all …]
DImageLoader.java236 BitmapFactory.Options options = new BitmapFactory.Options(); in loadDownsampledBitmap() local
237 options.inMutable = true; in loadDownsampledBitmap()
238 options.inSampleSize = sampleSize; in loadDownsampledBitmap()
239 return loadBitmap(context, uri, options); in loadDownsampledBitmap()
385 public static Bitmap decodeResourceWithBackouts(Resources res, BitmapFactory.Options options, in decodeResourceWithBackouts() argument
389 if (options.inSampleSize < 1) { in decodeResourceWithBackouts()
390 options.inSampleSize = 1; in decodeResourceWithBackouts()
398 res, id, options); in decodeResourceWithBackouts()
407 options.inSampleSize *= 2; in decodeResourceWithBackouts()
/packages/apps/Launcher3/WallpaperPicker/src/com/android/photos/
DBitmapRegionTileSource.java49 Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options); in decodeRegion() argument
89 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() argument
90 return mDecoder.decodeRegion(wantRegion, options); in decodeRegion()
121 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() argument
127 int sampleSize = Math.max(options.inSampleSize, 1); in decodeRegion()
221 public abstract Bitmap loadPreviewBitmap(BitmapFactory.Options options); in loadPreviewBitmap() argument
240 public Bitmap loadPreviewBitmap(BitmapFactory.Options options) { in loadPreviewBitmap() argument
241 return BitmapFactory.decodeFile(mPath, options); in loadPreviewBitmap()
289 public Bitmap loadPreviewBitmap(BitmapFactory.Options options) { in loadPreviewBitmap() argument
292 Bitmap b = BitmapFactory.decodeStream(is, null, options); in loadPreviewBitmap()
[all …]
/packages/apps/Camera2/src/com/android/camera/session/
DCaptureSessionManagerImpl.java202 BitmapFactory.Options options = new BitmapFactory.Options(); in finish()
203 options.inJustDecodeBounds = true; in finish()
204 BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length, options); in finish()
205 int width = options.outWidth; in finish()
206 int height = options.outHeight; in finish()
286 BitmapFactory.Options options = new BitmapFactory.Options(); in updatePreview()
287 options.inJustDecodeBounds = true; in updatePreview()
288 BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length, options); in updatePreview()
289 int width = options.outWidth; in updatePreview()
290 int height = options.outHeight; in updatePreview()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
DImageFilterRS.java186 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadScaledResourceAlpha() local
187 options.inSampleSize = inSampleSize; in loadScaledResourceAlpha()
190 resource, options); in loadScaledResourceAlpha()
198 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadScaledResourceAlpha() local
199 options.inSampleSize = inSampleSize; in loadScaledResourceAlpha()
202 resource, options); in loadScaledResourceAlpha()
216 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadResource() local
217 options.inPreferredConfig = Bitmap.Config.ARGB_8888; in loadResource()
220 resource, options); in loadResource()
/packages/apps/Browser/src/com/android/browser/
DWallpaperHandler.java101 BitmapFactory.Options options = new BitmapFactory.Options(); in run() local
102 options.inJustDecodeBounds = true; in run()
106 new BufferedInputStream(inputstream), null, options); in run()
112 int bmWidth = options.outWidth; in run()
113 int bmHeight = options.outHeight; in run()
121 options.inJustDecodeBounds = false; in run()
122 options.inSampleSize = scale; in run()
132 null, options); in run()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictUtils.java40 final DictionaryOptions options = new DictionaryOptions(new HashMap<String, String>()); in makeDictionaryOptions() local
41 options.mAttributes.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, "en_US"); in makeDictionaryOptions()
42 options.mAttributes.put(DictionaryHeader.DICTIONARY_ID_KEY, id); in makeDictionaryOptions()
43 options.mAttributes.put(DictionaryHeader.DICTIONARY_VERSION_KEY, version); in makeDictionaryOptions()
45 options.mAttributes.put(DictionaryHeader.HAS_HISTORICAL_INFO_KEY, in makeDictionaryOptions()
47 options.mAttributes.put(DictionaryHeader.USES_FORGETTING_CURVE_KEY, in makeDictionaryOptions()
50 return options; in makeDictionaryOptions()
/packages/apps/Launcher3/WallpaperPicker/src/com/android/launcher3/
DWallpaperCropActivity.java563 BitmapFactory.Options options = new BitmapFactory.Options();
564 options.inJustDecodeBounds = true;
565 BitmapFactory.decodeStream(is, null, options);
567 if (options.outWidth != 0 && options.outHeight != 0) {
568 return new Point(options.outWidth, options.outHeight);
667 BitmapFactory.Options options = new BitmapFactory.Options(); local
669 options.inSampleSize = scaleDownSampleSize;
671 crop = decoder.decodeRegion(roundedTrueCrop, options);
680 BitmapFactory.Options options = new BitmapFactory.Options(); local
682 options.inSampleSize = scaleDownSampleSize;
[all …]

1234