diff options
author | Chih-Chung Chang <chihchung@google.com> | 2010-03-05 15:34:47 -0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2010-03-05 15:37:44 -0800 |
commit | 9a4c2cac83f50e29063d27605c9f8d9e676a6f22 (patch) | |
tree | 60a7fcff85a74a4c7442d7f399eabdc335436519 /src/com/android/camera/gallery/BaseImage.java | |
parent | e8697d7437c343e31e815fd4714238afafc7b1ac (diff) | |
download | LegacyCamera-9a4c2cac83f50e29063d27605c9f8d9e676a6f22.zip LegacyCamera-9a4c2cac83f50e29063d27605c9f8d9e676a6f22.tar.gz LegacyCamera-9a4c2cac83f50e29063d27605c9f8d9e676a6f22.tar.bz2 |
Remove unused code.
Diffstat (limited to 'src/com/android/camera/gallery/BaseImage.java')
-rw-r--r-- | src/com/android/camera/gallery/BaseImage.java | 96 |
1 files changed, 3 insertions, 93 deletions
diff --git a/src/com/android/camera/gallery/BaseImage.java b/src/com/android/camera/gallery/BaseImage.java index bbd45f1..6ee0e76 100644 --- a/src/com/android/camera/gallery/BaseImage.java +++ b/src/com/android/camera/gallery/BaseImage.java @@ -44,33 +44,15 @@ public abstract class BaseImage implements IImage { // Database field protected Uri mUri; protected long mId; - protected String mDataPath; - protected final int mIndex; - protected String mMimeType; private final long mDateTaken; - private String mTitle; - protected BaseImageList mContainer; - - private int mWidth = UNKNOWN_LENGTH; - private int mHeight = UNKNOWN_LENGTH; - - protected BaseImage(BaseImageList container, ContentResolver cr, - long id, int index, Uri uri, String dataPath, long miniThumbMagic, - String mimeType, long dateTaken, String title) { - mContainer = container; + protected BaseImage(ContentResolver cr, + long id, Uri uri, long miniThumbMagic, + long dateTaken) { mContentResolver = cr; mId = id; - mIndex = index; mUri = uri; - mDataPath = dataPath; - mMimeType = mimeType; mDateTaken = dateTaken; - mTitle = title; - } - - public String getDataPath() { - return mDataPath; } @Override @@ -84,43 +66,10 @@ public abstract class BaseImage implements IImage { return mUri.hashCode(); } - public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels) { - return fullSizeBitmap(minSideLength, maxNumberOfPixels, - IImage.ROTATE_AS_NEEDED); - } - - public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels, - boolean rotateAsNeeded) { - Uri url = mContainer.contentUri(mId); - if (url == null) return null; - - Bitmap b = Util.makeBitmap(minSideLength, maxNumberOfPixels, - url, mContentResolver); - - if (b != null && rotateAsNeeded) { - b = Util.rotate(b, getDegreesRotated()); - } - - return b; - } - - public InputStream fullSizeImageData() { - try { - InputStream input = mContentResolver.openInputStream(mUri); - return input; - } catch (IOException ex) { - return null; - } - } - public Uri fullSizeImageUri() { return mUri; } - public IImageList getContainer() { - return mContainer; - } - public long getDateTaken() { return mDateTaken; } @@ -129,42 +78,6 @@ public abstract class BaseImage implements IImage { return 0; } - public String getMimeType() { - return mMimeType; - } - - public String getTitle() { - return mTitle; - } - - private void setupDimension() { - ParcelFileDescriptor input = null; - try { - input = mContentResolver.openFileDescriptor(mUri, "r"); - BitmapFactory.Options options = new BitmapFactory.Options(); - options.inJustDecodeBounds = true; - BitmapManager.instance().decodeFileDescriptor( - input.getFileDescriptor(), options); - mWidth = options.outWidth; - mHeight = options.outHeight; - } catch (FileNotFoundException ex) { - mWidth = 0; - mHeight = 0; - } finally { - Util.closeSilently(input); - } - } - - public int getWidth() { - if (mWidth == UNKNOWN_LENGTH) setupDimension(); - return mWidth; - } - - public int getHeight() { - if (mHeight == UNKNOWN_LENGTH) setupDimension(); - return mHeight; - } - public Bitmap miniThumbBitmap() { Bitmap b = null; try { @@ -181,9 +94,6 @@ public abstract class BaseImage implements IImage { return b; } - protected void onRemove() { - } - @Override public String toString() { return mUri.toString(); |