/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | DecodeUtils.java | 45 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/ |
D | VehicleHalProto_pb2.py | 27 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/ |
D | PhotoSource.java | 129 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/ |
D | ImageRequest.java | 152 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 …]
|
D | FileImageRequest.java | 61 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/Gallery/src/com/android/camera/ |
D | Util.java | 102 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/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | DrawableDownloader.java | 86 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 …]
|
D | BitmapWorkerTask.java | 152 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 …]
|
D | DrawableLoader.java | 177 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 …]
|
D | BitmapWorkerOptions.java | 73 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 …]
|
D | BitmapDownloader.java | 125 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/Gallery2/src/com/android/gallery3d/ui/ |
D | TileImageViewAdapter.java | 116 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/ |
D | UriImage.java | 128 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/DeskClock/src/com/android/alarmclock/ |
D | WidgetUtils.java | 32 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 …]
|
D | DigitalAppWidgetProvider.java | 181 Bundle options) { in onAppWidgetOptionsChanged() argument 182 super.onAppWidgetOptionsChanged(context, wm, widgetId, options); in onAppWidgetOptionsChanged() 185 relayoutWidget(context, AppWidgetManager.getInstance(context), widgetId, options); in onAppWidgetOptionsChanged() 193 Bundle options) { in relayoutWidget() argument 194 final RemoteViews portrait = relayoutWidget(context, wm, widgetId, options, true); in relayoutWidget() 195 final RemoteViews landscape = relayoutWidget(context, wm, widgetId, options, false); in relayoutWidget() 205 Bundle options, boolean portrait) { in relayoutWidget() argument 232 if (options == null) { in relayoutWidget() 233 options = wm.getAppWidgetOptions(widgetId); in relayoutWidget() 239 final int minWidthPx = (int) (density * options.getInt(OPTION_APPWIDGET_MIN_WIDTH)); in relayoutWidget() [all …]
|
/packages/apps/Email/provider_src/com/android/email/service/ |
D | AuthenticatorService.java | 57 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 …]
|
D | EasTestAuthenticatorService.java | 49 String authTokenType, String[] requiredFeatures, Bundle options) in addAccount() argument 54 if (options != null && options.containsKey(OPTIONS_PASSWORD) in addAccount() 55 && options.containsKey(OPTIONS_USERNAME)) { in addAccount() 56 final Account account = new Account(options.getString(OPTIONS_USERNAME), in addAccount() 59 account, options.getString(OPTIONS_PASSWORD), null); in addAccount() 80 Bundle options) { in confirmCredentials() argument
|
/packages/apps/Dialer/java/com/android/contacts/common/util/ |
D | BitmapUtil.java | 38 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/Gallery2/src/com/android/gallery3d/filtershow/cache/ |
D | ImageLoader.java | 255 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/WallpaperPicker/src/com/android/wallpaperpicker/common/ |
D | InputStreamProvider.java | 55 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/TV/src/com/android/tv/util/ |
D | BitmapUtils.java | 114 BitmapFactory.Options options = new BitmapFactory.Options(); in decodeSampledBitmapFromUriString() local 115 options.inJustDecodeBounds = true; in decodeSampledBitmapFromUriString() 116 BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString() 135 options.inJustDecodeBounds = false; in decodeSampledBitmapFromUriString() 136 options.inPreferredConfig = Bitmap.Config.RGB_565; in decodeSampledBitmapFromUriString() 137 options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); in decodeSampledBitmapFromUriString() 138 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString() 142 return new ScaledBitmapInfo(uriString, bitmap, options.inSampleSize); in decodeSampledBitmapFromUriString() 165 private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, in calculateInSampleSize() argument 167 return calculateInSampleSize(options.outWidth, options.outHeight, reqWidth, reqHeight); in calculateInSampleSize()
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | BitmapUtil.java | 41 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/LegacyCamera/src/com/android/camera/ |
D | Util.java | 175 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/Launcher3/src/com/android/launcher3/widget/ |
D | WidgetHostViewLoader.java | 49 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/Messaging/tests/src/com/android/messaging/datamodel/media/ |
D | ImageRequestTest.java | 60 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()
|