public class

BitmapManager

extends Object
java.lang.Object
   ↳ com.cooliris.media.BitmapManager

Class Overview

This class provides several utilities to cancel bitmap decoding. The function decodeFileDescriptor() is used to decode a bitmap. During decoding if another thread wants to cancel it, it calls the function cancelThreadDecoding() specifying the Thread which is in decoding. cancelThreadDecoding() is sticky until allowThreadDecoding() is called. You can also cancel decoding for a set of threads using ThreadSet as the parameter for cancelThreadDecoding. To put a thread into a ThreadSet, use the add() method. A ThreadSet holds (weak) references to the threads, so you don't need to remove Thread from it if some thread dies.

Summary

Nested Classes
class BitmapManager.ThreadSet  
Public Methods
synchronized void allowThreadDecoding(Thread t)
synchronized void allowThreadDecoding(BitmapManager.ThreadSet threads)
The following two methods are used to allow/cancel a set of threads for bitmap decoding.
synchronized boolean canThreadDecoding(Thread t)
The following three methods are used to keep track of which thread is being disabled for bitmap decoding.
synchronized void cancelThreadDecoding(Thread t)
synchronized void cancelThreadDecoding(BitmapManager.ThreadSet threads)
Bitmap decodeFileDescriptor(FileDescriptor fd, BitmapFactory.Options options)
The real place to delegate bitmap decoding to BitmapFactory.
synchronized static BitmapManager instance()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public synchronized void allowThreadDecoding (Thread t)

public synchronized void allowThreadDecoding (BitmapManager.ThreadSet threads)

The following two methods are used to allow/cancel a set of threads for bitmap decoding.

public synchronized boolean canThreadDecoding (Thread t)

The following three methods are used to keep track of which thread is being disabled for bitmap decoding.

public synchronized void cancelThreadDecoding (Thread t)

public synchronized void cancelThreadDecoding (BitmapManager.ThreadSet threads)

public Bitmap decodeFileDescriptor (FileDescriptor fd, BitmapFactory.Options options)

The real place to delegate bitmap decoding to BitmapFactory.

public static synchronized BitmapManager instance ()