/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/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 | 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 …]
|
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 …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/ |
D | DrawableDownloader.java | 91 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 …]
|
D | BitmapWorkerOptions.java | 78 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 …]
|
D | DrawableLoader.java | 180 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 …]
|
D | BitmapWorkerTask.java | 195 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 …]
|
D | BitmapDownloader.java | 159 public final Bitmap loadBitmapBlocking(BitmapWorkerOptions options) { in loadBitmapBlocking() argument 160 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmapBlocking() 163 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmapBlocking() 165 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking() 180 return task.doInBackground(options); in loadBitmapBlocking() 188 public void loadBitmap(BitmapWorkerOptions options, final ImageView imageView) { in loadBitmap() argument 190 final boolean hasAccountImageUri = UriUtils.isAccountImageUri(options.getResourceUri()); in loadBitmap() 193 AccountImageChangeObserver.getInstance().registerChangeUriIfPresent(options); in loadBitmap() 195 bitmap = getBitmapFromMemCache(options); in loadBitmap() 212 task.execute(options); in loadBitmap() [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 …]
|
D | BitmapManager.java | 85 BitmapFactory.Options options) { in setDecodingOptions() argument 86 getOrCreateThreadStatus(t).mOptions = options; in setDecodingOptions() 139 BitmapFactory.Options options, boolean isVideo) { in getThumbnail() argument 178 BitmapFactory.Options options) { in decodeFileDescriptor() argument 179 if (options.mCancel) { in decodeFileDescriptor() 189 setDecodingOptions(thread, options); in decodeFileDescriptor() 190 Bitmap b = BitmapFactory.decodeFileDescriptor(fd, null, options); in decodeFileDescriptor()
|
/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/DeskClock/src/com/android/alarmclock/ |
D | WidgetUtils.java | 41 public static float getScaleRatio(Context context, Bundle options, int id) { in getScaleRatio() argument 42 if (options == null) { in getScaleRatio() 48 options = widgetManager.getAppWidgetOptions(id); in getScaleRatio() 50 if (options != null) { in getScaleRatio() 51 int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH); in getScaleRatio() 59 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); in getScaleRatio() 81 private static float getHeightScaleRatio(Context context, Bundle options, int id) { in getHeightScaleRatio() argument 82 if (options == null) { in getHeightScaleRatio() 88 options = widgetManager.getAppWidgetOptions(id); in getHeightScaleRatio() 90 if (options != null) { in getHeightScaleRatio() [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/TvSettings/Settings/src/com/android/tv/settings/name/ |
D | DeviceNameSetFragment.java | 48 final String[] options = getResources().getStringArray(R.array.rooms); in onCreateActions() local 49 final int length = options.length; in onCreateActions() 52 .title(options[i]) in onCreateActions() 58 .id(options.length) in onCreateActions() 66 final String[] options = getResources().getStringArray(R.array.rooms); in onGuidedActionClicked() local 67 if (id < 0 || id > options.length) { in onGuidedActionClicked() 69 } else if (id < options.length) { in onGuidedActionClicked() 70 DeviceManager.setDeviceName(getActivity(), options[(int)id]); in onGuidedActionClicked() local 72 } else if (id == options.length) { in onGuidedActionClicked()
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/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/TV/src/com/android/tv/util/ |
D | BitmapUtils.java | 93 BitmapFactory.Options options = new BitmapFactory.Options(); in decodeSampledBitmapFromUriString() local 94 options.inJustDecodeBounds = true; in decodeSampledBitmapFromUriString() 95 BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString() 111 options.inJustDecodeBounds = false; in decodeSampledBitmapFromUriString() 112 options.inPreferredConfig = Bitmap.Config.RGB_565; in decodeSampledBitmapFromUriString() 113 options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); in decodeSampledBitmapFromUriString() 114 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString() 118 return new ScaledBitmapInfo(uriString, bitmap, options.inSampleSize); in decodeSampledBitmapFromUriString() 133 private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, in calculateInSampleSize() argument 135 return calculateInSampleSize(options.outWidth, options.outHeight, reqWidth, reqHeight); in calculateInSampleSize()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | WidgetHostViewLoader.java | 89 final Bundle options = getDefaultOptionsForWidget(mLauncher, mInfo); in preloadWidget() local 93 mInfo.bindOptions = options; in preloadWidget() 105 mWidgetLoadingId, pInfo, options)) { in preloadWidget() 154 Bundle options = null; in getDefaultOptionsForWidget() local 165 options = new Bundle(); in getDefaultOptionsForWidget() 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() 175 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()
|
/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/ |
D | FolderInfo.java | 54 public int options; field in FolderInfo 105 values.put(LauncherSettings.Favorites.OPTIONS, options); in onAddToDatabase() 147 return (options & optionFlag) != 0; in hasOption() 156 int oldOptions = options; in setOption() 158 options |= option; in setOption() 160 options &= ~option; in setOption() 162 if (context != null && oldOptions != options) { in setOption()
|
/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/WallpaperPicker/src/com/android/gallery3d/common/ |
D | BitmapCropTask.java | 153 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() 273 BitmapFactory.Options options = new BitmapFactory.Options(); in cropBitmap() local 275 options.inSampleSize = scaleDownSampleSize; in cropBitmap() 277 crop = decoder.decodeRegion(roundedTrueCrop, options); in cropBitmap() 286 BitmapFactory.Options options = new BitmapFactory.Options(); in cropBitmap() local 288 options.inSampleSize = scaleDownSampleSize; in cropBitmap() [all …]
|