Home | History | Annotate | Download | only in gallery
      1 package com.android.camera.gallery;
      2 
      3 import android.content.ContentResolver;
      4 import android.net.Uri;
      5 import android.os.Parcel;
      6 
      7 import java.util.ArrayList;
      8 import java.util.HashMap;
      9 
     10 public class MockImageList implements IImageList {
     11 
     12     private final ArrayList<IImage> mList = new ArrayList<IImage>();
     13 
     14     public void checkThumbnail(int index) {
     15     }
     16 
     17     public void deactivate() {
     18     }
     19 
     20     public HashMap<String, String> getBucketIds() {
     21         return null;
     22     }
     23 
     24     public int getCount() {
     25         return mList.size();
     26     }
     27 
     28     public IImage getImageAt(int i) {
     29         return mList.get(i);
     30     }
     31 
     32     public IImage getImageForUri(Uri uri) {
     33         return null;
     34     }
     35 
     36     public int getImageIndex(IImage image) {
     37         return mList.indexOf(image);
     38     }
     39 
     40     public boolean isEmpty() {
     41         return mList.isEmpty();
     42     }
     43 
     44     public boolean removeImage(IImage image) {
     45         return mList.remove(image);
     46     }
     47 
     48     public boolean removeImageAt(int i) {
     49         return mList.remove(i) != null;
     50     }
     51 
     52     public void addImage(MockImage image) {
     53         mList.add(image);
     54         image.setContainer(this);
     55     }
     56 
     57     public void open(ContentResolver resolver) {
     58     }
     59 
     60     public void close() {
     61     }
     62 
     63     public void writeToParcel(Parcel out, int flags) {
     64         throw new UnsupportedOperationException();
     65     }
     66 
     67     public int describeContents() {
     68         return 0;
     69     }
     70 }
     71