public final class

CacheService

extends IntentService
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.app.IntentService
           ↳ com.cooliris.cache.CacheService

Summary

Constants
String ACTION_CACHE
int BUCKET_ID_INDEX
int BUCKET_NAME_INDEX
String DEFAULT_BUCKET_SORT_ORDER
String DEFAULT_IMAGE_SORT_ORDER
String DEFAULT_VIDEO_SORT_ORDER
int MEDIA_BUCKET_ID_INDEX
int MEDIA_CAPTION_INDEX
int MEDIA_DATA_INDEX
int MEDIA_DATE_ADDED_INDEX
int MEDIA_DATE_MODIFIED_INDEX
int MEDIA_DATE_TAKEN_INDEX
int MEDIA_ID_INDEX
int MEDIA_LATITUDE_INDEX
int MEDIA_LONGITUDE_INDEX
int MEDIA_MIME_TYPE_INDEX
int MEDIA_ORIENTATION_OR_DURATION_INDEX
int THUMBNAIL_DATA_INDEX
int THUMBNAIL_DATE_MODIFIED_INDEX
int THUMBNAIL_ID_INDEX
int THUMBNAIL_ORIENTATION_INDEX
[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Fields
public static final String BASE_CONTENT_STRING_IMAGES
public static final String BASE_CONTENT_STRING_VIDEOS
public static final String[] BUCKET_PROJECTION_IMAGES
public static final String[] BUCKET_PROJECTION_VIDEOS
public static final String[] PROJECTION_IMAGES
public static final String[] PROJECTION_VIDEOS
public static final String[] SENSE_PROJECTION
public static final String[] THUMBNAIL_PROJECTION
public static final DiskCache sAlbumCache
public static final DiskCache sMetaAlbumCache
public static final DiskCache sSkipThumbnailIds
Public Constructors
CacheService()
Public Methods
final static long[] computeDirtySets(Context context)
final static long fetchDateTaken(MediaItem item)
final static String getCachePath(String subFolderName)
final static ImageList getImageList(Context context)
final static boolean isCacheReady(boolean onlyMediaSets)
final static boolean isPresentInCache(long setId)
final static void loadMediaItemsIntoMediaFeed(Context context, MediaFeed feed, MediaSet set, int rangeStart, int rangeEnd, boolean includeImages, boolean includeVideos)
final static void loadMediaSet(Context context, MediaFeed feed, DataSource source, long bucketId)
final static void loadMediaSets(Context context, MediaFeed feed, DataSource source, boolean includeImages, boolean includeVideos, boolean moveCameraToFront)
final static void markDirty()
final static void markDirty(long id)
final static void populateMediaItemFromCursor(MediaItem item, ContentResolver cr, Cursor cursor, String baseUri)
final static void populateVideoItemFromCursor(MediaItem item, ContentResolver cr, Cursor cursor, String baseUri)
final static byte[] queryThumbnail(Context context, long thumbId, long origId, boolean isVideo, long timestamp)
final static boolean setHasItems(ContentResolver cr, long setId)
final static void startCache(Context context, boolean checkthumbnails)
final static void startNewThumbnailThread(Context context)
final static byte[] writeBitmapToCache(DiskCache thumbnailCache, long thumbId, long origId, Bitmap bitmap, int thumbnailWidth, int thumbnailHeight, long timestamp)
Protected Methods
void onHandleIntent(Intent intent)
[Expand]
Inherited Methods
From class android.app.IntentService
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2

Constants

public static final String ACTION_CACHE

Constant Value: "com.cooliris.cache.action.CACHE"

public static final int BUCKET_ID_INDEX

Constant Value: 0 (0x00000000)

public static final int BUCKET_NAME_INDEX

Constant Value: 1 (0x00000001)

public static final String DEFAULT_BUCKET_SORT_ORDER

Constant Value: "upper(bucket_display_name) ASC"

public static final String DEFAULT_IMAGE_SORT_ORDER

Constant Value: "datetaken ASC"

public static final String DEFAULT_VIDEO_SORT_ORDER

Constant Value: "datetaken ASC"

public static final int MEDIA_BUCKET_ID_INDEX

Constant Value: 10 (0x0000000a)

public static final int MEDIA_CAPTION_INDEX

Constant Value: 1 (0x00000001)

public static final int MEDIA_DATA_INDEX

Constant Value: 8 (0x00000008)

public static final int MEDIA_DATE_ADDED_INDEX

Constant Value: 6 (0x00000006)

public static final int MEDIA_DATE_MODIFIED_INDEX

Constant Value: 7 (0x00000007)

public static final int MEDIA_DATE_TAKEN_INDEX

Constant Value: 5 (0x00000005)

public static final int MEDIA_ID_INDEX

Constant Value: 0 (0x00000000)

public static final int MEDIA_LATITUDE_INDEX

Constant Value: 3 (0x00000003)

public static final int MEDIA_LONGITUDE_INDEX

Constant Value: 4 (0x00000004)

public static final int MEDIA_MIME_TYPE_INDEX

Constant Value: 2 (0x00000002)

public static final int MEDIA_ORIENTATION_OR_DURATION_INDEX

Constant Value: 9 (0x00000009)

public static final int THUMBNAIL_DATA_INDEX

Constant Value: 2 (0x00000002)

public static final int THUMBNAIL_DATE_MODIFIED_INDEX

Constant Value: 1 (0x00000001)

public static final int THUMBNAIL_ID_INDEX

Constant Value: 0 (0x00000000)

public static final int THUMBNAIL_ORIENTATION_INDEX

Constant Value: 3 (0x00000003)

Fields

public static final String BASE_CONTENT_STRING_IMAGES

public static final String BASE_CONTENT_STRING_VIDEOS

public static final String[] BUCKET_PROJECTION_IMAGES

public static final String[] BUCKET_PROJECTION_VIDEOS

public static final String[] PROJECTION_IMAGES

public static final String[] PROJECTION_VIDEOS

public static final String[] SENSE_PROJECTION

public static final String[] THUMBNAIL_PROJECTION

public static final DiskCache sAlbumCache

public static final DiskCache sMetaAlbumCache

public static final DiskCache sSkipThumbnailIds

Public Constructors

public CacheService ()

Public Methods

public static final long[] computeDirtySets (Context context)

public static final long fetchDateTaken (MediaItem item)

public static final String getCachePath (String subFolderName)

public static final ImageList getImageList (Context context)

public static final boolean isCacheReady (boolean onlyMediaSets)

public static final boolean isPresentInCache (long setId)

public static final void loadMediaItemsIntoMediaFeed (Context context, MediaFeed feed, MediaSet set, int rangeStart, int rangeEnd, boolean includeImages, boolean includeVideos)

public static final void loadMediaSet (Context context, MediaFeed feed, DataSource source, long bucketId)

public static final void loadMediaSets (Context context, MediaFeed feed, DataSource source, boolean includeImages, boolean includeVideos, boolean moveCameraToFront)

public static final void markDirty ()

public static final void markDirty (long id)

public static final void populateMediaItemFromCursor (MediaItem item, ContentResolver cr, Cursor cursor, String baseUri)

public static final void populateVideoItemFromCursor (MediaItem item, ContentResolver cr, Cursor cursor, String baseUri)

public static final byte[] queryThumbnail (Context context, long thumbId, long origId, boolean isVideo, long timestamp)

public static final boolean setHasItems (ContentResolver cr, long setId)

public static final void startCache (Context context, boolean checkthumbnails)

public static final void startNewThumbnailThread (Context context)

public static final byte[] writeBitmapToCache (DiskCache thumbnailCache, long thumbId, long origId, Bitmap bitmap, int thumbnailWidth, int thumbnailHeight, long timestamp)

Protected Methods

protected void onHandleIntent (Intent intent)