summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammad Shamsi <m.h.shams@gmail.com>2010-11-06 22:16:55 +0800
committerMohammad Shamsi <m.h.shams@gmail.com>2010-11-06 22:16:55 +0800
commita5ed74a5ad06f43b1129a9c698d7416ec3da4609 (patch)
treebd1c851abfc9012acbcfb9052f9c7ec324d92fc3
parent11bf143e9428c3f9c0a2f807f0720bbd7615a174 (diff)
downloadpackages_apps_LegacyCamera-a5ed74a5ad06f43b1129a9c698d7416ec3da4609.zip
packages_apps_LegacyCamera-a5ed74a5ad06f43b1129a9c698d7416ec3da4609.tar.gz
packages_apps_LegacyCamera-a5ed74a5ad06f43b1129a9c698d7416ec3da4609.tar.bz2
code cleanup: unused import statements, local varaiables and ... removed from Camera app
Change-Id: I6480b49bffa898400b2f2f3eeea85ce3bceed457
-rw-r--r--src/com/android/camera/Camera.java16
-rw-r--r--src/com/android/camera/CameraSettings.java3
-rw-r--r--src/com/android/camera/Switcher.java1
-rw-r--r--src/com/android/camera/ThumbnailController.java1
-rw-r--r--src/com/android/camera/gallery/Image.java2
-rw-r--r--src/com/android/camera/ui/GLRootView.java3
6 files changed, 6 insertions, 20 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index f0d38af..f6b653e 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -42,12 +42,11 @@ import android.media.ToneGenerator;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
-import android.os.Debug;
import android.os.Environment;
import android.os.Handler;
+import android.os.Looper;
import android.os.Message;
import android.os.MessageQueue;
-import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.provider.Settings;
@@ -370,7 +369,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
}
private void addIdleHandler() {
- MessageQueue queue = getMainLooper().myQueue();
+ MessageQueue queue = Looper.myQueue();
queue.addIdleHandler(new MessageQueue.IdleHandler() {
public boolean queueIdle() {
ImageManager.ensureOSXCompatibleFolder();
@@ -1005,14 +1004,14 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
CameraSettings.KEY_WHITE_BALANCE, whiteBalance);
mHeadUpDisplay.overrideSettings(
CameraSettings.KEY_FOCUS_MODE, focusMode);
- }});
+ }});
}
- private void updateSceneModeInHud() {
+ private void updateSceneModeInHud() {
// If scene mode is set, we cannot set flash mode, white balance, and
- // focus mode, instead, we read it from driver
+ // focus mode, instead, we read it from driver
if (!Parameters.SCENE_MODE_AUTO.equals(mSceneMode)) {
- overrideHudSettings(mParameters.getFlashMode(),
+ overrideHudSettings(mParameters.getFlashMode(),
mParameters.getWhiteBalance(), mParameters.getFocusMode());
} else {
overrideHudSettings(null, null, null);
@@ -1664,9 +1663,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
setPreviewDisplay(mSurfaceHolder);
setCameraParameters(UPDATE_PARAM_ALL);
- final long wallTimeStart = SystemClock.elapsedRealtime();
- final long threadTimeStart = Debug.threadCpuTimeNanos();
-
mCameraDevice.setErrorCallback(mErrorCallback);
try {
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 5abe73c..be30140 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -69,7 +69,6 @@ public class CameraSettings {
// MMS video length
public static final int DEFAULT_VIDEO_DURATION_VALUE = -1;
- @SuppressWarnings("unused")
private static final String TAG = "CameraSettings";
private final Context mContext;
@@ -237,8 +236,6 @@ public class CameraSettings {
private void filterUnsupportedOptions(PreferenceGroup group,
ListPreference pref, List<String> supported) {
- CharSequence[] allEntries = pref.getEntries();
-
// Remove the preference if the parameter is not supported or there is
// only one options for the settings.
if (supported == null || supported.size() <= 1) {
diff --git a/src/com/android/camera/Switcher.java b/src/com/android/camera/Switcher.java
index c88ddb8..1fa9caa 100644
--- a/src/com/android/camera/Switcher.java
+++ b/src/com/android/camera/Switcher.java
@@ -20,7 +20,6 @@ import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AnimationUtils;
diff --git a/src/com/android/camera/ThumbnailController.java b/src/com/android/camera/ThumbnailController.java
index 6b67cb0..8bc5dd9 100644
--- a/src/com/android/camera/ThumbnailController.java
+++ b/src/com/android/camera/ThumbnailController.java
@@ -46,7 +46,6 @@ import java.io.IOException;
*/
public class ThumbnailController {
- @SuppressWarnings("unused")
private static final String TAG = "ThumbnailController";
private final ContentResolver mContentResolver;
private Uri mUri;
diff --git a/src/com/android/camera/gallery/Image.java b/src/com/android/camera/gallery/Image.java
index 0726c21..495f65d 100644
--- a/src/com/android/camera/gallery/Image.java
+++ b/src/com/android/camera/gallery/Image.java
@@ -23,8 +23,6 @@ import android.net.Uri;
* The class for normal images in gallery.
*/
public class Image extends BaseImage implements IImage {
- private static final String TAG = "BaseImage";
-
private final int mRotation;
public Image(ContentResolver cr,
diff --git a/src/com/android/camera/ui/GLRootView.java b/src/com/android/camera/ui/GLRootView.java
index d8ae0f8..8aeae04 100644
--- a/src/com/android/camera/ui/GLRootView.java
+++ b/src/com/android/camera/ui/GLRootView.java
@@ -92,9 +92,6 @@ public class GLRootView extends GLSurfaceView
private boolean mIsQueueActive = true;
- private int mFirstWidth;
- private int mFirstHeight;
-
// TODO: move this part (handler) into GLSurfaceView
private final Looper mLooper;