/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/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/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/Dialer/java/com/android/contacts/common/widget/ |
D | SelectPhoneAccountDialogFragment.java | 64 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/ |
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 | WidgetUtils.kt | 28 fun getScaleRatio(context: Context, options: Bundle?, id: Int, cityCount: Int): Float { in getScaleRatio() 29 var options: Bundle? = options in getScaleRatio() variable 30 if (options == null) { in getScaleRatio() 34 options = widgetManager.getAppWidgetOptions(id) in getScaleRatio() 36 options?.let { in getScaleRatio() 65 private fun getHeightScaleRatio(context: Context, options: Bundle): Float { in getHeightScaleRatio() 66 val minHeight: Int = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT) in getHeightScaleRatio()
|
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 …]
|
D | DigitalAppWidgetProvider.kt | 154 options: Bundle in <lambda>() 156 super.onAppWidgetOptionsChanged(context, wm, widgetId, options) in <lambda>() 159 relayoutWidget(context, AppWidgetManager.getInstance(context), widgetId, options) in <lambda>() 302 options: Bundle in <lambda>() 304 val portrait: RemoteViews = relayoutWidget(context, wm, widgetId, options, true) in <lambda>() 305 val landscape: RemoteViews = relayoutWidget(context, wm, widgetId, options, false) in <lambda>() 318 options: Bundle?, in <lambda>() 347 val options = options ?: wm.getAppWidgetOptions(widgetId) in <lambda>() constant 352 val minWidthPx = (density * options.getInt(OPTION_APPWIDGET_MIN_WIDTH)).toInt() in <lambda>() 353 val minHeightPx = (density * options.getInt(OPTION_APPWIDGET_MIN_HEIGHT)).toInt() in <lambda>() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/contactphoto/ |
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/WallpaperPicker2/src/com/android/wallpaper/asset/ |
D | StreamableAsset.java | 163 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() 263 BitmapFactory.Options options = new BitmapFactory.Options(); in doInBackground() local 270 options.inSampleSize = BitmapUtils.calculateInSampleSize( in doInBackground() 272 options.inPreferredConfig = Config.HARDWARE; in doInBackground() 275 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in doInBackground() 330 BitmapFactory.Options options = new BitmapFactory.Options(); in doInBackground() local [all …]
|
/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/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/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/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/TV/src/com/android/tv/util/images/ |
D | BitmapUtils.java | 133 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/services/BuiltInPrintService/src/com/android/bips/ |
D | ImagePrintActivity.java | 109 BitmapFactory.Options options = new BitmapFactory.Options(); in doInBackground() local 110 options.inJustDecodeBounds = true; in doInBackground() 111 loadBitmap(uris[0], options); in doInBackground() 112 if (options.outWidth <= 0 || options.outHeight <= 0) { in doInBackground() 120 publishProgress(options.outHeight > options.outWidth); in doInBackground() 121 options.inJustDecodeBounds = false; in doInBackground() 122 options.inPreferredColorSpace = ColorSpace.get(ColorSpace.Named.SRGB); in doInBackground() 123 return loadBitmap(uris[0], options); in doInBackground() 130 private Bitmap loadBitmap(Uri contentUri, BitmapFactory.Options options) { in loadBitmap() argument 132 return BitmapFactory.decodeStream(inputStream, null, options); in loadBitmap()
|
/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/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()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictUtils.java | 40 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/src/com/android/launcher3/ |
D | FolderInfo.java | 48 public int options; field in FolderInfo 100 .put(LauncherSettings.Favorites.OPTIONS, options); in onAddToDatabase() 124 return (options & optionFlag) != 0; in hasOption() 133 int oldOptions = options; in setOption() 135 options |= option; in setOption() 137 options &= ~option; in setOption() 139 if (writer != null && oldOptions != options) { in setOption()
|