Home
last modified time | relevance | path

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

12345

/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/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/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/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.java195 private Bitmap decodeBitmap(InputStream in, BitmapWorkerOptions options)
206 if (options.getBitmapConfig() != null) {
207 bitmapOptions.inPreferredConfig = options.getBitmapConfig();
215 int height = options.getHeight();
223 int width = options.getWidth();
233 + bitmapOptions.outHeight + "). Max size: (" + options.getWidth() + "x"
234 + options.getHeight() + "). Chosen scale: " + scale + " -> "
245 return scaleBitmapIfNecessary(options,
259 private Bitmap getBitmapFromHttp(BitmapWorkerOptions options) throws IOException {
260 URL url = new URL(options.getResourceUri().toString());
[all …]
DDrawableLoader.java180 private Drawable decodeBitmap(InputStream in, BitmapWorkerOptions options) in decodeBitmap() argument
191 if (options.getBitmapConfig() != null) { in decodeBitmap()
192 bitmapOptions.inPreferredConfig = options.getBitmapConfig(); in decodeBitmap()
201 int height = options.getHeight(); in decodeBitmap()
207 int width = options.getWidth(); in decodeBitmap()
226 + bitmapOptions.outHeight + "). Max size: (" + options.getWidth() + "x" in decodeBitmap()
227 + options.getHeight() + "). Chosen scale: " + scale + " -> " + scale); in decodeBitmap()
256 options.getContext().getResources(), object); in decodeBitmap()
269 private Drawable getBitmapFromHttp(BitmapWorkerOptions options) throws IOException { in getBitmapFromHttp() argument
270 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.java133 public final Bitmap loadBitmapBlocking(BitmapWorkerOptions options) { in loadBitmapBlocking() argument
134 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking()
137 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking()
139 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
154 return task.doInBackground(options); in loadBitmapBlocking()
162 public void loadBitmap(BitmapWorkerOptions options, final ImageView imageView) { in loadBitmap() argument
164 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmap()
167 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmap()
169 bitmap = getBitmapFromMemCache(options); in loadBitmap()
186 task.execute(options); in loadBitmap()
[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/DeskClock/src/com/android/alarmclock/
DWidgetUtils.java40 public static float getScaleRatio(Context context, Bundle options, int id) { in getScaleRatio() argument
41 if (options == null) { in getScaleRatio()
47 options = widgetManager.getAppWidgetOptions(id); in getScaleRatio()
49 if (options != null) { in getScaleRatio()
50 int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH); in getScaleRatio()
59 int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT); in getScaleRatio()
62 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()
[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/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/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/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.java215 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
217 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
233 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
235 double w = options.outWidth; in computeInitialSampleSize()
236 double h = options.outHeight; in computeInitialSampleSize()
260 BitmapFactory.Options options = new BitmapFactory.Options(); in makeBitmap() local
261 options.inJustDecodeBounds = true; in makeBitmap()
263 options); in makeBitmap()
264 if (options.mCancel || options.outWidth == -1 in makeBitmap()
265 || 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/Launcher3/WallpaperPicker/src/com/android/gallery3d/common/
DBitmapCropTask.java153 BitmapFactory.Options options = new BitmapFactory.Options(); in getImageBounds() local
154 options.inJustDecodeBounds = true; in getImageBounds()
155 BitmapFactory.decodeStream(is, null, options); in getImageBounds()
157 if (options.outWidth != 0 && options.outHeight != 0) { in getImageBounds()
158 return new Point(options.outWidth, options.outHeight); in getImageBounds()
257 BitmapFactory.Options options = new BitmapFactory.Options(); in cropBitmap() local
259 options.inSampleSize = scaleDownSampleSize; in cropBitmap()
261 crop = decoder.decodeRegion(roundedTrueCrop, options); in cropBitmap()
270 BitmapFactory.Options options = new BitmapFactory.Options(); in cropBitmap() local
272 options.inSampleSize = scaleDownSampleSize; in cropBitmap()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DWidgetHostViewLoader.java80 final Bundle options = getDefaultOptionsForWidget(mLauncher, mInfo); in preloadWidget() local
84 mInfo.bindOptions = options; in preloadWidget()
93 mWidgetLoadingId, pInfo, options)) { in preloadWidget()
133 Bundle options = null; in getDefaultOptionsForWidget() local
144 options = new Bundle(); in getDefaultOptionsForWidget()
145 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, in getDefaultOptionsForWidget()
147 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, in getDefaultOptionsForWidget()
149 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, in getDefaultOptionsForWidget()
151 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, in getDefaultOptionsForWidget()
154 return options; in getDefaultOptionsForWidget()
/packages/apps/Launcher3/WallpaperPicker/src/com/android/photos/
DBitmapRegionTileSource.java48 Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options); in decodeRegion() argument
88 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() argument
89 return mDecoder.decodeRegion(wantRegion, options); in decodeRegion()
120 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() argument
126 int sampleSize = Math.max(options.inSampleSize, 1); in decodeRegion()
237 public abstract Bitmap loadPreviewBitmap(BitmapFactory.Options options); in loadPreviewBitmap() argument
259 public Bitmap loadPreviewBitmap(BitmapFactory.Options options) { in loadPreviewBitmap() argument
260 return BitmapFactory.decodeFile(mPath, options); in loadPreviewBitmap()
307 public Bitmap loadPreviewBitmap(BitmapFactory.Options options) { in loadPreviewBitmap() argument
310 Bitmap b = BitmapFactory.decodeStream(is, null, options); in loadPreviewBitmap()
[all …]
/packages/apps/Camera2/src/com/android/camera/util/
DCameraUtil.java201 public static int computeSampleSize(BitmapFactory.Options options, in computeSampleSize() argument
203 int initialSize = computeInitialSampleSize(options, minSideLength, in computeSampleSize()
219 private static int computeInitialSampleSize(BitmapFactory.Options options, in computeInitialSampleSize() argument
221 double w = options.outWidth; in computeInitialSampleSize()
222 double h = options.outHeight; in computeInitialSampleSize()
246 BitmapFactory.Options options = new BitmapFactory.Options(); in makeBitmap() local
247 options.inJustDecodeBounds = true; in makeBitmap()
249 options); in makeBitmap()
250 if (options.mCancel || options.outWidth == -1 in makeBitmap()
251 || 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()
/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/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
DImageFilterRS.java185 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadScaledResourceAlpha() local
186 options.inSampleSize = inSampleSize; in loadScaledResourceAlpha()
189 resource, options); in loadScaledResourceAlpha()
197 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadScaledResourceAlpha() local
198 options.inSampleSize = inSampleSize; in loadScaledResourceAlpha()
201 resource, options); in loadScaledResourceAlpha()
215 final BitmapFactory.Options options = new BitmapFactory.Options(); in loadResource() local
216 options.inPreferredConfig = Bitmap.Config.ARGB_8888; in loadResource()
219 resource, options); in loadResource()

12345