summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2009-09-28 17:57:55 -0700
committerChih-Chung Chang <chihchung@google.com>2009-09-28 17:57:55 -0700
commit35627500f00644aaae44c93f98f6a0cdeefe2d94 (patch)
treee58667fb48ee3dd32747746d8149bdfc635d3e96 /src/com/android
parent207ad85f1875dd7acb69091cbcf022646aaee818 (diff)
downloadLegacyCamera-35627500f00644aaae44c93f98f6a0cdeefe2d94.zip
LegacyCamera-35627500f00644aaae44c93f98f6a0cdeefe2d94.tar.gz
LegacyCamera-35627500f00644aaae44c93f98f6a0cdeefe2d94.tar.bz2
Remove unused code.
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/BooleanListPreference.java6
-rw-r--r--src/com/android/camera/IconListPreference.java3
-rw-r--r--src/com/android/camera/ImageManager.java3
-rw-r--r--src/com/android/camera/OnScreenSettings.java2
-rw-r--r--src/com/android/camera/ThumbnailController.java3
-rw-r--r--src/com/android/camera/Util.java5
-rw-r--r--src/com/android/camera/gallery/BaseImage.java27
-rw-r--r--src/com/android/camera/gallery/BaseImageList.java7
-rw-r--r--src/com/android/camera/gallery/Image.java16
-rw-r--r--src/com/android/camera/gallery/VideoObject.java5
10 files changed, 0 insertions, 77 deletions
diff --git a/src/com/android/camera/BooleanListPreference.java b/src/com/android/camera/BooleanListPreference.java
index 94ec1cb..e04709f 100644
--- a/src/com/android/camera/BooleanListPreference.java
+++ b/src/com/android/camera/BooleanListPreference.java
@@ -16,14 +16,8 @@
package com.android.camera;
-import android.app.AlertDialog.Builder;
import android.content.Context;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
import android.preference.ListPreference;
-import android.os.Parcel;
-import android.os.Parcelable;
import android.util.AttributeSet;
/** {@code BooleanListPreference} is used for those {@code SharedPreference}
diff --git a/src/com/android/camera/IconListPreference.java b/src/com/android/camera/IconListPreference.java
index a0b164c..314b7a9 100644
--- a/src/com/android/camera/IconListPreference.java
+++ b/src/com/android/camera/IconListPreference.java
@@ -16,14 +16,11 @@
package com.android.camera;
-import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.preference.ListPreference;
-import android.os.Parcel;
-import android.os.Parcelable;
import android.util.AttributeSet;
public class IconListPreference extends ListPreference {
diff --git a/src/com/android/camera/ImageManager.java b/src/com/android/camera/ImageManager.java
index 84b617d..679d96c 100644
--- a/src/com/android/camera/ImageManager.java
+++ b/src/com/android/camera/ImageManager.java
@@ -20,7 +20,6 @@ import com.android.camera.gallery.BaseImageList;
import com.android.camera.gallery.DrmImageList;
import com.android.camera.gallery.IImage;
import com.android.camera.gallery.IImageList;
-import com.android.camera.gallery.Image;
import com.android.camera.gallery.ImageList;
import com.android.camera.gallery.ImageListUber;
import com.android.camera.gallery.SingleImageList;
@@ -28,7 +27,6 @@ import com.android.camera.gallery.VideoList;
import com.android.camera.gallery.VideoObject;
import android.content.ContentResolver;
-import android.content.ContentUris;
import android.content.ContentValues;
import android.database.Cursor;
import android.graphics.Bitmap;
@@ -42,7 +40,6 @@ import android.os.Parcelable;
import android.provider.DrmStore;
import android.provider.MediaStore;
import android.provider.MediaStore.Images;
-import android.provider.MediaStore.Images.ImageColumns;
import android.util.Log;
import java.io.File;
diff --git a/src/com/android/camera/OnScreenSettings.java b/src/com/android/camera/OnScreenSettings.java
index 61ce4f8..ca2f5de 100644
--- a/src/com/android/camera/OnScreenSettings.java
+++ b/src/com/android/camera/OnScreenSettings.java
@@ -4,7 +4,6 @@ import android.content.Context;
import android.graphics.PixelFormat;
import android.os.Handler;
import android.os.Message;
-import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
@@ -21,7 +20,6 @@ import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
-import android.widget.CheckBox;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ListView;
diff --git a/src/com/android/camera/ThumbnailController.java b/src/com/android/camera/ThumbnailController.java
index 55b9442..2ae8e20 100644
--- a/src/com/android/camera/ThumbnailController.java
+++ b/src/com/android/camera/ThumbnailController.java
@@ -28,10 +28,7 @@ import android.media.ThumbnailUtil;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.util.Log;
-import android.view.View;
import android.view.ViewGroup.LayoutParams;
-import android.view.animation.AlphaAnimation;
-import android.view.animation.Animation;
import android.widget.ImageView;
import java.io.BufferedInputStream;
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java
index 34deb3d..d44435a 100644
--- a/src/com/android/camera/Util.java
+++ b/src/com/android/camera/Util.java
@@ -522,9 +522,4 @@ public class Util {
view.startAnimation(anim);
return anim;
}
-
- public static <T> T checkNotNull(T object) {
- if (object == null) throw new NullPointerException();
- return object;
- }
}
diff --git a/src/com/android/camera/gallery/BaseImage.java b/src/com/android/camera/gallery/BaseImage.java
index 5c9c07f..6607b08 100644
--- a/src/com/android/camera/gallery/BaseImage.java
+++ b/src/com/android/camera/gallery/BaseImage.java
@@ -22,7 +22,6 @@ import com.android.camera.Util;
import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.media.ThumbnailUtil;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.provider.MediaStore.Images;
@@ -31,7 +30,6 @@ import android.util.Log;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
/**
* Represents a particular image and provides access to the underlying bitmap
@@ -75,31 +73,6 @@ public abstract class BaseImage implements IImage {
mDisplayName = displayName;
}
- protected abstract Bitmap.CompressFormat compressionType();
-
- /**
- * Take a given bitmap and compress it to a file as described
- * by the Uri parameter.
- *
- * @param bitmap the bitmap to be compressed/stored
- * @param uri where to store the bitmap
- * @return true if we succeeded
- */
- protected boolean compressImageToFile(Bitmap bitmap, Uri uri) {
- OutputStream outputStream = null;
- try {
- outputStream = mContentResolver.openOutputStream(uri);
- bitmap.compress(compressionType(), 75, outputStream);
- return true;
- } catch (FileNotFoundException ex) {
- return false;
- } catch (IOException ex) {
- return false;
- } finally {
- Util.closeSilently(outputStream);
- }
- }
-
public String getDataPath() {
return mDataPath;
}
diff --git a/src/com/android/camera/gallery/BaseImageList.java b/src/com/android/camera/gallery/BaseImageList.java
index 7379fb0..ce85753 100644
--- a/src/com/android/camera/gallery/BaseImageList.java
+++ b/src/com/android/camera/gallery/BaseImageList.java
@@ -21,17 +21,10 @@ import com.android.camera.Util;
import android.content.ContentResolver;
import android.content.ContentUris;
-import android.content.ContentValues;
import android.database.Cursor;
-import android.graphics.Bitmap;
import android.net.Uri;
-import android.provider.BaseColumns;
-import android.provider.MediaStore.Images.Thumbnails;
import android.util.Log;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.OutputStream;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/src/com/android/camera/gallery/Image.java b/src/com/android/camera/gallery/Image.java
index d14c74e..6190706 100644
--- a/src/com/android/camera/gallery/Image.java
+++ b/src/com/android/camera/gallery/Image.java
@@ -66,17 +66,6 @@ public class Image extends BaseImage implements IImage {
// ((BaseImageList) getContainer()).invalidateCursor();
}
- @Override
- protected Bitmap.CompressFormat compressionType() {
- String mimeType = getMimeType();
- if ("image/png".equals(mimeType)) {
- return Bitmap.CompressFormat.PNG;
- } else if ("image/gif".equals(mimeType)) {
- return Bitmap.CompressFormat.PNG;
- }
- return Bitmap.CompressFormat.JPEG;
- }
-
public boolean isReadonly() {
String mimeType = getMimeType();
return !"image/jpeg".equals(mimeType) && !"image/png".equals(mimeType);
@@ -98,11 +87,6 @@ public class Image extends BaseImage implements IImage {
mExif.setAttribute(tag, value);
}
- public void saveImageContents(Bitmap image, String filePath) {
- Uri uri = mContainer.contentUri(mId);
- compressImageToFile(image, uri);
- }
-
private void loadExifData() {
try {
mExif = new ExifInterface(mDataPath);
diff --git a/src/com/android/camera/gallery/VideoObject.java b/src/com/android/camera/gallery/VideoObject.java
index 75f3148..8e3b60e 100644
--- a/src/com/android/camera/gallery/VideoObject.java
+++ b/src/com/android/camera/gallery/VideoObject.java
@@ -47,11 +47,6 @@ public class VideoObject extends BaseImage implements IImage {
}
@Override
- protected Bitmap.CompressFormat compressionType() {
- return Bitmap.CompressFormat.JPEG;
- }
-
- @Override
public boolean equals(Object other) {
if (other == null || !(other instanceof VideoObject)) return false;
return fullSizeImageUri().equals(