diff options
author | Owen Lin <owenlin@google.com> | 2009-05-27 14:55:45 -0700 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2009-06-03 14:27:02 -0700 |
commit | deb57259b0055c08a44cd43933276ccf485dcd2d (patch) | |
tree | e958eb7ac811b4654b3046a26778caff79f32a61 /src/com/android | |
parent | d6111ce639ceb5a34d21406e253fc5742d8259b7 (diff) | |
download | LegacyCamera-deb57259b0055c08a44cd43933276ccf485dcd2d.zip LegacyCamera-deb57259b0055c08a44cd43933276ccf485dcd2d.tar.gz LegacyCamera-deb57259b0055c08a44cd43933276ccf485dcd2d.tar.bz2 |
Fixes some warnings shown in Eclipse.
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/camera/Camera.java | 18 | ||||
-rw-r--r-- | src/com/android/camera/ExifInterface.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/GalleryPicker.java | 10 | ||||
-rw-r--r-- | src/com/android/camera/GridViewSpecial.java | 15 | ||||
-rw-r--r-- | src/com/android/camera/ImageGallery.java | 10 | ||||
-rwxr-xr-x | src/com/android/camera/ImageManager.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/PhotoAppWidgetProvider.java | 5 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 5 | ||||
-rw-r--r-- | src/com/android/camera/VideoPreview.java | 1 |
9 files changed, 25 insertions, 45 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 7bfeb98..86ac9b4 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -50,7 +50,6 @@ import android.preference.PreferenceManager; import android.provider.MediaStore; import android.text.format.DateFormat; import android.util.AttributeSet; -import android.util.Config; import android.util.Log; import android.view.Gravity; import android.view.KeyEvent; @@ -65,7 +64,6 @@ import android.view.WindowManager; import android.view.MenuItem.OnMenuItemClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; -import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.Toast; @@ -1497,11 +1495,9 @@ public class Camera extends Activity implements View.OnClickListener, 0F, mLocationListeners[1]); } catch (java.lang.SecurityException ex) { - // ok + Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { - if (Config.LOGD) { - Log.d(TAG, "provider does not exist " + ex.getMessage()); - } + Log.d(TAG, "provider does not exist " + ex.getMessage()); } try { mLocationManager.requestLocationUpdates( @@ -1510,11 +1506,9 @@ public class Camera extends Activity implements View.OnClickListener, 0F, mLocationListeners[0]); } catch (java.lang.SecurityException ex) { - // ok + Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { - if (Config.LOGD) { - Log.d(TAG, "provider does not exist " + ex.getMessage()); - } + Log.d(TAG, "provider does not exist " + ex.getMessage()); } } } @@ -1525,7 +1519,7 @@ public class Camera extends Activity implements View.OnClickListener, try { mLocationManager.removeUpdates(mLocationListeners[i]); } catch (Exception ex) { - // ok + Log.i(TAG, "fail to remove location listners, ignore", ex); } } } @@ -1677,6 +1671,8 @@ public class Camera extends Activity implements View.OnClickListener, } class FocusRectangle extends View { + + @SuppressWarnings("unused") private static final String TAG = "FocusRectangle"; public FocusRectangle(Context context, AttributeSet attrs) { diff --git a/src/com/android/camera/ExifInterface.java b/src/com/android/camera/ExifInterface.java index a5ae873..a19dee5 100644 --- a/src/com/android/camera/ExifInterface.java +++ b/src/com/android/camera/ExifInterface.java @@ -17,7 +17,6 @@ package com.android.camera; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; /** @@ -170,8 +169,6 @@ public class ExifInterface { /** * Given a numerical white balance value, return a * human-readable string describing it. - * @param orientation - * @return String */ public static String whiteBalanceToString(int whitebalance) { switch (whitebalance) { diff --git a/src/com/android/camera/GalleryPicker.java b/src/com/android/camera/GalleryPicker.java index 1997840..6bfe2e4 100644 --- a/src/com/android/camera/GalleryPicker.java +++ b/src/com/android/camera/GalleryPicker.java @@ -287,11 +287,11 @@ public class GalleryPicker extends Activity { private void startWorker() { mAbort = false; mWorkerThread = new Thread("GalleryPicker Worker") { - @Override - public void run() { - workerRun(); - } - }; + @Override + public void run() { + workerRun(); + } + }; mWorkerThread.start(); } diff --git a/src/com/android/camera/GridViewSpecial.java b/src/com/android/camera/GridViewSpecial.java index e54f998..afed97f 100644 --- a/src/com/android/camera/GridViewSpecial.java +++ b/src/com/android/camera/GridViewSpecial.java @@ -16,6 +16,8 @@ package com.android.camera; +import static com.android.camera.Util.Assert; + import com.android.camera.gallery.IImage; import com.android.camera.gallery.IImageList; @@ -37,9 +39,8 @@ import android.widget.Scroller; import java.util.HashMap; -import static com.android.camera.Util.Assert; - class GridViewSpecial extends View { + @SuppressWarnings("unused") private static final String TAG = "GridViewSpecial"; public static interface Listener { @@ -261,15 +262,6 @@ class GridViewSpecial extends View { cellOutline.draw(canvas); } - private void clearOutlineBitmap() { - for (int i = 0; i < mOutline.length; i++) { - if (mOutline[i] != null) { - mOutline[i].recycle(); - mOutline[i] = null; - } - } - } - private void moveDataWindow() { // Calculate visible region according to scroll position. int startRow = (mScrollY - mSpec.mCellSpacing) / mBlockHeight; @@ -655,6 +647,7 @@ class GridViewSpecial extends View { } class ImageBlockManager { + @SuppressWarnings("unused") private static final String TAG = "ImageBlockManager"; // Number of rows we want to cache. diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java index 2e26d77..062de68 100644 --- a/src/com/android/camera/ImageGallery.java +++ b/src/com/android/camera/ImageGallery.java @@ -832,8 +832,8 @@ public class ImageGallery extends Activity implements // mSrcRect and mDstRect are only used in drawImage, but we put them as // instance variables to reduce the memory allocation overhead because // drawImage() is called a lot. - private Rect mSrcRect = new Rect(); - private Rect mDstRect = new Rect(); + private final Rect mSrcRect = new Rect(); + private final Rect mDstRect = new Rect(); public void drawImage(Canvas canvas, IImage image, Bitmap b, int xPos, int yPos, int w, int h) { @@ -1005,9 +1005,10 @@ public class ImageGallery extends Activity implements mPriorityQueue.add(pTask); } + /* Disable for multiselect private boolean isInMultiSelectMode() { return mMultiSelected != null; - } + }*/ private void closeMultiSelectMode() { if (mMultiSelected == null) return; @@ -1016,9 +1017,10 @@ public class ImageGallery extends Activity implements hideFooter(); } + /* Disable for multiselect private void openMultiSelectMode() { if (mMultiSelected != null) return; mMultiSelected = new HashSet<IImage>(); mGvs.invalidateAllImages(); - } + }*/ } diff --git a/src/com/android/camera/ImageManager.java b/src/com/android/camera/ImageManager.java index b5ee041..50509a6 100755 --- a/src/com/android/camera/ImageManager.java +++ b/src/com/android/camera/ImageManager.java @@ -64,9 +64,6 @@ public class ImageManager { private static final Uri VIDEO_STORAGE_URI = Uri.parse("content://media/external/video/media"); - private static final Uri VIDEO_THUMBNAIL_URI = - Uri.parse("content://media/external/video/thumbnails"); - /** * Enumerate type for the location of the images in gallery. */ diff --git a/src/com/android/camera/PhotoAppWidgetProvider.java b/src/com/android/camera/PhotoAppWidgetProvider.java index 5fb7401..da680b4 100644 --- a/src/com/android/camera/PhotoAppWidgetProvider.java +++ b/src/com/android/camera/PhotoAppWidgetProvider.java @@ -26,7 +26,6 @@ import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.util.Config; import android.util.Log; import android.widget.RemoteViews; @@ -37,8 +36,8 @@ import java.io.IOException; * Simple widget to show a user-selected picture. */ public class PhotoAppWidgetProvider extends AppWidgetProvider { - static final String TAG = "PhotoAppWidgetProvider"; - static final boolean LOGD = Config.LOGD || true; + private static final String TAG = "PhotoAppWidgetProvider"; + private static final boolean LOGD = true; @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index a51a7ac..fec040e 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -1211,11 +1211,6 @@ public class VideoCamera extends Activity implements View.OnClickListener, initializeVideo(); } - private void hideAlertAndStartVideoRecording() { - hideAlert(); - startVideoRecording(); - } - private void acquireVideoThumb() { Bitmap videoFrame = Util.createVideoThumbnail(mCurrentVideoFilename); mThumbController.setData(mCurrentVideoUri, videoFrame); diff --git a/src/com/android/camera/VideoPreview.java b/src/com/android/camera/VideoPreview.java index 6de3855..50409e6 100644 --- a/src/com/android/camera/VideoPreview.java +++ b/src/com/android/camera/VideoPreview.java @@ -22,6 +22,7 @@ import android.util.Log; import android.view.SurfaceView; class VideoPreview extends SurfaceView { + @SuppressWarnings("unused") private static final String TAG = "VideoPreview"; private float mAspectRatio; private int mHorizontalTileSize = 1; |