use of com.android.gallery3d.ui.BitmapScreenNail in project android_packages_apps_Gallery2 by LineageOS.
the class PhotoDataAdapter method updateScreenNail.
private void updateScreenNail(Path path, Future<ScreenNail> future) {
ImageEntry entry = mImageCache.get(path);
ScreenNail screenNail = future.get();
if (entry == null || entry.screenNailTask != future) {
if (screenNail != null)
screenNail.recycle();
return;
}
entry.screenNailTask = null;
// Combine the ScreenNails if we already have a BitmapScreenNail
if (entry.screenNail instanceof TiledScreenNail) {
TiledScreenNail original = (TiledScreenNail) entry.screenNail;
screenNail = original.combine(screenNail);
}
if (screenNail == null) {
entry.failToLoad = true;
} else {
entry.failToLoad = false;
entry.screenNail = screenNail;
}
for (int i = -SCREEN_NAIL_MAX; i <= SCREEN_NAIL_MAX; ++i) {
if (path == getPath(mCurrentIndex + i)) {
if (i == 0)
updateTileProvider(entry);
mPhotoView.notifyImageChange(i);
break;
}
}
updateImageRequests();
updateScreenNailUploadQueue();
}
use of com.android.gallery3d.ui.BitmapScreenNail in project android_packages_apps_Gallery2 by LineageOS.
the class SinglePhotoDataAdapter method setScreenNail.
private void setScreenNail(Bitmap bitmap, int width, int height) {
mBitmapScreenNail = new BitmapScreenNail(bitmap);
setScreenNail(mBitmapScreenNail, width, height);
}
Aggregations